Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-16-2023, 06:42 AM   #1
ShellShock
Wizard
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 1,178
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
Yes/No custom column to automatically show whether a book is in EPUB 3 format?

Is this possible? The column would be automatically updated when adding a new book to Calibre, or when converting it in the Calibre book editor from EPUB 2 to EPUB 3.

I have recently discovered that Calibre stores series numbers as integers in EPUB 3 e.g.,

Code:
<opf:meta refines="#id-2" property="group-position">4</opf:meta>
but uses floats for EPUB 2, e.g.,

Code:
<meta name="calibre:series_index" content="4.0"/>
I prefer the integer format when it really is an integer (and not e.g., 4.1). Thus I am converting my library from EPUB 2 to 3, and it would be handy to easily tell which books are already EPUB 3.


Thanks
ShellShock is offline   Reply With Quote
Old 12-16-2023, 06:47 AM   #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: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
its a float in both. it just serialized as an integer in epub 3 when the floating value is actually integral. And no there is no automatic mechanism for this. But you can just use the upgrade book internals option in the POlish books tool to bulk update all your epub to epub 3 it will do nothing if a file is already epub 3
kovidgoyal is online now   Reply With Quote
Advert
Old 12-17-2023, 10:25 AM   #3
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,211
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
I have a yes/no column for EPUB3 books. Although not automatic, it checks the whole library in just a few seconds using 'Quality Check' plugin.

1) Click the plugin and choose 'Search ePubs...'
2) Use this regex expression:
Code:
xmlns="http://www\.idpf\.org/2007/opf"(.*?)version="3\.0"
3) Mark 'Ignore case', 'Show all occurrences' and choose 'OPF manifest' as scope
4) Click OK
5) It will mark all books on your library that have a EPUB3 format
6) Select all the books and do a batch metadata change, setting the corresponding column to YES

The regex expression and the options will be remembered by the plugin for future use.
thiago.eec is offline   Reply With Quote
Old 12-17-2023, 12:07 PM   #4
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,025
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
You need an integer?
0 = epub2
1 = basic epub3, a reflowable ebook, no interactive and fall backs for epub2 (probably Project Gutenberg epub3 titles).
2 = basic epub3, but no epub 2 index etc, no fallbacks, specific hand crafted epub3 inc math ml. No javascript, transparency, animation, audio or video.
3 = FXL aka Fixed Layout aka Print Replica epub3 imitating a PDF.
4 = Multimedia and/or Interactive epub3. May have javascript, video, audio etc.

Obviously given epub 3 flexibility and features it's more complex. Maybe also the epub3 numbers should start at 2 and 1 should be for Kobo's kepub.

Any reflowable mobi, prc, docx, odt, lit, pdb, lrf, epub2, azw3, kfx or kepub converted automatically with no hand editing is going to be a type 1 epub3.

However these are the broad categories and it's what I would do, if I wanted it.

Last edited by Quoth; 12-17-2023 at 12:13 PM.
Quoth is offline   Reply With Quote
Old 12-18-2023, 02:44 AM   #5
ShellShock
Wizard
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 1,178
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
Quote:
Originally Posted by kovidgoyal View Post
its a float in both. it just serialized as an integer in epub 3 when the floating value is actually integral. And no there is no automatic mechanism for this. But you can just use the upgrade book internals option in the POlish books tool to bulk update all your epub to epub 3 it will do nothing if a file is already epub 3
Thanks, I will try the Polish tool - I had been using bulk convert.
ShellShock is offline   Reply With Quote
Advert
Old 12-18-2023, 02:45 AM   #6
ShellShock
Wizard
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 1,178
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
Quote:
Originally Posted by thiago.eec View Post
I have a yes/no column for EPUB3 books. Although not automatic, it checks the whole library in just a few seconds using 'Quality Check' plugin.

1) Click the plugin and choose 'Search ePubs...'
2) Use this regex expression:
Code:
xmlns="http://www\.idpf\.org/2007/opf"(.*?)version="3\.0"
3) Mark 'Ignore case', 'Show all occurrences' and choose 'OPF manifest' as scope
4) Click OK
5) It will mark all books on your library that have a EPUB3 format
6) Select all the books and do a batch metadata change, setting the corresponding column to YES

The regex expression and the options will be remembered by the plugin for future use.
Great, this is really useful.
ShellShock is offline   Reply With Quote
Old 12-19-2023, 04:27 AM   #7
ShellShock
Wizard
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 1,178
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
I have been using the Polish tool to upgrade epubs from 2 to 3, and there are some differences to how it formats the meta-data, compared to Edit book:

In my epub 2 meta-data the series position was defined in float format like this:

Code:
<meta name="calibre:series_index" content="2.0"/>
I used Polish book, Upgrade book internals to just upgrade from epub 2 to 3:

Code:
Polishing: EPUB
Upgrading book, if possible
Updated EPUB from version 2 to 3
Polishing took: 0.2 seconds
I unzipped the resulting epub to examine the meta-data; the series position is still in float format:

[CODE]<meta refines="#id-2" property="group-position">2.0</meta>/CODE]

I then opened the book in the Calibre editor (Edit book command), which I think silently re-arranges some of the books internals and automatically saves the result (without prompting). When I unzipped the epub again the series position is now in integral format and the tag has acquired an opf namespace:

Code:
<opf:meta refines="#id-2" property="group-position">2</opf:meta>
This explains why I was sometimes seeing float and sometimes integral format for series positions once I had downloaded epubs from Calibre to my reader app (I prefer integral format). It all depended on whether the epub was in version 3 format, and if I had opened it in the Calibre editor.

I like how the epub editor will automatically convert an effectively integral series position (2.0) to an integer (2) - after all, most series positions will be integral. When you do have a sub-position, e.g., 2.1, the editor respects that too.

Please would it be possible to make the Polish tool consistent with the epub editor in this regard?
ShellShock is offline   Reply With Quote
Old 12-19-2023, 05:45 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: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Not something I care about but patches are welcome.
kovidgoyal is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fill automatically a custom book column from full-search text query killo3967 Library Management 5 11-03-2022 02:49 PM
Is there a way to format a custom column to show the date I last rated something? idiom6 Library Management 3 10-23-2020 12:47 AM
How to set value of custom column automatically? steins Plugins 5 12-27-2018 03:23 AM
Plugin or custom column to show GB size of book mom34spartan Plugins 5 07-08-2013 09:07 AM
Custom Column - Book Format (ie mobi, epub etc) jphphotography Calibre 3 01-17-2011 12:34 AM


All times are GMT -4. The time now is 10:30 PM.


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