Dedicated to those who did not have enough invites to t2p.me, they got periodic layouts of tweet.im and just want to take this checker in their hands.It's about
Twitterspy , a freely distributed Jabber bot written in
Python and already able to do more than the aforementioned famous gates. The MIT license, under which it is distributed, allows you to freely modify the bot code in order to extend its already substantial functionality.
About functionality:
- posting messages to twitter (commands post, autopost)
- add users to “friends” (follow / unfollow)
- simple search on twitter
- a permanent search on twitter (track, tracks), that is, saying “track habrahabr” you will receive all new messages with the entry of 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 first a message usually comes from twitterspy and after a minute from twitter.im, it's understandable - the first bot only works for me, second to thousands of people)
- Yes, links in tweets, of course, not only automatically collapse to short, but also unfold when they are displayed in the jabber client
')
Since this is your personal bot, the limit of 20,000 calls per hour to the Twitter API is all yours (I barely managed to spend a few hundred). However, this is a multiplayer bot and you can share it with your friends. You can even add it to the module of invites and distribute them here, in the habr.
How to run twitterspy
Technically, the bot is not greedy. On my server, its process consumes two dozen megabytes of RAM. To start it, the
following is required:
- of course python
- twisted (this thing works as a web server daemon)
- memcached (this is for storing live information)
- CouchDB or sqlite (for permanent storage of your registration information, a list of your tracks, and so on)
Clone the repository:
git clone git://github.com/dustin/twitterspy.git
We load its internal dependencies into the repository (like a wokkel library):
git submodule init && git submodule update
Copy twitterspy.conf.sample to twitterspy.conf and modify it for yourself (the main thing is to come up with a JID bot with a password).
Initializing a clean database. In the case of CouchDB, this is the command:
./etc/create_couch.py
In the case of sqlite, this is:
sqlite3 /path/to/twitterspy.sqlite3 < etc/schema.sql
Is done. Run the daemon:
twistd -y twitterspy.tac
Now it’s enough to add a JID bot to the contacts of any client's jabber and your personal twitter gateway at your complete disposal (
who will be the first to make the Russian version with funny euphemisms of the "cancel" command?; O) ).
PS: If you want to look at a working bot, then add twitterspy@jabber.org to your contacts.