MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   ePub (https://www.mobileread.com/forums/forumdisplay.php?f=179)
-   -   Cross-reference/index/quote/metadata (https://www.mobileread.com/forums/showthread.php?t=329728)

Evil Overlord 05-08-2020 05:28 PM

Cross-reference/index/quote/metadata
 
I have a simple issue I'm sure has been solved, but I don't seem to be phrasing my searches right.

In short, I want to enter data once, and then quote/refer to it in the visible text of a page. Specifically, I want to enter ISBN numbers once and refer to them in two different places. One ISBN number will be for the e-book edition (and thus is in the opf metadata), and the other is for the paperback edition (and thus is not in the metadata).

It seems like I could create a custom metadata field to use for the paperback ISBN, but in any case, I can't figure out how to echo that data back in my selected location.

Suggestions welcome, inc. pointers to threads that solve this.

Turtle91 05-09-2020 10:03 AM

As far as I know you can't 'reference' metadata within the document. Metadata is for the device/app to read.

What's wrong with a simple copy/paste?? K.I.S.S. philosophy is the best philosophy as far as ePubs are concerned.

Doitsu 05-09-2020 10:47 AM

Quote:

Originally Posted by Evil Overlord (Post 3986237)
It seems like I could create a custom metadata field to use for the paperback ISBN, but in any case, I can't figure out how to echo that data back in my selected location.

Theoretically, it might be possible to use JavaScript in epub3 books to extract metadata information, but, IMHO, that'd be overkill.

Quoth 05-10-2020 08:23 AM

There can easily be several to many paperback ISBNs.
Same edition in different formats (sizes such as Trade, Mass market).
Same edition with a different publisher. Can occur serially (author changes publisher) or simultaneously (Publishers with restricted regions).
Slight changes that you'd think of as a full edition issue (even if just typos, commas) can result in a new ISBN.
The ebook might not exactly match ANY paperback or hardback edition!

Hitch 05-10-2020 05:56 PM

Quote:

Originally Posted by Turtle91 (Post 3986458)
As far as I know you can't 'reference' metadata within the document. Metadata is for the device/app to read.

What's wrong with a simple copy/paste?? K.I.S.S. philosophy is the best philosophy as far as ePubs are concerned.

Yup, as Turtle says, I've never seen or stumbled across or been able to code any way to "get" or fetch metadata and display it inside an eBook.

Believe me, I wish I could. I waste more damn time, with customers, giving me the wrong freaking ISBNs and then having to go fix them in 3+ places. I wish there was a simple, one-step solution, but there isn't any way, even inside an eBook, really (never mind in the meta) to enter something once (other than an image) and then have it fetched and displayed.

(Yes, as Doits says, there might be a way in ePUB3, but as he also says, it's overkill.)

Sorry.

Hitch

JSWolf 05-12-2020 10:35 AM

Quote:

Originally Posted by Doitsu (Post 3986468)
Theoretically, it might be possible to use JavaScript in epub3 books to extract metadata information, but, IMHO, that'd be overkill.

And it might not work in a number of cases plus it would not be backwards compatible.

DaleDe 05-12-2020 02:30 PM

While this is not the requested solution I do like this metadata tool EPub Metadata Editor for viewing a fixing the metadata itself.

Dale

BetterRed 05-12-2020 07:16 PM

@Evil Overlord - have a look at the Function mode for Search & replace in the Calibre Editor.

Quote:

The metadata argument

This represents the metadata of the current book, such as title, authors, language, etc. It is an object of class calibre.ebooks.metadata.book.base.Metadata. Useful attributes include, title, authors (a list of authors) and language (the language code).
BR

Evil Overlord 05-15-2020 01:10 PM

Thanks for the input, all.
As many have noted, none of these really solves the issue without substantial overkill, so I'll just write this off as 'there is no good solution'. That's an answer, so that's helpful.

For those who questioned the need - I produced a book/month, and presently refer to the ISBN in two places in each. An automated system would reduce the risk of not entering the ISBN as required, which currently requires pasting in several places - the metadata, a title page reference (potentially to other ISBNs as well - e-book, paperback, hardcover), and a copyright page reference. These aren't all required, of course, but fit my preferences. It would have been easiest to just enter the data once and let it replicate (as is possible in my ODT document), but if it can't be done, it can't be done (easily). The search and replace is the closest practicable answer, and the one I've been using.

Doitsu 05-16-2020 02:35 AM

Quote:

Originally Posted by Evil Overlord (Post 3988580)
For those who questioned the need - I produced a book/month, and presently refer to the ISBN in two places in each. An automated system would reduce the risk of not entering the ISBN as required, which currently requires pasting in several places [...]

If you have basic programming skills, you could also write a Sigil/Calibre Python plugin to automate this task.


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

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.