Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 05-16-2020, 11:16 AM   #1
sirtao
Member
sirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura about
 
Posts: 20
Karma: 4388
Join Date: Jan 2013
Device: Pocketbook Touch HD
[Pocketbook][epub2][Metadata] Attributes order

Hello! I haven't find anything searching, so I'm writing this post.

In short: sometimes Calibre adds the Series metadata to ePub2 files as

Code:
  <meta content="Series Title" name="calibre:series"/>
  <meta content="1.0" name="calibre:series_index"/>
instead of
Code:
  <meta name="calibre:series" content="Series Title"/>
  <meta name="calibre:series_index" content="1.0"/>

This makes the Series metadata of the affected books be unable to be read by Pocketbook devices.

As I haven't yet managed to find the trigger, and since apparently this is a very old issue Pocketbook never bothered to deal with, there is a way to force Calibre to write the Nema attribute first and the Content attribute next?

Thanks you for the attention.
sirtao is offline   Reply With Quote
Old 05-16-2020, 01:38 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Not really attribute order in XML is arbitrary. You could add some code to calibre to force it, similar to what is done with <meta name="cover" content="xxx">

calibre uses lxml and that de-facto preserver attribute order. so you first delete the existing attributes and then reset them in the proper order.
kovidgoyal is offline   Reply With Quote
Advert
Old 05-22-2020, 07:47 AM   #3
sirtao
Member
sirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura about
 
Posts: 20
Karma: 4388
Join Date: Jan 2013
Device: Pocketbook Touch HD
Quote:
Originally Posted by kovidgoyal View Post
Not really attribute order in XML is arbitrary. You could add some code to calibre to force it, similar to what is done with <meta name="cover" content="xxx">
Modifying the source code you mean?

or there is some configuration file I can edit?
sirtao is offline   Reply With Quote
Old 05-22-2020, 07:56 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
source code.
kovidgoyal is offline   Reply With Quote
Old 05-22-2020, 08:47 AM   #5
sirtao
Member
sirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura about
 
Posts: 20
Karma: 4388
Join Date: Jan 2013
Device: Pocketbook Touch HD
I'll have to study the code, find where is the cover code and develop a way to replicate it for the series metadata, then.

Wish I was still in quarantine lol

Thanks
sirtao is offline   Reply With Quote
Advert
Old 05-22-2020, 08:57 AM   #6
eMole
Zealot
eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.
 
Posts: 130
Karma: 546310
Join Date: Jun 2011
Device: PocketBook Touch HD, PocketBook Era
Admittedly I'm not using the latest version of calibre, but by adding an empty epub book to a series produces such series metadata for me. No big deal.
eMole is offline   Reply With Quote
Old 05-22-2020, 09:46 AM   #7
sirtao
Member
sirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura aboutsirtao has a spectacular aura about
 
Posts: 20
Karma: 4388
Join Date: Jan 2013
Device: Pocketbook Touch HD
Quote:
Originally Posted by eMole View Post
Admittedly I'm not using the latest version of calibre, but by adding an empty epub book to a series produces such series metadata for me. No big deal.
Sorry if I'm dumb: Do you mean adding an empty book in a series automatically updates the metadata on the other books in the series changing the order of the attributes to "name" and then "content"?


That said, to be fair this is more a Pocketbook firmware issue than a Calibre one.
I should pester them


still thank you a lot
sirtao is offline   Reply With Quote
Old 05-22-2020, 10:40 AM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There are a fair number of places metadata is written to epubs, but assuming you are using the send to device button in calibre, you would probably only need to change it in opf2.py
kovidgoyal is offline   Reply With Quote
Reply

Tags
epub2, metadata, pocketbook, series


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] Epub2LegacyMetaData - legacy epub2 metadata editor Doitsu Plugins 24 07-21-2021 05:59 AM
tag attributes in random order guich Sigil 6 11-14-2019 09:06 AM
Lesser used Dublin Core Metadata and Attributes Nabodita ePub 14 06-27-2017 07:08 PM
Change metadata order when sending epub to device (Pocketbook 626) Cmely Devices 0 09-03-2015 03:53 AM
refined metadata in epub2? mzmm ePub 2 11-14-2012 01:52 PM


All times are GMT -4. The time now is 12:02 PM.


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