-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
12 lines (7 loc) · 797 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
This project is for posting poems to Weibo.
The corpus of Tang and Song poems (tang300 and song100) are from Linux fortune-zh-1.9
Main entry: tangsong.sh
Please create a dir named "poemimg" before using.
It first invokes "fortune" to randomly select a poem from both tang and song, but output the result into a file (tang.poem and song.poem). Then the tangsong.py file randomly pick either tang or song. This python file also requests a query in Google Images (mobile version), and automatically picks the image of the first result (the original size image). Finally it posts the poem together with the image to Weibo.
The Weibo OAuth2 auto-renewed helper is from SinaWeiboAuth2, https://github.com/CAQ/SinaWeiboAuth2
Another Weibo API is also required: http://code.google.com/p/sinaweibopy/