Glowfic Ebooks

Do you have a setting, character, plot, art, or other notion that you wish to put on the Internet? This is the Internet! Whee!
User avatar
Alicorn
Site Admin
Posts: 4226
Joined: Fri Mar 21, 2014 4:44 pm
Pronouns: She/her/hers
Location: The Belltower
Contact:

Re: EPUB and MOBI of Effulgence

Post by Alicorn »

Updated my versions.
Throne3d
Posts: 1282
Joined: Sat Oct 10, 2015 1:11 pm
Pronouns: He/him/his
Location: United Kingdom

Re: EPUB and MOBI of Effulgence

Post by Throne3d »

Ok, well, I decided that I'd have a go at trying to make Incandescence into an epub. So far, I haven't completed it, but I've got a script that retrieves all the flat copies of the different chapters, puts the different branches near each other but has them more cohesive (kinda like the Effulgence epub does it), and puts them into some nice HTML container stuff.

Currently, it mostly looks ugly, due to a lack of pictures, and it might be missing stuff or slightly broken (hopefully not - it at least seems to work), but I thought I'd just put my progress so far up here. It could probably make a basic epub version as is (if you just convert it using calibre or something), but I'll have a look at putting images in the applicable places and so on. It's also missing post dates, but I wasn't sure they were really that necessary. I could add them if anyone wants them, but for now they're missing.

If you've set anything up to have dhouck's effulgence2epub thing work, this should work fine. The "runner.sh" script will, in theory, do everything and produce a bunch of .html files in the "output" folder.

Here's how it looks (with my default font):
http://puu.sh/l7pTO/ae1fc415b8.png

And on one where there's a split:
http://puu.sh/l7pWs/ae09664450.png

And here's the file to download:
https://www.dropbox.com/s/oh4v8phc99l2d ... l.zip?dl=0
(The output folder has already-generated files, but I deleted all the download cache because it's about 100MB)

Um... Links won't work properly (they'll go to the dreamwidth website instead of inside the HTML files), and it's not yet an epub (though it should be rather easy to make it one, like I said, with calibre). It might also be easier for people to read it with this format (and a different set of CSS, probably) than on the dreamwidth website if they stumble across the threads, since this has all the threads flattened. I know I prefer it that way, but if you use the flat mode on dreamwidth it orders them a bit weirdly.

Some of the code is a bit... hackish. If anyone looks at it, I apologise for the lack of readability. I'm also not that familiar with Bash, and most of the stuff I did in Python required extensive googling of functions and stuff.
User avatar
Alicorn
Site Admin
Posts: 4226
Joined: Fri Mar 21, 2014 4:44 pm
Pronouns: She/her/hers
Location: The Belltower
Contact:

Re: EPUB and MOBI of Effulgence

Post by Alicorn »

Not sure it works for general download in its current state, but keep me posted.
Throne3d
Posts: 1282
Joined: Sat Oct 10, 2015 1:11 pm
Pronouns: He/him/his
Location: United Kingdom

Re: EPUB and MOBI of Effulgence

Post by Throne3d »

Okay, there's now an updated version that downloads images and attaches them to the files:
http://puu.sh/l86i1/0d2408b926.png
http://puu.sh/l86le/b7ada5fcb8.png

It also has a bit of a styling change (as you can probably see).

I'm just having a look at a way to convert it to an epub (it should work? I think?), but that probably won't be an automated thing (hopefully won't matter, seeing as it's ended).

Here's the new link (I doubt you'll use it, seeing as it's still not really fit for general download), and I'll have a look at getting it into a proper epub format:
https://www.dropbox.com/s/95sc5pnfffmmy ... l.zip?dl=0
User avatar
DanielH
Posts: 3745
Joined: Tue Apr 01, 2014 1:50 pm
Pronouns: he/him/his

Re: EPUB and MOBI of Effulgence

Post by DanielH »

