2011-04-03

tzikeh: (internet - epic shit)
2011-04-03 03:26 pm

Anyone know how to write a script like this? (not sure what programming language you'd use)


ETA: SOLVED WITH A VENGEANCE! Solution is here. I'm already a hardcore user of Instapaper, so this is like the cherry on top of the sundae. Many, many thanks to [livejournal.com profile] talking_sock!

So, one of the great benefits of AO3 is that they have a variety of download options that let you put fanfiction you like on your e-reader. Formats so far are mobi, epub, pdf, and html.

But a significant amount of fanfiction is still posted solely to livejournal.

There's a free program called Calibre that can convert most kinds of files to most other kinds of files. I thought it would be relatively easy to go to the source code of a livejournal posting of a fanfiction story, grab the relevant html, and have calibre convert it to mobi. Sounds easy, no?

But the coding of livejournal's html is a BIG FAT MESS. Like, just disastrous.

Does anyone out there have the know-how to write a script to convert the source code of a livejournal entry to .mobi? Or, if not that, to convert the html to *standard* html, so that calibre could then convert that file to mobi? Even if it were a two-step process (e.g., the reader would go into the source code, copy just the code of the story itself, paste it to a document, and then run the script on that), it would be infinitely awesome for those of us who are reading our fanfiction on our e-book readers--and that population is increasing daily.

Thoughts? Can you do it, and are you willing to try? Do you know someone else who would be willing to try?

(x-posted to [livejournal.com profile] kindledfans)