twitterspy: your personal jabber twitter gateway
Dedicated to those who did not have enough invites to t2p.me, got periodic tweet.im layouts and just want to take this checker into our own hands.
We are talking about Twitterspy , a freely distributed Jabber bot written in Python and already able in places more than the above-mentioned well-known gates. The MIT license under which it is distributed allows you to freely modify the bot code in order to expand its already pretty functionality.
Since this is your personal bot, the limit of 20,000 calls per hour to the Twitter API is entirely yours (I barely managed to spend several hundred). However, it is a multi-user bot and you can share it with your friends. You can even supplement it with the invite module and distribute them here on the hub
Technically, the bot is not gluttonous. On my server, its process consumes two dozen megabytes of RAM. To run it, the following is required :
We clone the repository: We upload
its internal dependencies to the repository (like the wokkel library):
Copy twitterspy.conf.sample to twitterspy.conf and modify it for ourselves (the main thing is to come up with a JID bot with a password).
We initialize a clean database. In the case of CouchDB, this is the command:
In the case of sqlite, this is:
Done. Launching the daemon:
Now it’s enough to add the JID of the bot to the contacts of any client’s gills and your personal twitter gateway is at your disposal ( who will be the first to make the Russian-language version with fun euphemisms for the “cancel” command?; O) ).
PS: If you want to look at the working bot, add twitterspy@jabber.org to your contacts.
We are talking about Twitterspy , a freely distributed Jabber bot written in Python and already able in places more than the above-mentioned well-known gates. The MIT license under which it is distributed allows you to freely modify the bot code in order to expand its already pretty functionality.
About functionality:
- posting messages on twitter (post, autopost commands)
- adding users to friends (follow / unfollow)
- simple twitter search (search)
- permanent search on Twitter (track, tracks), that is, saying “track habrahabr” you will receive all new messages with the word habrahabr. However, for me this is the main and very useful feature of this bot
- tracking friends (the 'watch_friends on' command, now two bots work for me at the same time - twitterspy and tweet.im, so at first usually a message comes from twitterspy and only a minute later from twitter.im, which is understandable - the first bot works only for me, second for thousands of people)
- yes, links in tweets, of course, not only automatically collapse into short ones, but also expand back when displayed in the jabber client
Since this is your personal bot, the limit of 20,000 calls per hour to the Twitter API is entirely yours (I barely managed to spend several hundred). However, it is a multi-user bot and you can share it with your friends. You can even supplement it with the invite module and distribute them here on the hub
How to run twitterspy
Technically, the bot is not gluttonous. On my server, its process consumes two dozen megabytes of RAM. To run it, the following is required :
- python of course
- twisted (this thing works as a web server daemon)
- memcached (this is for storing operational information)
- CouchDB or sqlite (for permanent storage of your registration information, a list of your tracks, and so on)
We clone the repository: We upload
git clone git://github.com/dustin/twitterspy.gitits internal dependencies to the repository (like the wokkel library):
git submodule init && git submodule updateCopy twitterspy.conf.sample to twitterspy.conf and modify it for ourselves (the main thing is to come up with a JID bot with a password).
We initialize a clean database. In the case of CouchDB, this is the command:
./etc/create_couch.pyIn the case of sqlite, this is:
sqlite3 /path/to/twitterspy.sqlite3 < etc/schema.sqlDone. Launching the daemon:
twistd -y twitterspy.tacNow it’s enough to add the JID of the bot to the contacts of any client’s gills and your personal twitter gateway is at your disposal ( who will be the first to make the Russian-language version with fun euphemisms for the “cancel” command?; O) ).
PS: If you want to look at the working bot, add twitterspy@jabber.org to your contacts.