?

Log in

No account? Create an account
Static-Pages Alternative to LiveJournal? - LogJam [entries|archive|friends|userinfo]
LogJam

[ website | LogJam ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Static-Pages Alternative to LiveJournal? [Apr. 23rd, 2005|02:19 pm]
LogJam
logjam
[cinquero]
I wonder if there is any tool that exports my journal entries as static and nicely formatted html pages. Does someone know a GPL'd one? Couldn't logjam be made to do that? Would be great feature -- I don't like being dependent on the livejournal.com service.
LinkReply

Comments:
[User Picture]From: popcultureicon
2005-04-23 12:49 pm (UTC)
wget -nH --mirror -l1 http://www.livejournal.com/users/[username] (plus whatever switch you'd want to prevent it from grabbing your friends list, and calendar etc.)
of course, that'd be a bit harsh on the lj server, so you'd probably want to throw a --limit-rate 10 on it and let it run over night. (or the next week)

(Reply) (Thread)
[User Picture]From: popcultureicon
2005-04-23 12:51 pm (UTC)
oh, and the force html switch.
(Reply) (Parent) (Thread)
[User Picture]From: lisanys
2005-04-23 01:21 pm (UTC)
Don't forget to save the cookie to grab your protected entries.

Might be better to use curl.
(Reply) (Parent) (Thread)
[User Picture]From: popcultureicon
2005-04-23 01:24 pm (UTC)
yeah, you should probably point to your browsers cookie file, instead of command line username/userpass, since i think there is some MD5 thingy.
anyway, i don't know curl. though it may be a better option, since a ? in a url seems to confound wget.
(Reply) (Parent) (Thread)
[User Picture]From: surye
2005-04-25 04:05 pm (UTC)
That's why you quote the URL, always quote the URL =P It only "confounds" the shell, in that it's intended behavior, in bash atleast(it's valid syntax).
(Reply) (Parent) (Thread)
[User Picture]From: popcultureicon
2005-04-25 04:40 pm (UTC)
does that work on a recursive wget though?
it seems to have troubles with anything that assumes you are using a dynamic web browser.
(Reply) (Parent) (Thread)
[User Picture]From: surye
2005-04-25 04:44 pm (UTC)
I've never had issues, all the dynamicness is server side, as far as a client is concerned, all pages are static (with the exception of best cacheing practices).
(Reply) (Parent) (Thread)
[User Picture]From: popcultureicon
2005-04-25 04:47 pm (UTC)
humm. i'll have to try that out.
php is always problematic though. worst case was i ended up with 5 gb of php permutations.
(Reply) (Parent) (Thread)
From: cinquero
2005-04-23 01:43 pm (UTC)
That way I'm still dependent on LiveJournal.
(Reply) (Parent) (Thread)
[User Picture]From: popcultureicon
2005-04-23 01:51 pm (UTC)
if you get the page requisites, it should save everything in HTML format, using your layout. the -l2 should grab all icons and other trifles...
but maybe i am not understanding your question.
(Reply) (Parent) (Thread)
From: cinquero
2005-04-23 02:01 pm (UTC)
Well, I need LiveJournal to add new entries... generating static html pages directly from text snippets shouldn't be too hard to do. I would write such a tool for myself if not the most problematic point would be to create great designs... For example, look at blogger.com. They do that on the server side: you can hit a button and they regenerate the HTML pages -- you can even tell them to upload them somewhere via FTP. I'd like to have the HTML generation on the client side.

Btw, just copying the LiveJournal pages is not a good idea because it will result in a lot of stale links (comments won't work, for example, but I don't need the comment feature -- reply by email is way good enough for my purposes).
(Reply) (Parent) (Thread)
[User Picture]From: popcultureicon
2005-04-23 02:11 pm (UTC)
http://wordpress.org/ ?
or are you looking for a WYSIWYG client to format your posts ala livejournals formatting, then allowing you to take that data and transfer it to another, more stable forum?

it seems that your pretty much want a stylesheet to lay over the xml?
that seems to be a whole other service, or a feature request you are looking for.
in wich case it seems like this is better suited for
http://www.livejournal.com/suggestions/
(Reply) (Parent) (Thread)
From: cinquero
2005-04-23 02:39 pm (UTC)
http://wordpress.org/ ?
or are you looking for a WYSIWYG client to format your posts ala livejournals formatting, then allowing you to take that data and transfer it to another, more stable forum?

Not forum, just a webserver serving static html pages. WordPress requires PHP and MySQL and is in no way static.

it seems that your pretty much want a stylesheet to lay over the xml?Almost. Except that archive pages and TOCs should be generated.
(Reply) (Parent) (Thread)
[User Picture]From: cowsandmilk
2005-04-23 02:57 pm (UTC)
the things you want are why they created dynamic websites . . . . Is there any reason you need this to be static?
(Reply) (Parent) (Thread)
From: evan
2005-04-23 06:09 pm (UTC)
logjam's xml export is way more friendly to lj servers.

i'd suggest using that and some xslt to render the pages.

i don't think logjam will ever support creating static html pages; it's just too much feature creep. i might accept a patch that does the xslt+scp on post, but i dunno.
(Reply) (Parent) (Thread)
[User Picture]From: aredridel
2005-04-23 03:27 pm (UTC)
I have written a small tool in Ruby that takes the synchronized copy and turns it into HTML.

Unfortunately, there's no way based on that to have links to the comment page since the LJ protocol doesn't let you get the URL of a given post.
(Reply) (Thread)
From: cinquero
2005-04-23 03:32 pm (UTC)
Cool. Could you please put it on sourceforge?
(Reply) (Parent) (Thread)
[User Picture]From: aredridel
2005-04-23 03:53 pm (UTC)

It's not big enough to warrant a sourceforge page (besides, I'm a control freak). It's a single script, compact because Ruby comes with nice tools for the job.



It's available at http://nbtsc.org/~aredridel/2005/04/23/



There are two variables at the top of the script that have to be changed. Then, synch your offline copy, then run the script. Works for me — your mileage may vary. I don't think I put in anything to deal with newline-to-<br /> conversion, since my posts are 100% preformatted.


(Reply) (Parent) (Thread)
From: evan
2005-04-23 06:07 pm (UTC)
This is cool!
(Reply) (Parent) (Thread)
[User Picture]From: aredridel
2005-04-24 02:46 pm (UTC)
Thanks!
(Reply) (Parent) (Thread)
[User Picture]From: gaal
2005-04-23 06:43 pm (UTC)
FYI, the LJ protocol now does give you the anum in the getevents mode, so you can calculate the URL of a post in your synch copy.
(Reply) (Parent) (Thread)
[User Picture]From: aredridel
2005-04-24 02:51 pm (UTC)
Oh sweet! I will be making very good use of this soon.
(Reply) (Parent) (Thread)
[User Picture]From: whitaker
2005-04-23 03:37 pm (UTC)
LogJam will export your journal as monthly XML files. You could render those however you like then?
(Reply) (Thread)
From: cinquero
2005-04-23 03:46 pm (UTC)
That's exactly what I think of. But, like I already pointed out, the main part of such a thing would be the render engine/the designs.
(Reply) (Parent) (Thread)
[User Picture]From: aredridel
2005-04-24 02:55 pm (UTC)
The rendering part is easy. Just change newlines to
. Livejournal doesn't do much.
(Reply) (Parent) (Thread)
[User Picture]From: jope
2005-04-23 03:43 pm (UTC)
Blosxom can generate static pages.
(Reply) (Thread)
From: (Anonymous)
2005-04-24 03:17 pm (UTC)

blosxom

I'm using blosxom now. Thx for the hint!

I'm only missing one thing: the generation of an archive index.

http://omnibus.uni-freiburg.de/~stierm/weblog/index.html
(Reply) (Thread)