Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 04-02-2021, 09:49 AM   #16
Boilerplate4U
Enthusiast
Boilerplate4U began at the beginning.
 
Boilerplate4U's Avatar
 
Posts: 38
Karma: 10
Join Date: Jul 2020
Device: Kobo Clara HD
I also found some more non ISBN as well but most without the schema attribute. Since the attribute it optional it's possible to utilize pattern matching testing to identify the different types as they differ quite a lot:

Quote:
ISBN
<dc:identifier opf:scheme="isbn">9780000000001</dc:identifier>

JDCN
<dc:identifier opf:scheme="jdcn">915869090000000000DD</dc:identifier>

UUID (GUID)
<dc:identifier opf:scheme="uuid">50f9f8b1-8a81-4dd5-b104-0766188d7d2c</dc:identifier>
Boilerplate4U is offline   Reply With Quote
Old 04-02-2021, 10:58 AM   #17
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
What are these publishers of yours that dont set scheme? In my experience, they all either specify the scheme or prefix with urn:isbn, both of which calibre will handle. In any case, this will handle it: https://github.com/kovidgoyal/calibr...1f76f8f4394382
kovidgoyal is offline   Reply With Quote
Old 04-02-2021, 08:47 PM   #18
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 Boilerplate4U View Post
According to the standard specifications the scheme attribute seems optional, this is probably the main reason why so many publishers omit it.

"The identifier element has an optional OPF scheme attribute defined by this specification. The scheme attribute names the system or authority that generated or assigned the text contained within the identifier element, for example "ISBN" or "DOI." The values of the scheme attribute are case sensitive only when the particular scheme requires it.

This specification does not standardize or endorse any particular publication identifier scheme. Specific uses of URLs or ISBNs are not yet addressed by this specification. Identifier schemes are not currently defined by Dublin Core
"
You are correct in that the specs say the scheme is optional. But, it also doesn't say anything about what the identifier is when the scheme is not set. And it seems to be saying that if the identifier has a meaning, that it needs the scheme. But, overall, what you are suggesting is complicating the code to check the identifier against all known schemes when the scheme is omitted. Personally, I think that is a bad idea. And, from my experience, and I suspect from Kovid's based on his response, not at all useful.
davidfor is offline   Reply With Quote
Old 04-03-2021, 03:26 AM   #19
Boilerplate4U
Enthusiast
Boilerplate4U began at the beginning.
 
Boilerplate4U's Avatar
 
Posts: 38
Karma: 10
Join Date: Jul 2020
Device: Kobo Clara HD
Quote:
Originally Posted by kovidgoyal View Post
What are these publishers of yours that dont set scheme? In my experience, they all either specify the scheme or prefix with urn:isbn, both of which calibre will handle. In any case, this will handle it: https://github.com/kovidgoyal/calibr...1f76f8f4394382
Wow, before I even started to think about a practical solution. Many thanks!
Boilerplate4U is offline   Reply With Quote
Old 04-03-2021, 03:41 AM   #20
Boilerplate4U
Enthusiast
Boilerplate4U began at the beginning.
 
Boilerplate4U's Avatar
 
Posts: 38
Karma: 10
Join Date: Jul 2020
Device: Kobo Clara HD
Quote:
Originally Posted by davidfor View Post
You are correct in that the specs say the scheme is optional. But, it also doesn't say anything about what the identifier is when the scheme is not set. And it seems to be saying that if the identifier has a meaning, that it needs the scheme. But, overall, what you are suggesting is complicating the code to check the identifier against all known schemes when the scheme is omitted. Personally, I think that is a bad idea. And, from my experience, and I suspect from Kovid's based on his response, not at all useful.
Yeah, the lack of default identifier types sure make it more complex to identify the identifier :-) Kovid's fix now handles "schema"-less isbn ids.
Boilerplate4U is offline   Reply With Quote
Reply

Tags
metadata source plugin, template


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Read a book's metadata in a Metadata source plugin? J-H Development 2 03-30-2021 09:08 AM
[Metadata Source Plugin] wikidata compurandom Plugins 46 11-27-2020 11:32 PM
[Metadata Source Plugin] Empty Plugin? (Fake Identifier) mneimeyer Plugins 3 11-11-2019 08:07 PM
Advice needed for plugin running background thread Phssthpok Plugins 21 01-16-2016 10:31 AM
[Metadata Source Plugin] Amazon.it nandocuci Plugins 2 05-18-2011 02:36 AM


All times are GMT -4. The time now is 07:57 PM.


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