View Single Post
Old 06-06-2025, 08:09 PM   #2
BeckyEbook
Wizard
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 1,101
Karma: 4000789
Join Date: Jan 2017
Location: Poland
Device: Various
[Plugin] RestoreUnmanifestedFiles

Updated: 28 November 2026
Current Version: 0.1.4
Plugin type: edit

Plugin icon:


Sometimes we don't want to delete unmanifested files at all – quite the opposite, we want them back. That's why this plugin was created.

Think of it as a natural companion to DeleteUnmanifestedFiles – one rescues, the other cleans up, and together they keep your manifest in order.

When Sigil opens an EPUB with files missing from the OPF manifest, it warns that they "will be ignored", but the files stay in the book folder. This plugin lists them and adds the ones you select back to the manifest.

How it works:
  • If the spine still has an itemref pointing to a missing file, the file gets exactly that id, so it also returns to its place in the reading order. Such files are ticked by default.
  • The media type follows the book: if other files with the same extension are already in the manifest, their media type is reused. Files with the .xml extension are recognised by their content (e.g. XHTML chapters saved as .xml).
  • Files that cannot be restored safely are shown, but greyed out: unknown types, an extra NCX in EPUB 2, and fonts that are still obfuscated or that Sigil has already loaded from encryption.xml.
  • Like DeleteUnmanifestedFiles, it skips mimetype, the OPF and everything in the META-INF folder.

Important:
  • In default mode, the plugin shows a list of unmanifested files and changes nothing until you confirm.
  • In automatic mode (triggered by Automation Lists), the plugin only reports. Put SetPluginParameter restore before it to restore files that have an orphaned spine itemref – nothing else.
  • Tip: run RestoreUnmanifestedFiles first, then DeleteUnmanifestedFiles to remove what is left.
  • Plugin supports Sigil 2.0.0 versions and later.

Credits/Thanks:
Installation:
  1. Select Manage Plugins from the Plugins menu and select Use Bundled Python, if it isn't already selected.
  2. Click Add Plugin and select RestoreUnmanifestedFiles_v0.1.4.zip. This will install the RestoreUnmanifestedFiles edit plugin, which you can select via Plugins > Edit > RestoreUnmanifestedFiles.

License: GNU General Public License v3 (GPL-3)
Attached Thumbnails
Click image for larger version

Name:	sigil-plugin-restoreunmanifestedfiles-v014.png
Views:	0
Size:	17.6 KB
ID:	227724  
Attached Files
File Type: zip RestoreUnmanifestedFiles_v0.1.4.zip (10.6 KB, 0 views)

Last edited by BeckyEbook; Today at 06:31 PM.
BeckyEbook is offline   Reply With Quote