This is a Ruby module for interfacing with LiveJournal. It's quite thorough — I'm an ex-developer of LiveJournal, so I know the quirks of LiveJournal well, and I've done my best to present a simple and sensible interface.
What might you use it for? The obvious one is writing scripts to post to LJ. But I use it for all sorts of random hacks. For example, I used it to retag a bunch of my old posts: it's a short script to display the post and tags and let you enter new ones, and then with this module it's a few more lines to apply the changes server-side. Here are some other things I've done with this module:
- efficiently synchronize my journal and comments to an SQLite database. [included in the distribution]
- graph relationships between tags in my posts, like Google Trends. [included in the distribution]
- use FUSE (Filesystem in Userspace) to make an "ljfs" that lets me mount an offline copy of my journal and use the normal unix utilities to process entries. [included in the distribution]
- apply machine learning techniques (logisitic regression and support vector machines) to predicting tags on new posts.
See the documentation for details.
News
Latest release is 0.3.1, released 06 January 2007. This release won't die when the "useragent" property is present in an entry. I've also added support for passing :strict => false to the GetEvents constructor so we won't stop working every time LJ adds new metadata. (Note, however, that using :strict => false may mean that your entries may not perfectly round-trip from the server and back.)
For news announcements, see the ljrb tag on my LiveJournal.
This code is managed with darcs. Fetch it with
darcs get http://neugierig.org/software/darcs/ljrbor browse the source. Recent patches:
- (13 months ago) handle 'F'rozen comment state, evinced by LJ::Talk::freeze_comments but undocumented
- (18 months ago) TAG 0.3.1
- (18 months ago) useragent support, :strict => false on GetEvents
Download
Ways to get it:
- Fetch it from the darcs repository,
- download a release from the download directory,
- install the gem from here (also from the download directory),
- or just
gem install livejournal.