View Single Post
Old 09-13-2021, 10:22 AM   #1
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,893
Karma: 6120478
Join Date: Nov 2009
Device: many
[Plugin] Template2 and Template3 - make use of template epubs easier

Updated: September 13, 2021

Current Versions: "0.2.0"

See the Attached: Template2_v020.zip and/or Template3_v020.zip

Changes
- version 0.2.0 - Added in plugin icons contributed by BeckyEbook
- version 0.1.0 - initial release

License/Copying: GNU LGPL Version 2 or Version 3, your choice. Any other license terms are only available directly from the author in writing.

Minimum Sigil Version: support for this plugin is provided for Sigil 1.0.0 and later using the Python 3.4 or later Python interpreter.


Purpose
The purpose of these plugins to to make it easier to use a template epub (either epub2 or epub3) as the starting point while properly handling the unique id requirements of all epubs.

How it Works
Simply create a "template2" and/or "template3" folder(s) inside your Sigil Preferences Directory (for epub2 and epub3 respectively). To easily access that directory you can open Sigil's Preferences and use the "Open Preferences Location" button on the bottom left of the Preferences dialog.

Inside the newly created folder(s) unzip your template epub or use the FolderOut plugin to save an existing epub to this folder to become your template.

To load your template, launch the Template2 (for epub2) or Template3 (for epub3) plugin and it will properly update the unique id in your OPF and if needed in your NCX.

Limitations ...
Since unzipped files in open folders can be changed by other tools, any embedded fonts are stored unobfuscated and these plugins will refuse to work with folders that have an encryption.xml file present in the META-INF folder to prevent obfuscation/unobfuscation mismatches from destroying the font files. Before producing the final epub using Sigil (or any other software), the proper embedded font subsetting and/or obfuscating should be performed depending on the license of the fonts embedded.
Attached Files
File Type: zip Template2_v020.zip (15.1 KB, 1241 views)
File Type: zip Template3_v020.zip (15.2 KB, 1555 views)

Last edited by KevinH; 09-13-2021 at 11:32 AM.
KevinH is offline   Reply With Quote