Monday, 14 March 2011

Introducing pwntter

I discovered a great little CLI based twitter app called TTYtter a couple of days ago and discovered, i) it is written using Perl, and, ii) one can write extensions for it. For a gentleman with some free time over a weekend, this is a Bad Thing™.

Having a read through the TTYtter documnentation, I discovered that it was an extraordinarily flexible little tool and one could also run it in daemon mode. Which then made me think that storing my twitter stream into a MySQL database would be a Good Thing™.

So, here is the result of my efforts, namely, pwntter. I am adopting the maxim "Release early, release often" with this project and am hosting it in a Google Code repository.


What you need

  • A Perl interpreter.
  • The following CPAN modules: DBD::mysql, Date::Manip and HTML::Entities.
  • A working installation of TTYtter.
  • To read the TTYtter documentation. And then read it again. And again, probably.
  • A MySQL database.


Installing pwntter

Download and unpack project from the download section.

Create or use an an existing MySQL database and execute the pwntter.sql file. The self-explanatory table names are: users, tweets and direct_messages.
Edit pwntter.pl with hostname, database, userid and password for your MySQL database:

# mysql database config.
my $host = "localhost";
my $db = "pwntter";
my $user_id = "mysqluserid";
my $password = "mysqlpassword";
`

If they are not already installed, install Perl modules DB, Date::Manip and HTML::Entities.

Run TTYtter with the pwntter extension. For example:ttytter -exts=pwntter.pl -hold -daemon
Fill your database.





Screenshot

Ha! It really doesn't do anything graphical or textual. Here's a query instead...

3 comments:

Petra said...
This comment has been removed by the author.
Petra said...

Hello,

is it possible to use your extension with the current version 2.1 of ttytter to archive also my RTs? I wish I had such an archive possibility as I started with Twitter.

Thanks in advance!

Petra

Petra said...

Do you also know TweetMyPC for Windows? (http://tweetmypc.codeplex.com/)


"TweetMyPC is a little software-application for Windows, written in VB.Net using the .Net-Framework v3.5 SP1, which allows you to control and access your computer from anywhere by simply sending a twitter-message with a special command as its content."

Do you think something is also possible to implement into ttytter?

Again, thanks in advance!

Petra

PS I am a native German tongue..