View Single Post
Old 03-31-2017, 01:50 AM   #197
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Quote:
Originally Posted by autoklus View Post
Hi BenChen, love the effort you put in!

Too bad my problem with FBReader isn't fixed with version 1.60. I've done some troubleshooting, and believe a malformed(?) header is the culprit - see the attached image.

- I downloaded Tolstoy's War and Peace (with images) from here and changed the title to "War and Peace and more" using your app (that's all I did). FBReader didn't recognize the saved file.
- I unzipped the contents and recompressed them to ZIP/EPUB using WinRAR (starting with the mimetype file). FBReader could perfectly recognize & read this (and it also reads zip files and loose folder structures). Ergo, the metadata is well-formed enough** & you can create a valid ePub using WinRAR - I wasn't sure.
- Lastly, I imported & exported "your" epub file using Calibre. Then I compared all the headers in a hex editor (WinHex).

Your file header looks different from the other three. "META-INF", i.e. the directory structure, begins at a different offset.

Attachment 155890

I've looked up the ZIP file format on Wikipedia - the order and position of things after "mimetype" shouldn't matter, except I see no reason why ePub...Editor should insert something new before META-INF/container.xml, or what the 16 bytes of "garbage" in segment 2 (3A-49) mean.
In this ebook, only "mimetype" is in the root folder.

Attachment 155889

I re-tested this with another ePub from Project Gutenberg - your program creates these headers consistently, and always inserts the exact same string of "PK..oa«,........".

** I noticed your app also changes some meta-xmlns attributes, and if a field like "subject" gets cleared/emptied it omits the closing tag, but that's not strictly necessary AFAIK

btw, where are you planning to go with your app? An mp3tag for ePubs would be great - I'd love to batch-remove all the "subjects" (tags) from my collection...
Hi autoklus,

I cannot recreate your problem. When I make changes to the metadata using EPUBMetadataEditor, I can still open the books in FBReader afterwards. (I'm using FBReader 0.12.10.)

I'm not planning on doing anything else with the program besides fixing bugs. It does everything I want it to! And you can already do a batch-remove in the Batch Operations area using the "replace" option with an empty replace string.

Sincerely,
Ben.
BenChen is offline   Reply With Quote