View Single Post
Old 09-13-2011, 02:33 AM   #296
erayd
Zealot
erayd doesn't littererayd doesn't litter
 
Posts: 134
Karma: 146
Join Date: Apr 2008
Device: Onyx Boox Poke 2
Quote:
Originally Posted by ilovejedd View Post
Hello again! Congratulations on all the improvements! It's the first time I've tried the FLAG web service since a couple years back and it's looking much, much nicer than the older version. The ePub output looks very professional. By the looks of things, you've also gotten UTF-8 working just fine now.
Thanks - I'm glad you like the changes .

Yes, UTF-8 is now fully supported - was a bit of a headache to work around all the bits of PHP that couldn't cope with it, but thankfully that's now complete!

Quote:
The top left and right border graphics don't translate very well on small screens such as the iPhone. The images end up overlapping some of the text in Stanza. Perhaps you could use a single graphic top center instead. e.g.:
That's a great idea. I'm intending to get rid of the existing graphics anyway, as I've had a few complaints about them - they're apparently a bit too ornate for many people's taste.

Quote:
Perhaps you could use a Unicode font for the cover image? The title of the following story just shows up as boxes in the cover: http://www.fanfiction.net/s/7246882/.
It already does use a unicode font! Thanks for bringing this to my attention - looks like it's an issue with GD not handling the UTF-8 input correctly (which interestingly enough is contrary to how the documentation says it should be behaving). I'll need to take a more detailed look to figure out what's going on here.

Quote:
In the same vein, some operating systems don't play nice with unusual characters in filenames. This was downloaded as "panneler-san - 私にうそをつく.epub" on my Windows 7 PC. Not sure if XP would have handled it as well.
Good idea - output filenames are now sanitised to alphanumeric characters, and a restricted set of punctuation.

Quote:
For FanFiction.Net, add the category/ies as subject.
Good idea - I'll add this.

Quote:
Assuming you're still using the same ffnet.source.php...
I'm not - I completely rewrote the entire application earlier this year. It now takes a nice ~20-30 line XML definition for each supported site, rather than the mess of PHP & regex that the older version required. It also parses the DOM directly for most things, rather than using regex (although it does use regex in some places to narrow things down a bit) - overall, I've found using the DOM to be much more precise, and less inclined to break when the source sites change.

Quote:
Use the ff.net url as identifier in content.opf, e.g.:
Code:
<dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/"
               id="storyid"
               opf:scheme="URI">http://www.fanfiction.net/s/1234567/</dc:identifier>
Good idea - done.

Quote:
You might also want to change the content.opf header to reflect the URL as the unique indentifier:
Code:
<package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="storyid">
Also done.

Quote:
On a side note, what zip class are you using to make the epubs? Conversion via Calibre is pretty slow so I'd prefer to create the epubs directly in PHP but the built-in zip class just isn't working for me.
I'm using PHP's standard zip class (ZipArchive) - so it definitely works; if you're having problems with it, then it must be something you're doing wrong.

Quote:
Again, thank you very much for all your work! I'm using a customized, "webified" version of your original CLI script and it has made archiving fanfics and reading them on my smartphones, tablets and e-ink readers so much easier. Heck, if not for the ease of fanfic -> epub conversion that FLAG has afforded me, I probably wouldn't have considered buying an e-ink reader at all.
No worries, you're most welcome . I must say I find it fascinating you still use the old script though - it lacked a *lot* of functionality!
erayd is offline   Reply With Quote