|
|
#1 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 257
Karma: 2000
Join Date: Nov 2025
Device: none
|
How to auto add items into OPF?
Recently I opened a book I merged with Calibre, but I found lot's of images missing, then I open the file in Sigil to find there are no such image in Images folder.
But there are certainly pic in the original file, so I found it, open in Sigil, then I found that it does have the pic, the link is right, it's just not listed in OPF file. So they all get ditched when merging. So I wounder is there a way to auto add these unlisted but valid used items to OPF file? Last edited by icearch; Yesterday at 02:32 PM. |
|
|
|
|
|
#2 |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 56,060
Karma: 182882152
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
If you are using calibre, you can use the Modify ePub plugin with the Add unmanifested files to manifest option checked and then check this worked correctly before merging the files. Quick question would be if you are manually merging them or using calibre's EpubMerge plugin? I've been avoiding that plugin since it is not happy with ePub3 files.
|
|
|
|
|
|
#3 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,322
Karma: 7640672
Join Date: Nov 2009
Device: many
|
1. In Sigil, take original epub and unzip it. Move the unmanifested files to a folder you create outside the epub. Then save the epub.
2. Open epub in Sigil. Drag and drop your folder's contents onto Sigil's Drop Target. Or use Sigil's Add Existing menu and navigate to your folder and select the files. All links will be preserved using that approach. Last edited by KevinH; Yesterday at 07:36 PM. |
|
|
|
|
|
#4 | |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 257
Karma: 2000
Join Date: Nov 2025
Device: none
|
Quote:
I use the EpubMerge plugin, since I want to save some time. As to epub3 files, personally I didn't find any noticeable difference, maybe I do not use epub3 specific features, or the plugin have imporved since. Last edited by icearch; Yesterday at 11:28 PM. |
|
|
|
|
|
|
#5 | |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 257
Karma: 2000
Join Date: Nov 2025
Device: none
|
Quote:
|
|
|
|
|
|
|
#6 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,322
Karma: 7640672
Join Date: Nov 2009
Device: many
|
Then write a plugin. There is already a DeleteUnmanifestedFiles plugin you could use as a model to create a SaveUnmanifestedFiles plugin.
But as I noted, in most cases these Unmanifested files are created by deletions that people made directly in the OPF where they forgot to delete the files themselves. Sigil's file delete properly handles both. But many editors do not. That is why a DeleteUnmanifestedFiles plugin exists for Sigil in the first place! In your case it appears to be caused by a bad merge or poorly made epubs that do not properly update the OPF when adding files. So If you want an easier approach without a plugin then unzip the epub and then use Sigil's Add Existing to add all of its xhtml files to a new empty epub in one go, and Sigil will pull in all linked images and linked css, properly creating and updating the opf. I am sure calibre can do the same. By spec, only the files that exist in the OPF manifest are part of the epub's readable contents. Last edited by KevinH; Today at 09:22 AM. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Vanishing auto add books during import, books left behind in auto add folder | jataadroid | Library Management | 9 | 01-15-2018 12:43 AM |
| Is this possible: Auto-add book/magazine then auto e-mail to device? | runningwithbulls | Library Management | 5 | 09-10-2012 01:27 PM |
| Possible tweak: Stop auto-collapsing browser nested items | arspr | Calibre | 7 | 04-06-2011 05:09 PM |
| News items not auto-emailing to Kindle | KenAdam | Calibre | 7 | 01-05-2011 03:17 PM |
| Bug: Can't add items to the library and existin items corrupted | ckole | enTourage Archive | 11 | 04-16-2010 02:13 AM |