DuskDuskSat Dec 15 20:50:11 2007
LJ Escape
Topics: Programming , BLOG
MusicHouse of Pain - Back From the Dead

Over the last hour or two, I whipped up a program that attempts to slurp as much information off of LiveJournal as it can, on the theory that this might be interesting/useful to those of you who don't mirror your blog to LJ from somewhere else (as I do), and are concerned about the recent sale of LJ to that previously mentioned Russian marketing firm. Details:

  • It's written in perl and assumes it's running on something Unixy. You need to install LJ::Simple to use it (it's in CPAN - should be an easy install)
  • It can't get comments or tags, the first being a limitation of the LJ API, the second being a limitation of LJ::Simple (that I may be able to work around if I play with this again)
  • It's not as clean as it should be - there are many places where I should've been more modular and done less cut'n'pasting.
  • It doesn't presently grab all your usericons for you. This would be easy to do, especially given that it already grabs the URLs for them.
  • It's doesn't give a lot of feedback
  • I've committed the cardinal sin of having the user provide their lj username/password as the two arguments it takes (uncool because anyone who can run "ps" will see them). If I play with it again, I'll give the option to read from a file too. The program will change its process name immediately to hide the username/password stuff if your Unix allows that.
  • The saved entries are placed in individual files with their creation time (unix format) as their filename, all in a subdirectory of where the program was run. The formatting of these files is similar enough to what my POUND blog software uses that importing them with pndc (the commandline client to POUND) should be trivial. Future versions of the program (if any) may convert links into wiki-style links and otherwise decompose HTML into something easier on the eyes.
  • Please see the top of the file for settings you might want to tweak.

Intrested parties can grab the tarball here.



Time Heals All Wounds.. And Then Kills the Patient
Previous Next