|
|
Thread Tools | Search this Thread |
01-08-2020, 11:59 PM | #1 |
Member
Posts: 22
Karma: 10
Join Date: Mar 2018
Device: Kindle Voyage
|
Automatic cover page - based on metadata from content.opf (EPUB/AZW3)
Hello it is possible to use metadata field from content.opf:
<dc:title>Example</dc:title> <dc:creator opf:role="aut" opf:file-as="AUTHOR NAME">AUTHOR NAME</dc:creator> <dc:description>Example text</dc:title>``` And use them in html file? <body> <book_title> %(title) </book_title> <book_autor> %(creator) </book_autor> <book_desk> %(description) </book_desk> </body> How to refer to this metadata? |
01-09-2020, 03:25 PM | #2 |
Resident Curmudgeon
Posts: 73,998
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Sorry, but you cannot do what you want.
|
Advert | |
|
01-10-2020, 01:25 AM | #3 |
Member
Posts: 22
Karma: 10
Join Date: Mar 2018
Device: Kindle Voyage
|
Do you know any details about other solution?
Or can you elaborate why it is not possible? Thanks a lot! |
01-10-2020, 06:12 AM | #4 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Theoretically, it'd possible to parse content.opf with an XMLHttpRequest, however, this would only work with epub3 files and only if the epub app supports Javascript.
Have you tried the Calibre cover generator (Edit metadata > Generate cover)? |
01-10-2020, 07:51 AM | #5 |
Member
Posts: 22
Karma: 10
Join Date: Mar 2018
Device: Kindle Voyage
|
I was thinking to create fully independent and automatic cover template. Without any external tools. Put simple reference from the metadata file into html... After that simply changing the metadata, the change should be visible in cover as well, because it is using only reference to field from metadata file not "hardcoded" string.
|
Advert | |
|
01-10-2020, 08:37 AM | #6 | |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
|
|
01-10-2020, 12:16 PM | #7 |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Even if you could make it work, metadata is part of the head element, not the body.
Dale |
01-10-2020, 02:37 PM | #8 |
Running with scissors
Posts: 1,552
Karma: 14325282
Join Date: Nov 2019
Device: none
|
Not entirely automated but there's the Calibre plugin, Generate Cover:
https://www.mobileread.com/forums/sh...e+cover+plugin The 3rd tab in its Options window named Contents has a checkbox Custom Text. Now all you need is an easy way to copy the desired metadata so that you can paste it there. |
Tags |
azw3, epub, html, metadata |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
having metadata.opf, cover.jpg + title.[pdf|epub|..] what's the best function to use? | kabirmaar | Development | 2 | 06-21-2017 03:33 PM |
Problem adding metadata (.opf, .mobi, .azw3) | mobilemax | Library Management | 3 | 04-27-2016 11:29 AM |
Are cover.jpg and metadata.opf files included with Book.azw3 important? | omareg94 | Amazon Kindle | 13 | 02-11-2015 06:11 AM |
Converting ePub > AZW3 so the cover shows up as the first page | JSWolf | Kindle Formats | 5 | 06-30-2014 01:52 PM |
Cover in ADE is first page, and not according to metatag set in content.opf? | Klip | ePub | 4 | 09-27-2012 07:02 AM |