Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 10-05-2021, 01:20 PM   #1
Grimaud
Guru
Grimaud could sell banana peel slippers to a Deveel.Grimaud could sell banana peel slippers to a Deveel.Grimaud could sell banana peel slippers to a Deveel.Grimaud could sell banana peel slippers to a Deveel.Grimaud could sell banana peel slippers to a Deveel.Grimaud could sell banana peel slippers to a Deveel.Grimaud could sell banana peel slippers to a Deveel.Grimaud could sell banana peel slippers to a Deveel.Grimaud could sell banana peel slippers to a Deveel.Grimaud could sell banana peel slippers to a Deveel.Grimaud could sell banana peel slippers to a Deveel.
 
Grimaud's Avatar
 
Posts: 748
Karma: 3000
Join Date: May 2009
Device: PRS-505, PRS-600, PRS-650
Question How to add ISBN to an EPUB file, to have it visible on my Elipsa?

Hello,

I’m working on a Bash script to create an EPUB with proper metadata, from a directory full of pictures, in other words, manga and comics, because official EPUBs are not always that great, some are even so badly formatted that spreads are not working correctly .

Following advice from friends and looking at examples – either from the official EPUB websites, EPUB I purchased myself or using Sigil to have examples – , I’m including the ISBN and a unique ID randomly generated with uuidgen.

As far as epubcheck is concerned, my Frankenstein code is valid – no error, no alert, nothing – and kepubify doesn’t report any error either, but my Kobo Elispa doesn’t show the ISBN while the rest of my EPUB metadata are shown – thanks to nickel series .

I thought, after reading an old message from davidfor that I only needed to make sure that the ISBN was the first dc:identifier, but despite changing my script to do so, my Elipsa is still not showing the ISBN.

The content.opf of my EPUB looks like that and the ISBN is the real ISBN from that book but no ISBN is shown by my Elipsa.
Code:
<?xml version="1.0" encoding="utf-8"?>
<package version="3.0" unique-identifier="pub-id" id="package" prefix="rendition: http://www.idpf.org/vocab/rendition/# cc: http://creativecommons.org/ns#" xml:lang="fr" xmlns="http://www.idpf.org/2007/opf">
  <metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
    <dc:identifier id="isbn-id">urn:isbn:9782811622077</dc:identifier>
    <meta property="identifier-type" refines="#isbn-id" scheme="onix:codelist5">15</meta>
    <dc:identifier id="pub-id">urn:uuid:CC8757AF-657B-4CBB-BF2F-45252FAAABAB</dc:identifier>
    <meta property="identifier-type" refines="#pub-id" scheme="xsd:string">uuid</meta>
toc.ncx
Code:
<?xml version="1.0" encoding="utf-8"?>
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">
	<head>
		<meta name="dtb:uid" content="urn:uuid:CC8757AF-657B-4CBB-BF2F-45252FAAABAB"/>
I also tried with only an ISBN but the same problem happened: no ISBN shown by the Elipsa

Content.opf
Code:
<?xml version="1.0" encoding="utf-8"?>
<package version="3.0" unique-identifier="isbn-id" id="package" prefix="rendition: http://www.idpf.org/vocab/rendition/# cc: http://creativecommons.org/ns#" xml:lang="fr" xmlns="http://www.idpf.org/2007/opf">
  <metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
		<dc:identifier id="isbn-id">urn:isbn:9782811621957</dc:identifier>
		<meta property="identifier-type" refines="#isbn-id" scheme="onix:codelist5">15</meta>
toc.ncx
Code:
<?xml version="1.0" encoding="utf-8"?>
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">
	<head>
		<meta name="dtb:uid" content="urn:isbn:9782811621957"/>
Ideally, I would like to avoid using Calibre, because dragging and dropping my EPUB files to my Elipsa is faster than using Calibre. And it’s also using less space because I don’t keep the kepub files after that: I’m only keeping the images, downscaled by my computer, the rest can be recreated in a couple of seconds.

