INTRO
=====
LiveJournal lets you download your journal, independent of all the HTML they
add when viewing your journal. But they only let you download one month at a
time. This script helps you easily keep a backup of your entire journal.

COMPILATION
===========
ljar is a shell script and doesn't need to be compiled.

There is a utility to pull specific parts out of your journal, a C file called
xml.c. To compile it, you need libxml2.

USAGE
=====
To start, let's look at all the arguments ljar takes:

	$ ./ljar -h
	./ljar archives your LiveJournal locally
	Usage: ./ljar [-ahnVv] [months]
	 -a: Fetch all months
	 -h: Print this help
	 -n: Don't rebuild journal
	 -r: Only rebuild journal
	 -V: version
	 -v: verbose

	Months must be in the format MM/YYYY
	With no arguments, fetches for the current month

So, start by downloading your entire journal:

	$ ./ljar -a

This assumes that you have a cookies file somewhere in ~/.mozilla. If you
don't, you can create a .cookies file manually. There's no real requirement as
long as it's something ljar can parse and actually use. This way we cleverly
avoid ever needing a password.

Now, after you make an entry, you just want to update the current month:

	$ ./ljar

Or maybe you want to download a month that's already past, perhaps because
downloading parts of your journal failed:

	$ ./ljar 08/2002

or

	$ ./ljar -a
	Getting 08/2002 failed
	Getting 10/2002 failed
	$ ./ljar 08/2002 10/2002

All of these commands, in addition to downloading the invidual months, also
builds them all into an xml file called "journal". To prevent that, use -n; to
only rebuild it without downloading anything, use -r.

The C file builds into a binary called 'xml'. It takes parts out of your
journal. Its first argument is the name of the journal file, and the second is
what you want to pick out. For example, to get a list of all the music you've
listened to while making entries, run:

	$ ./xml journal current_music

Or all the subjects you've used:

	$ ./xml journal subject

Or if you want just the text of all your entries:

	$ ./xml journal event

INSTALLATION
============
Included is a php script which you can use as a local mirror of LiveJournal.
Install it anywhere; it only expects that there's an xml file called journal in
the directory it's in.

NOTES
=====
Sometimes ljar fails to download. I blame LiveJournal. You should too.
