Daily twitter archiving
Some months ago, the service I was using to archive my tweets stopped working. Again. I noticed shortly thereafter, but no obvious alternative service seemed to be around, so I figured I'd have to do it myself. Then, you know, life happened.
I was stuck home today due to the aftermath of a particularly nasty headache, so while I was trying to see if I was coherent enough to do some work (which I did do later), I wrote a twitter script. It's not terribly clean or nice yet, but I started a cronjob running sending the formatted output to http://tko.dreamwidth.org. It may be terribly unwise given that I've been largely incoherent all day, but the code seems to work. It's strange how I can write code even when my brain isn't good for much else. I took 8 tries on an email, couldn't concentrate enough to read a book, but I wrote code I felt safe leaving in a cronjob posting to the internet? Perhaps my head's still not working right.
It needs a few pretty touches to make sure it's not losing tweets between days, deal with the timezone, usernames, urls, and retweets more nicely before I share it around. Still, though it's simple it seems worth sharing since I didn't find what I wanted when I looked. Where does one put such small open source scripts nowadays? Github?
I was stuck home today due to the aftermath of a particularly nasty headache, so while I was trying to see if I was coherent enough to do some work (which I did do later), I wrote a twitter script. It's not terribly clean or nice yet, but I started a cronjob running sending the formatted output to http://tko.dreamwidth.org. It may be terribly unwise given that I've been largely incoherent all day, but the code seems to work. It's strange how I can write code even when my brain isn't good for much else. I took 8 tries on an email, couldn't concentrate enough to read a book, but I wrote code I felt safe leaving in a cronjob posting to the internet? Perhaps my head's still not working right.
It needs a few pretty touches to make sure it's not losing tweets between days, deal with the timezone, usernames, urls, and retweets more nicely before I share it around. Still, though it's simple it seems worth sharing since I didn't find what I wanted when I looked. Where does one put such small open source scripts nowadays? Github?
Post it here!
Fame and fortune await! ;)
I'm curious about what framework you built it around, if any.
-Jay
Re: Post it here!
It's straight up python right now, using just a couple of libraries for parsing json, dates, etc. The plan is to try out one of the python oauth libraries later because I want to know how to use them for future projects, but since my twitter feed is public there's no particular need at the moment.
no subject
Also, we really should just implement this kind of thing on Dreamwidth so that it can download your tweets and post them to your account every day in some nice to read format.
no subject