If you want to use Plurk, but aren’t ready to leave Twitter, I wrote a little python script you can use to automatically mirror your plurks on Twitter. This will not work for response plurks, but your main plurks will be extracted and posted to your Twitter account with the prefix “plurking:” followed by your plurk.
The resulting tweet looks like this:

Download the script and set it up as a cron job (or you could execute it manually). It should work with python 2.4 and later. It stores a plurkdb.dat file (which you should probably assign an absolute path to, depending on the behavior of cron on your system). This file is checked every time it is run to make sure that duplicate plurks aren’t being tweeted. You should pass the following parameters on the command line (or modify the script so they are hardcoded, if you want): <twitter username> <twitter password> <plurk username> <plurk password>. Update: see later post on updated plurk script. And like with all software, use at your own risk.
Please let me know if you have any problems with it or see room for improvement. I hacked this out in a hurry, so …



Known bug: it doesn’t handle links well. I’ll try to address this soon, but I’m too tired to do anything else tonight. :P
I really wanna try it, but not internet at home :(
stupid aussie broadband
I get an error (under Python25 for Windows). I’ve got limited experience with Python, so I can’t really jump into debugging. Not my real accounts or password (of course)
C:\Utilities>plurk.py mytwitter tWiTtErPaSs myplurk
Traceback (most recent call last):
File “C:\Utilities\plurk.py”, line 216, in
main(sys.argv[3], sys.argv[1], sys.argv[2])
File “C:\Utilities\plurk.py”, line 206, in main
update_twitter_status(twitter_user, passwd, update)
File “C:\Utilities\plurk.py”, line 185, in update_twitter_status
outp = subprocess.Popen(cmdp, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
File “C:\Python25\lib\subprocess.py”, line 594, in __init__
errread, errwrite)
File “C:\Python25\lib\subprocess.py”, line 816, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
Thanks for the script! I’ll try it out once I get a chance later today. I’m wondering if it’s possible to update Plurk from Twitter though? I already have my GoogleTalk status updating my AIM and Twitter using a cron job. It’d be great if I could add Plurk to the mix.
Simon, thanks for the info. I’ll make some changes so it works on windows sometime soon. I was taking a shortcut that was only available on linux to talk to Twitter.
Ok, it’s updated now and should work on windows, linux and mac… in theory.
Thanks, Jason. It works great now (XP, SP2).
[...] to a linux machine, I suggest setting up a cron job to take care of this. As I mentioned in the previous post, if you set up a cron job, be sure to change the path to plurkdb.dat to an absolute path. I have [...]
[...] If you are on both Twitter and Plurk and you’re more of a Twitter user, you could choose to plurk your tweets using this script. Actually, it could also tweet your plurks. So updating both Twitter and Plurk will be easy too. Other information about this Python script is available here. [...]