March 29th, 2004

  • evan

lj comments

LJ lets you export your comments now:

sqlite> select u.username,c.body from user u, comment c where c.commentid=(select max(commentid) from comment) and u.userid=c.posterid;
xaosenkosmos|<i> but I think I'm still paying the internet time bill.</i>\n\nSee also: <a href="">The Anthropic Principle</a> in light of the existence of the parent post ;^)

% ls -l comments.db
-rw-r--r-- 1 martine martine 10763264 2004-03-29 09:28 comments.db

Having them in a database is much more fun than LogJam's XML export:

sqlite> select avg(length(body)) from comment;
sqlite> select length(c.body),c.jitemid,u.username,c.commentid from comment c, user u where length(c.body)=(select max(length(body)) from comment) and u.userid=c.posterid;

Unfortunately, I don't think I can map from a jitemid to a URL without a journal export beside it. (And even that may not include the anum...?)
So now: use my C-based liblivejournal export and write an SQLite backend? Or use my ML-based SQLite and write a journal export?