evan_tech

Previous Entry Share Next Entry
09:44 am, 29 Mar 04

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="http://en.wikipedia.org/wiki/Anthropic_principle">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;
234.04325931319
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;
4271|2466|housepet|13530


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?