Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-24-2021, 03:13 PM   #1
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,587
Karma: 14328510
Join Date: Nov 2019
Device: none
templates

In my epub folder I have a folder named templates and in that I have my one and only template, template.epub which is what I start with when I'm starting a new conversion cleanup of a PD book. It's a minor inconvenience to have to either navigate to that folder to open it or navigate to it from the open menu.

Sometimes it's in the recently opened files list. I was wondering if there could be a sticky list of files below the recently opened files list where I could put this template.epub file. Files in this list would need to be manually added or removed from the list.
hobnail is offline   Reply With Quote
Old 08-24-2021, 03:30 PM   #2
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,764
Karma: 6000000
Join Date: Nov 2009
Device: many
Probably easier to create an input plugin that is hardcoded to load that epub. It would only be a few lines of code.

Then just click a button to run the plugin and off you go.

Another alternative is to keep an alias or symbolic link of that epub on your Desktop and drag and drop it on Sigil to start Sigil with that epub more easily.

Last edited by KevinH; 08-24-2021 at 03:42 PM.
KevinH is online now   Reply With Quote
Advert
Old 08-25-2021, 09:45 AM   #3
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,353
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
There are a couple options that I've used:

1) You can add template files, such as a cover page, into the sigil folder. When you click to add a cover, it will automatically use that template cover.

2) You can create a blank epub with all the files you wish already setup (like your template file), then create a shortcut to that file. Use the shortcut to open Sigil, then "Save As" to give it a new name without changing the template.
Turtle91 is offline   Reply With Quote
Old 08-27-2021, 12:36 PM   #4
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by hobnail View Post
I was wondering if there could be a sticky list of files below the recently opened files list where I could put this template.epub file. Files in this list would need to be manually added or removed from the list.
You might find my simple EpubTemplate plugin helpful.
Doitsu is offline   Reply With Quote
Old 08-27-2021, 04:18 PM   #5
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Doitsu View Post
You might find my simple EpubTemplate plugin helpful.


Or what I do is have a "template folder" that I always import.

It has all my usual files in there:

- template.css
- tempcover.jpg
- titlepage.xhtml
- copyright.xhtml
- [...]
- backmatter.xhtml

Then I just do a Right-Click + Add Existing Files.

