![]() |
#1 |
Member
![]() Posts: 22
Karma: 10
Join Date: Jul 2019
Device: Kindle Paperwhite, Galaxy Tab S2 8.0
|
question about epub opf file
Is there a way to not include the
<meta name="calibre:user_metadata .... entries in the opf. I would like to retain the dc: entries and the <meta content entries. Also is there a batch way to strip the <meta name="calibre:user_metadata .... out of my epubs. I know the excellent Modify ePub plugin has an option to remove non dc: elements but this will strip out the series information that I need as well. |
![]() |
![]() |
![]() |
#2 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 191
Karma: 266070
Join Date: Dec 2010
Location: Spain
Device: Win10,Win11,Ubuntu,PockbookLux44
|
Comment + suggestion:
1. The .opf file of a book should not/could not be changed: it contains the data to restore the calibre database in case of accident (or so I understand) 2. How those data are copied to an .epub by convert/polish->update metada is another question. There, I would like as well to delete the user information, AFTER having employed some of my <meta name="calibre:user_metadata:#customized"... . For instance: <meta name="calibre:user_metadata:#ordate"...content... "__value__": "{date}" -> <dc:date opf:event="creation">{date}</dc:date> I suspect this would require a plug-in, but I don't know where to begin--a template to get started? |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
2. The .opf files in the book are built from the content of the database, as are the metadata.opf files. But, don't equate the .opf file in the book and the metadata.opf file in the book folders. Whilst they have similarities they serve different purposes. And what's in the book will not reflect what's in the database if you don't Polish, Modify or Convert (ePub to ePub), but the metadata.opf file in the book folder will** always reflect what's in the database. **if you do a bulk edit to many books, the updating of the metadata.opf files in the book folders happens in a low priority background task that may take a while to catch up. BR |
|
![]() |
![]() |
![]() |
#4 | |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 191
Karma: 266070
Join Date: Dec 2010
Location: Spain
Device: Win10,Win11,Ubuntu,PockbookLux44
|
Quote:
|
|
![]() |
![]() |
![]() |
#5 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
You can use the Modify ePub plugin to strip the metadata back to Dublin Core elements - i.e. those prefixed by dc:.
The Sigil ePub editor has a GUI tool to add, change, delete metadata items within the embedded .opf, being a minimalist I use it to remove dc:description and dc:subjects. Beyond that you can edit the embedded .opf with a text editor or one of the ePub editors. Or you can write, or hack an existing, plugin to meet your specific wants. Take care BR |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,511
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
I wonder if this tool might help. https://www.mobileread.com/forums/sh...d.php?t=132607
|
![]() |
![]() |
![]() |
#7 |
Member
![]() Posts: 22
Karma: 10
Join Date: Jul 2019
Device: Kindle Paperwhite, Galaxy Tab S2 8.0
|
my main libraries are all epub only on onedrive, convert as needed then delete the other formats. So batch editing of opf would be ideal to remove all the opf mess excepting dc elements and series name and index.
|
![]() |
![]() |
![]() |
#8 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,181
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Also remember that when you save your epub to disk or send to a device, the metadata will be updated from calibre's metadata.opf file. Last edited by DNSB; 04-10-2020 at 11:00 AM. |
|
![]() |
![]() |
![]() |
#9 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
The metadata embedded into the file that is Saved or Sent will be taken from the database library metadata.db file, if you just did bulk update the update of the metadata.opf file could still be in the lazy write queue. BR |
|
![]() |
![]() |
![]() |
#10 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,181
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
It's a lot easier to look at the metadata.opf compared to browing the database file. Last edited by DNSB; 04-10-2020 at 06:18 PM. |
|
![]() |
![]() |
![]() |
#11 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
![]() FWIW I find it easier to press 'I' on a book to see all of its metadata. BR |
|
![]() |
![]() |
![]() |
#12 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,181
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Hitting 'I' doesn't show me all the metadata I'm interested in. Such items as are fonts correctly identified and does the titlepage entry have the svg properties set. Yeah, I know. That's what epubcheck is for. |
|
![]() |
![]() |
![]() |
#13 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
I didn't know the metadata.opf had font and other typographical artefacts in it. I mainly buy books for their content rather than their looks so I don't look for that stuff, except to delete it. I say mainly, because I did buy one book based purely on its appearance, it wasn't an ebook, it caught my eye on a remainder table.
BR |
![]() |
![]() |
![]() |
#14 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
![]() 'I' shows CALIBRE (db) metadata in full content.opf (part of the book) contains the structure as well as metadata. embedded fonts is STRUCTURE. Note the Quality check PI opens the books content,opf to determine fonts embedded. It does not enumerate which ones |
|
![]() |
![]() |
![]() |
#15 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,181
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to change markup in content.opf when importing .epub file? | Tom11880 | Library Management | 3 | 12-29-2018 06:21 AM |
ePub3 to Mobi Error - Error(prcgen):E21027: Epub file has more than one opf file | dtsmith | Kindle Formats | 4 | 01-30-2018 11:20 AM |
TWO OPF files or something like Media Queries in the OPF file for KF8 and MOBI? | DHahn | Kindle Formats | 3 | 04-17-2012 04:06 AM |
ePub OPF file error | soulartist | ePub | 4 | 10-03-2011 05:09 PM |
Complete newbie to epub/opf question | PeterHanes | Workshop | 3 | 11-27-2010 05:01 AM |