Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 03-30-2017, 05:35 PM   #196
autoklus
Junior Member
autoklus began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2017
Device: PC
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.

Click image for larger version

Name:	header error.png
Views:	808
Size:	70.0 KB
ID:	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.

Click image for larger version

Name:	screenshot.899.png
Views:	718
Size:	25.8 KB
ID:	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...

Last edited by autoklus; 03-30-2017 at 07:57 PM.
autoklus is offline   Reply With Quote
Old 03-31-2017, 02: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: 523
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
Advert
Old 04-10-2017, 05:58 PM   #198
autoklus
Junior Member
autoklus began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2017
Device: PC
Quote:
Originally Posted by BenChen View Post
I'm using FBReader 0.12.10.
So do I.
That's strange - what OS are you using, and do the files you create have the same headers that I get?

Thanks for your effort, Ben - I understand your priorities (and Calibre can do all that your tool does, and more). Nevertheless I'm curious to know what causes this issue...
autoklus is offline   Reply With Quote
Old 04-10-2017, 08:34 PM   #199
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: 523
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Quote:
Originally Posted by autoklus View Post
So do I.
That's strange - what OS are you using, and do the files you create have the same headers that I get?

Thanks for your effort, Ben - I understand your priorities (and Calibre can do all that your tool does, and more). Nevertheless I'm curious to know what causes this issue...
I'm using Windows 7. After taking one of my EPUBs and converting it in Calibre, I took an image of the resulting headers. And I've taken a screenshot of FBReader, showing that both EPUBs are visible and they are also both readable.
Attached Thumbnails
Click image for larger version

Name:	Image 001.png
Views:	471
Size:	12.7 KB
ID:	156106   Click image for larger version

Name:	Image 003.png
Views:	459
Size:	73.6 KB
ID:	156107  
BenChen is offline   Reply With Quote
Old 04-17-2017, 10:13 PM   #200
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: 523
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
New version: 1.6.1

Latest Update: The current version is 1.6.1
Recent Changes:
  • Better handle calibre meta tags (title_sort, series, and series_index)
BenChen is offline   Reply With Quote
Advert
Old 04-19-2017, 01:13 PM   #201
ovinio
Junior Member
ovinio began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jan 2015
Device: Nook STR
Quote:
Originally Posted by BenChen View Post
Latest Update: The current version is 1.6.1
Recent Changes:
  • Better handle calibre meta tags (title_sort, series, and series_index)
series is showing same value as series_index, and after changing adds another value to content.opf.
And file size changes quite a lot even without any new data.
ovinio is offline   Reply With Quote
Old 04-19-2017, 08:06 PM   #202
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: 523
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Quote:
Originally Posted by ovinio View Post
series is showing same value as series_index, and after changing adds another value to content.opf.
And file size changes quite a lot even without any new data.
Hi there,

Can you attach an EPUB where you are seeing this behaviour? (You can attach an EPUB if you first change the file extension to JPG.)

As for the file size, I've changed ZIP libraries, so that might account for that. Not totally sure, though...

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Old 04-19-2017, 08:09 PM   #203
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,749
Karma: 75000002
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
why not rename it to zip, seeing thats what an epub is...
PeterT is offline   Reply With Quote
Old 04-19-2017, 08:13 PM   #204
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: 523
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Quote:
Originally Posted by PeterT View Post
why not rename it to zip, seeing thats what an epub is...
Actually, I realise now you don't have to rename anything. You can simply attach an EPUB to a post using the "Manage Attachments" button. I guess I never scrolled down that far!
BenChen is offline   Reply With Quote
Old 04-20-2017, 01:14 AM   #205
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: 523
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
New version: 1.6.2

Latest Update: The current version is 1.6.2
Recent Changes:
  • Fix regression with Calibre series

Thanks to ovinio for noticing the bug!
BenChen is offline   Reply With Quote
Old 05-10-2017, 04:47 AM   #206
last1left91
Junior Member
last1left91 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2017
Device: iPad
EPUB 3.0 Edition Of Publication in Metadate, opf

Hi there,
As the title suggested, I have some requirements from the customer related to the content of the metadata.
Among others, I also have to add Edition of the Publication(it is on page i, History section) but I don't know where to put it inside of the content.opf file(in which metadata tag). I looked through all the metadata database but couldn't find anything relevant in that direction.





As you can see, the History section has many forms related to the language of the document, first one:arabian and the second one: english.

Here is how my current .opf looks like...



Thanks in advance for all your help. If I haven't been clear with what I'm asking for, just tell me

Ps: I have a clue that this information the client asks for is related to some series which involves some <meta property="dcterms:modified">2011-01-01T12:00:00Z</meta> but I'm not sure at all
last1left91 is offline   Reply With Quote
Old 05-10-2017, 11:03 AM   #207
last1left91
Junior Member
last1left91 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2017
Device: iPad
NO ONE CAN HELP ME!?
last1left91 is offline   Reply With Quote
Old 05-10-2017, 11:51 AM   #208
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by last1left91 View Post
NO ONE CAN HELP ME!?
You'll have to define these publication specific metadata entries yourself using refines properties. For more information see the epub3 specs.
Doitsu is offline   Reply With Quote
Old 05-10-2017, 08:08 PM   #209
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: 523
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Quote:
Originally Posted by last1left91 View Post
NO ONE CAN HELP ME!?
Wow, you didn't give me much time to respond. We don't all live in the same timezone, you know!

If you want to add "Edition" to an (EPUB 3) OPF file, I'm guessing that you could do it like this:

<meta property="edition">2nd. Ed.</meta>

(See http://www.idpf.org/epub/31/spec/epub-packages.html, section 3.4.3.4, for more info.)

But reading systems won't recognise it, so the only way you would know it was there would be by looking at the OPF file.

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Old 05-13-2017, 06:58 PM   #210
last1left91
Junior Member
last1left91 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2017
Device: iPad
Quote:
Originally Posted by BenChen View Post
Wow, you didn't give me much time to respond. We don't all live in the same timezone, you know!

If you want to add "Edition" to an (EPUB 3) OPF file, I'm guessing that you could do it like this:

<meta property="edition">2nd. Ed.</meta>

(See http://www.idpf.org/epub/31/spec/epub-packages.html, section 3.4.3.4, for more info.)

But reading systems won't recognise it, so the only way you would know it was there would be by looking at the OPF file.

Sincerely,
Ben.
THANKS A LOT!! SORRY FOR NOT BEING PATIENT ENOUGH!!
last1left91 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
looking for simple metadata editor jdh Workshop 5 06-01-2011 07:27 AM
MetaData editor crutledge Sigil 1 09-30-2010 08:53 AM
PDF MetaData editor =X= Sony Reader 9 04-06-2010 11:48 PM
Is there a simple small metadata editor? fairuza LRF 1 08-17-2009 09:32 AM


All times are GMT -4. The time now is 05:17 AM.


MobileRead.com is a privately owned, operated and funded community.