I’ll see what I can do about combining your stuff and the main branch at some point; I hope this weekend. Can you PM me a list of what you did to make that easier?
Throne3d
Posts: 1282
Joined: Sat Oct 10, 2015 1:11 pm
Pronouns: He/him/his
Location: United Kingdom

Re: EPUB and MOBI of Effulgence

Post by Throne3d »

Well, I've created an epub. Unfortunately, when I tested it on my iPhone, it didn't work properly.

Here it is (in case it works on other devices):
https://www.dropbox.com/s/rj2r5hadjxvfr ... .epub?dl=0

I'm going to make a couple of changes to the HTML, then hopefully it'll read it a bit better. The text displays, but it's all a bit weird. Also, the images don't display. It could be due to the fact they don't have an extension (like ".png" or whatever - looking at the effulgence epub, it seems like DanielH has just made them into "jpg"s?), and I'm not really sure how to fix that (other than forcing them to be jpgs).

I'll look at how DanielH created an epub automatically, and see if it works better when I do it that way.
DanielH wrote:I’ll see what I can do about combining your stuff and the main branch at some point; I hope this weekend. Can you PM me a list of what you did to make that easier?
I actually sort of used your stuff for inspiration, rather than changing it. I'm not really sure how similar the bits of code actually are...
User avatar
DanielH
Posts: 3745
Joined: Tue Apr 01, 2014 1:50 pm
Pronouns: he/him/his

Re: EPUB and MOBI of Effulgence

Post by DanielH »

Oh, okay. Then I’ll look over your code and see about incorporating anything if that makes sense, because eventually I want my code to work not just on Incandescence but also on sandboxen, and anything you do for Incandescence will likely be useful for that.

I want to point out that I did not originally write this; I took over from ssafar/latanius. I am not as familial with the code base as if I had written it myself.

What I do with the images, apparently, is to claim they are all JPEGs whether they are or not (both in the extension and in the mimetype mentioned in content.opf, and then use readers which don’t care about the lie. I know I attempted to do something better with them a few months ago, but apparently I never finished doing that.

Can anybody who’s had any problems with my versions in any reader please post about them, especially if those readers are Kindles (which I don’t have)? I know I’m using some features which aren’t supported by all readers, but they are supported by the readers I use and I don’t know if other readers still do something sensible. Getting this to work better in other readers is going to be my next project after getting an Incandescence version out.
Throne3d
Posts: 1282
Joined: Sat Oct 10, 2015 1:11 pm
Pronouns: He/him/his
Location: United Kingdom

Re: EPUB and MOBI of Effulgence

Post by Throne3d »

Ok, well, it seems like I've generated an epub that actually functions (using that ebooklib)!

Here it is:
https://www.dropbox.com/s/z96adsdlf6l0l ... .epub?dl=0

Here's the code, too:
https://www.dropbox.com/s/4hv8qsxsc41oe ... b.zip?dl=0

I haven't actually told it that images are JPGs, but I've just left them without an extension. It works on the calibre viewer, and also works on iPhone (at least, it is working so far...).
Last edited by Throne3d on Tue Nov 03, 2015 3:56 pm, edited 1 time in total.
User avatar
Alicorn
Site Admin
Posts: 4226
Joined: Fri Mar 21, 2014 4:44 pm
Pronouns: She/her/hers
Location: The Belltower
Contact:

Re: EPUB and MOBI of Effulgence

Post by Alicorn »

Thanks!
Throne3d
Posts: 1282
Joined: Sat Oct 10, 2015 1:11 pm
Pronouns: He/him/his
Location: United Kingdom

Re: EPUB and MOBI of Effulgence

Post by Throne3d »

Thanks for all the amazing content to read!

Oh, and it should be able to adapt to do Effulgence rather well (assuming they have a similar layout, which I think they do) by just changing where it gets the list of chapters from to the Effulgence index. I haven't actually tried it, but I might do it at some point in the next week, or someone else could if they know how and can be bothered, just to see how it works out.

Not really necessary, seeing as how we already have an Effulgence epub, but it might be useful to know it works on a few different formats and isn't really, really Incandescence-specific.
Post Reply