I'm sure it's a simple mistake on my part (I did plenty working on that script ), but if someone knows which one, I'm all hears

Grimaud is offline   Reply With Quote
Old 10-05-2021, 08:24 PM   #2
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
None of those look to be valid ways of defining the ISBN in the OPF. At least, they are not how calibre does them. Personally, I don't care about the ISBN on the device, as there is no use for it there, so I haven't checked it for a while (and honestly, other than an identifier to help get metadata, it's pretty useless). But, testing it now, what calibre puts in works.

For epub 2, this is:

Code:
<dc:identifier id="isbn" opf:scheme="isbn">9781780891231</dc:identifier>
That does have the "unique-identifier" set to "isbn" in the package, but, that is not necessary.

For epub 3, it is:

Code:
<dc:identifier>isbn:9780515135282</dc:identifier>
The device read both of those as the ISBN and displays them in the details.

And the above works fro sideloaded kepubs as well.
davidfor is offline   Reply With Quote
Advert
Old 10-05-2021, 09:01 PM   #3
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,177
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
See if https://github.com/kobolabs/epub-spec helps; I do see some mention of metadata for the ISBN there.

Sent from my Pixel 4a using Tapatalk
PeterT is offline   Reply With Quote
Old 10-07-2021, 12:20 PM   #4
Grimaud
Guru
Grimaud could sell banana peel slippers to a Deveel.Grimaud could sell banana peel slippers to a Deveel.Grimaud could sell banana peel slippers to a Deveel.Grimaud could sell banana peel slippers to a Deveel.Grimaud could sell banana peel slippers to a Deveel.Grimaud could sell banana peel slippers to a Deveel.Grimaud could sell banana peel slippers to a Deveel.Grimaud could sell banana peel slippers to a Deveel.Grimaud could sell banana peel slippers to a Deveel.Grimaud could sell banana peel slippers to a Deveel.Grimaud could sell banana peel slippers to a Deveel.
 
Grimaud's Avatar
 
Posts: 748
Karma: 3000
Join Date: May 2009
Device: PRS-505, PRS-600, PRS-650
Thank you both for your answers
Quote:
Originally Posted by davidfor View Post
None of those look to be valid ways of defining the ISBN in the OPF. At least, they are not how calibre does them.


I read them in examples from EPUB 3.2 specifications (like this one) and creating a fake book with Sigil also suggested the same way of definining it. I don’t think any of them would explain an invalid way of defining an ISBN inside an opf file.

Quote:
Originally Posted by davidfor View Post
For epub 3, it is:

Code:
<dc:identifier>isbn:9780515135282</dc:identifier>
The device read both of those as the ISBN and displays them in the details.

And the above works fro sideloaded kepubs as well.
After a small modification (the unique-identifier tag is mandatory according to epubcheck), it did work with a side loaded epub, but didn’t with the same epub ‘kepubified’, even after asking for a full scan with NickelMenu

Code:
<package version="3.0" id="package" unique-identifier="isbn" xml:lang="fr" xmlns="http://www.idpf.org/2007/opf">
  <metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
		<dc:identifier id="isbn">isbn:9791039102759</dc:identifier>
Quote:
Originally Posted by PeterT View Post
See if https://github.com/kobolabs/epub-spec helps; I do see some mention of metadata for the ISBN there.
I didn’t know about that page. I’ll try to ask them, maybe they will have a bit of time to give me an answer

Edit : I tested my first way of doing it one more time. With a side loaded .epub (something I didn't tried before), the urn:isbn:[isbn] is shown. With a kepubifyed epub, nope, nothing, what's an ISBN, etc

I tried with the exact same epub, only changing the extension from epub to kepub.epub: my Elipsa is able to read the ISBN from the .epub file, but unable from the .kepub.epub (which unlike previous tests where I used Kepubify, here, my .kepub.epub is litteraly the exact same file, except for the extension)

Last edited by Grimaud; 10-07-2021 at 02:02 PM. Reason: A couple of tests.
Grimaud is offline   Reply With Quote
Old 10-08-2021, 12:07 AM   #5
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Grimaud View Post


I read them in examples from EPUB 3.2 specifications (like this one) and creating a fake book with Sigil also suggested the same way of definining it. I don’t think any of them would explain an invalid way of defining an ISBN inside an opf file.
Nowhere has Kobo said they support the EPUB 3.2 specs. And, I wouldn't be surprised if no ereader or ereading app did. There isn't that much point as yet as it will be rare in actual books.
Quote:
After a small modification (the unique-identifier tag is mandatory according to epubcheck), it did work with a side loaded epub, but didn’t with the same epub ‘kepubified’, even after asking for a full scan with NickelMenu

Code:
<package version="3.0" id="package" unique-identifier="isbn" xml:lang="fr" xmlns="http://www.idpf.org/2007/opf">
  <metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
		<dc:identifier id="isbn">isbn:9791039102759</dc:identifier>
The unique-identifier tag is mandatory for one dc:identifier in the OPF. It doesn't have to be the ISBN. And there is at least one line in there that suggests it shouldn't be. In any case, I was copying lines from books I have that work for a Kobo device to read the ISBN when importing the books.
Quote:
I didn’t know about that page. I’ll try to ask them, maybe they will have a bit of time to give me an answer
That page isn't really useful for this. It is about how to prepare books to be loaded to Kobo's CMS and sold through the store. I do not believe there is anything in it about how metadata is read from sideloaded books.
Quote:
Edit : I tested my first way of doing it one more time. With a side loaded .epub (something I didn't tried before), the urn:isbn:[isbn] is shown. With a kepubifyed epub, nope, nothing, what's an ISBN, etc

I tried with the exact same epub, only changing the extension from epub to kepub.epub: my Elipsa is able to read the ISBN from the .epub file, but unable from the .kepub.epub (which unlike previous tests where I used Kepubify, here, my .kepub.epub is litteraly the exact same file, except for the extension)
It would have been a good idea to say what format you were sending to the device. Your first post makes no mention of kepub. I think anyone who read it would assume you were sideloading epubs. I definitely did. And the only reason I tested kepubs was because I couldn't remember what happened. And the test I did was the simple rename as well.

But, there is no real reason to expect the same results for both epubs and kepubs. They are different formats, follow different specs and are handled by completely different code. Epubs will be handled by the Adobe RMSDK, so you get whatever that supports. Kepubs are handled by something else, and as sideloaded kepubs are not officially supported, there is no way to actually know what should be done with them.
davidfor is offline   Reply With Quote
Advert
Old 10-08-2021, 12:40 AM   #6
Semwize
Guru
Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.
 
Posts: 873
Karma: 252902
Join Date: Jun 2016
Device: Kobo
@davidfor

kepub doesn't really show the ISBN in detail. I can't remember if it showed in the old firmware... and I'm just too lazy to roll back the firmware for verification.
Semwize is offline   Reply With Quote
Old 10-08-2021, 02:31 AM   #7
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Semwize View Post
kepub doesn't really show the ISBN in detail. I can't remember if it showed in the old firmware... and I'm just too lazy to roll back the firmware for verification.
It was something I explicitly tested yesterday. And I'm sure that it was read from the kepubs. But, trying again now, it didn't work. Now I'm not sure which device or books I tried yesterday
davidfor is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"Add from ISBN" adds empty entry for valid ISBN halloleo Library Management 7 07-16-2021 10:47 PM
Add ISBN to a PDF Axell Conversion 0 06-20-2015 05:48 PM
mobile add from isbn goge Development 25 05-08-2015 08:16 AM
How to add downloaded epub file to Kobo desktop library (not the reader)? pdxesto Kobo Reader 8 06-17-2014 04:09 PM
add css file to epub conversion VICTORSJG Calibre 0 09-21-2011 07:38 AM


All times are GMT -4. The time now is 09:01 AM.


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