?

Log in

No account? Create an account
Export - LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Export [Sep. 3rd, 2002|07:34 pm]
LiveJournal Client Discussions

lj_clients

[phil99]
[mood |curiouscurious]
[music |Radio 4 - Front Row]

I'm considering, when I get a weekend off work and am not moving house, writing a client which will take either CSV or XML output and make it browser-readable, or something. You can see I've planned it so well.

It's something that I think would be terribly terribly useful. I know there are clients out there that do similar things with journals and displaying a local copy of them as part of an overall package using syncitems, but I'm thinking about people like me who have downloaded their journal through the /export.bml every now and then.

I'm thinking something like an HTML thumbnail gallery generator but for journal entries.

Am I wasting my time so much as thinking about it, as such a thing already exists? Can anyone suggest anything about this basic idea that is so flawed I should stop now?
linkReply

Comments:
[User Picture]From: drbrain
2002-09-03 09:55 am (UTC)

XML -> HTML

Is as simple as an XSLT sheet. As far as CSV -> HTML, why not just do CSV -> XML then the XML -> HTML conversion can be done by the existing XSLT sheet.
(Reply) (Thread)
[User Picture]From: phil99
2002-09-03 10:05 am (UTC)

Re: XML -> HTML

I've never quite managed to make it that far through the "Learning XML" book :) I mean, I know what XSLT is and the very basics but from there on I am lost, hence the idea of a client...

Must dig out that book again tonight.
(Reply) (Parent) (Thread)
From: xenofalcon
2002-09-03 10:26 am (UTC)

Re: XML -> HTML

I don't know if this helps much, but Linux Magazine had an article on XSL recently...
From XML To...Anything
(Reply) (Parent) (Thread)
[User Picture]From: drbrain
2002-09-03 11:56 am (UTC)

Re: XML -> HTML

XSLT is a functional language (think scheme or lisp) you process a node, do some stuff, then process the next node. Then again, I like scheme.
(Reply) (Parent) (Thread)
From: scientaestubiqu
2002-09-03 06:09 pm (UTC)
the only flaw I can see is that export doesn't cover memories and other functions...

that's not exactly a flaw, but something to remember :o)
(Reply) (Thread)
[User Picture]From: phil99
2002-09-08 10:47 am (UTC)
Aye, I don't give a flying fig about them :)
Journal entries are all that I really care about, and if these things do become available in the future....
(Reply) (Parent) (Thread)
From: mattlazycat
2002-11-17 04:48 am (UTC)

Ask, and ye shall receive!

I wrote these for personal use, so the code isn't exactly the best in the world.. but as the standard disclaimer goes "it works for me". It's not GNU or whatever, just use it, if you decide to use it, give me a little credit, but don't blame me if it .. I dunno.. deletes the Internet or something. In other words, I like the attention, but I don't want the responsibility ;-)

Turn a folder full of LJ backup XML files into a bunch of HTML files:
http://lazycat.org/software/render_ljxml.phps


Turn a folder full of LJ backup XML files into a bunch of files suitable for Movable Type's import feature:
http://lazycat.org/software/ljxml_to_mtimport.phps


The former outputs mostly-compliant HTML, which is to say, it doesn't tidy up the HTML you use in your entries, but otherwise it's strict HTML 4.01.

The other thing both scripts do, which XSLT can't, is convert <lj user="blah"> and <lj-cut text="read more.."> to visible HTML. Both scripts have a setting which defines whether or not to show private/friends-only entries too (you might be rendering a local copy just so you can find stuff you've written in the past, or you may be rendering a "mirror" for your website).

It's pretty quick, but requires PHP's --with-xml compile option so that the XML parser is installed. I think that's the default anyway, so most installations should have it. Run it from the command-line rather than the web, if possible. PHP 4.2.x and newer have a command-line version as well as a CGI/web-module version, though you can use the CGI version with the -q option at a pinch.
(Reply) (Thread)
[User Picture]From: phil99
2002-11-17 11:30 am (UTC)

Re: Ask, and ye shall receive!

Superb! Thanks. This means that I have an excuse to d/l and learn how to use PHP *s*
(Reply) (Parent) (Thread)