This (+ other people's methods) was discussed back in:

2018: "UUID basics & template"

I personally don't like the "same base EPUB every time" idea, since the UUID will be the same, but there are ways around this. (See the thread for more details!)

Last edited by Tex2002ans; 08-27-2021 at 04:20 PM.
Tex2002ans is offline   Reply With Quote
Advert
Old 08-28-2021, 01:16 PM   #6
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,587
Karma: 14328510
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by Tex2002ans View Post
This (+ other people's methods) was discussed back in:

2018: "UUID basics & template"

I personally don't like the "same base EPUB every time" idea, since the UUID will be the same, but there are ways around this. (See the thread for more details!)
Interesting thread; thanks. I think what I'm going to do is use the same template.epub file but I'll delete its
Code:
dc:identifier id="BookId"
line from the content.opf file since I always (usually) run the EpubCheck plugin when I'm done and it will complain if there's no line for that so then I'll fire up a new sigil and copy the one from that and paste it into the one I've just finished.

What happens if I forget to run the EpubCheck plugin? What blows up when that line is missing? I.e., if I upload it here or read it on my kobo.

Last edited by hobnail; 08-28-2021 at 01:22 PM.
hobnail is offline   Reply With Quote
Old 08-28-2021, 05:49 PM   #7
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,353
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Some programs use the ID in their identification process. If you have two numbers that are the same they could cause a conflict. At one point I had a problem with Calibre thinking different books were actually the same and not filing them correctly. I haven't had this problem in quite some time, but I don't know if it's because Calibre fixed the issue, or I just don't use the same ID anymore.

I think Sigil will automatically correct that line if it is missing???
Turtle91 is offline   Reply With Quote
Old 08-28-2021, 06:33 PM   #8
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
FWIW - I have Sigil pinned to the taskbar, and to that I have pinned two template epubs.

When I remember that's how I load a template.

That's on Windows 10.

BR
BetterRed is offline   Reply With Quote
Old 08-28-2021, 08:01 PM   #9
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by hobnail View Post
What happens if I forget to run the EpubCheck plugin? What blows up when that line is missing? I.e., if I upload it here or read it on my kobo.
The unique-identifier is mandatory in EPUB.

Not too sure what happens on readers when it's missing. But its main uses are:
  • Font Obfuscation
  • Telling a file is unique.
    • On some devices.
    • Let's say you stick a 2nd EPUB with the same UUID onto your reader, the device may scan and say: "Nope, no new book here."
  • Store Notes/Highlights
    • On some devices.
    • On my old Nook, in an EPUB with matching UUID, the Notes/Highlights would carry over, being completely mangled since text/locations wouldn't match.

For more detail, also see:

2019: "@DiapDealer ISBN vs UUID"

Side Note: And I may be going cookoo, but didn't I remember a Sigil plugin made to randomly generate a new UUID? (Or was this just mentioned in passing?)

Side Note #2: Also see the EPUB spec on unique-identifier.

Quote:
Originally Posted by hobnail View Post
I think what I'm going to do is use the same template.epub file [...] then I'll fire up a new sigil and copy the one from that and paste it into the one I've just finished.
Yep. That's similar to what I do when I accidentally used the wrong file as my base.

Sigil, fresh EPUB, then go digging into the blank EPUB's UUID and carefully swap lines over.

(See thread above for more details on how to manually adjust UUID.)

Quote:
Originally Posted by Turtle91 View Post
I think Sigil will automatically correct that line if it is missing???
No. I don't believe so.

I just tested in Sigil 1.7.0 + 0.9.14.

I deleted the lines (in content.opf + toc.ncx), saved the EPUB, reopened, saved again, and the UUID lines continued to be missing.

Last edited by Tex2002ans; 08-28-2021 at 08:07 PM.
Tex2002ans is offline   Reply With Quote
Old 09-02-2021, 11:48 AM   #10
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,764
Karma: 6000000
Join Date: Nov 2009
Device: many
Would a TemplateEpub3 input plugin (and of course a matching TemplateEpub2 plugin) that does the following help:

1. Looks in your Sigil Prefs folder for a "template3" folder that holds an unzipped epub of your choice (ditto for "template2") with any files you want of any type.
The only caveat is none of the font files (if any are even present in the template) can be obfuscated inside the template3 folder.

2. If it exists, it creates a proper uuid bookid for the opf (and ncx if it exists) and then zips it up to create an epub that is loaded into Sigil

If it does not exist, it could either prompt for a temporary path or quietly exit as failed, your choice.

The goal is that once the template3 has been created and the Template3 plugin has been loaded and assigned an icon, then loading your template after starting Sigil is just a single icon click and no further user interaction required.

You can also easily change any of the files inside the template3 folder at any time using Sigil and the FolderIn and FolderOut plugins or even by drag and drop.

Would something like that help?
KevinH is online now   Reply With Quote
Old 09-02-2021, 12:45 PM   #11
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,353
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Would this be in addition to, or replacement of, the functionality of a default cover page (using add cover)??

I think it would be a good thing!
Turtle91 is offline   Reply With Quote
Old 09-02-2021, 02:13 PM   #12
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,764
Karma: 6000000
Join Date: Nov 2009
Device: many
This would be a Sigil plugin. You would need to download and install it just like any other plugin. It would not replace anything.
KevinH is online now   Reply With Quote
Old 09-02-2021, 03:17 PM   #13
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,587
Karma: 14328510
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by KevinH View Post
Would a TemplateEpub3 input plugin (and of course a matching TemplateEpub2 plugin) that does the following help:

1. Looks in your Sigil Prefs folder for a "template3" folder that holds an unzipped epub of your choice (ditto for "template2") with any files you want of any type.
The only caveat is none of the font files (if any are even present in the template) can be obfuscated inside the template3 folder.

2. If it exists, it creates a proper uuid bookid for the opf (and ncx if it exists) and then zips it up to create an epub that is loaded into Sigil

If it does not exist, it could either prompt for a temporary path or quietly exit as failed, your choice.

The goal is that once the template3 has been created and the Template3 plugin has been loaded and assigned an icon, then loading your template after starting Sigil is just a single icon click and no further user interaction required.

You can also easily change any of the files inside the template3 folder at any time using Sigil and the FolderIn and FolderOut plugins or even by drag and drop.

Would something like that help?
Yes, that sounds like it would fit the bill. Thanks.
hobnail is offline   Reply With Quote
Old 09-02-2021, 03:23 PM   #14
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,764
Karma: 6000000
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by hobnail View Post
Yes, that sounds like it would fit the bill. Thanks.
Okay, I will put something like that together for you to try.
KevinH is online now   Reply With Quote
Old 09-03-2021, 01:00 PM   #15
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,764
Karma: 6000000
Join Date: Nov 2009
Device: many
New Plugins for testing

Okay, I have quickly thrown together two plugins:

Template3_v010.zip
It is an input plugin to load an unzipped epub3 from a folder in Sigil Preferences folder called "template3". It will create and use new unique-identifiers using uuids and update both the OPF and any existing NCX


Template2_v010.zip
It is an input plugin to load an unzipped epub2 from a folder in Sigil Preferences folder called "template2". It will create and use new unique-identifiers using uuids and update both the OPF and any existing NCX

I have attached both plugins.

I have also made an additional change to Sigil's source code that will appear in Sigil 1.8, that if you use an input plugin and your currently loaded book in Sigil has NOT been modified, it will go ahead and load the new epub without prompting to proceed since that is the whole point of an input plugin to begin with.

See the attachments for the plugins. They have not undergone much testing so any feedback on them welcome.

Also any contributions of plugin.svg or plugin.icon files for either or both would be welcome!!

Hope this helps.
Attached Files
File Type: zip Template3_v010.zip (13.9 KB, 156 views)
File Type: zip Template2_v010.zip (13.9 KB, 181 views)
KevinH is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cover templates grixit Calibre 12 09-17-2020 09:48 PM
Where to get Templates? chrismscotland Onyx Boox 1 07-25-2019 04:04 PM
PDF templates? Wolfrott PDF 0 01-13-2016 04:25 AM
Help using templates krakenmoth Library Management 2 04-10-2013 03:44 PM
templates? TAG_Keri Calibre 1 10-28-2011 02:11 PM


All times are GMT -4. The time now is 09:23 AM.


MobileRead.com is a privately owned, operated and funded community.