![]() |
FootnoteManipulator plugin
2 Attachment(s)
FootnoteManipulator plugin
Recently I produced an ePub that contained a plethora of footnotes. As the ePub developed and went through several reviews, I found that I needed to add/delete footnotes and this became time consuming. Consequently, I developed the attached plugin with the following features:
This plugin has been tested on epub 2.0 books and epub 3.0 using Sigil version 0.9.14 running on windows 10:). Important: Please backup your epub before running this plugin. How to install this plugin: See the manual. Licence: See the manual. Update to version 0.1.1.0
Update to version 0.1.1.1
|
1 Attachment(s)
The plugin works great.
I've been waiting for years for the footnote plugin, which will have the "Reinstate Footnotes" button. Thank you! It is worth thinking about adapting the plugin to Sigil 1.0, because currently some paths are hardcoded (Text, Styles). One suggestion (removing spaces before the text when calling reinstate, because repeated use of Insert-Reinstate causes the space to grow with each use): Code:
FNtext=self.FNList[j][2].lstrip() #Get the text for the footnote |
@BeckyEbook: Glad you find the plugin useful. Thank you for your suggestion and for providing an icon for the plugin. I will incorporate your suggestion and icon in the next update (I will wait a short while in case anybody else has any suggestions or reports any bugs).
|
I have some suggestions.
Let me list them below: * Adaptation to Sigil 1.x This should not be difficult, first of all you use an additional condition will detect whether this is version 0.9.991+ Code:
if bk.launcher_version() >= 20190927:Code:
bk.group_to_folders("Text")Code:
bk.group_to_folders("Styles")* Additional options for names used in names of ids, files and styles (just as you can change FNID), it is worth giving the option to change: class FNOTE id FOOTNOTE class Footer name in footer FOOTNOTES class Footnote filename Footnotes.xhtml It will be a nod towards non-English users :) * Option to enable/disable the fragment with the footer (currently the footer is always added, although it is not necessary after all). * The plugin does not take into account the situation when the file name is not necessary if it applies to the same file. Then Code:
<a href="../Text/Section001.xhtml#fnid1">Code:
<a href="#fnid1">* It is true that it is dangerous when it is used on a file with errors, so I would add at the top of the plugin window such a bold inscription "Always work on a copy of the file – you may lose many hours of your work!" Edit: * Add the option to enable/disable adding epub:type="noteref" and epub:type="footnote" Look here. |
@BeckyEbook: Thank you for your suggestions. I am far from an expert in the structure of epubs so I need to look into the structures allowed by Sigil 1.0 - I have always used the older (standard?) structures. Your tips will be very useful.
Quote:
My first priority will be to adapt the plugin for Sigil 1.0 then I will look at implementing your other suggestions. |
Although I intended to adapt the plugin for Sigil 1.0 before making any other amends to this plugin, I decided to implement other changes first:
Quote:
Quote:
I have also corrected a bug that caused the plugin to freeze when an update was posted. Quote:
I will look at updating the plugin to cope with Sigil 1.0 when I get some more time. |
Thank you for your work.
Quote:
The FootnoteLinker plugin creates full footnote links (href + id) from scratch for ePub2 and ePub3 (with aside and relevant epub:type elements). If need be (when footnotes definitions are scattered in various places) the FootnoteMover plugin can just collect them and put them together in the same file before the processing with FootnoteLinker takes place. |
Probable bug (five times in the plugin code):
Code:
<p class="'+self.prefs['HyperlinkID']Code:
<p class="'+self.prefs['FootnoteClass'] |
Quote:
However, the latest version of the FootnoteManipulator plugin does provide the additional features of the FootnoteLinker plugin so I can see your point; the reference to the other footnote plugin is now redundant so I have decided to remove references to this and the other plugins from my first post. Quote:
|
This plugin doesn't have entry in the Sigil Plugin Index.
BR |
Quote:
|
I have a suspicion it's not the only one.
BR |
Quote:
|
Quote:
The problem with plugin index threads is that they don't go bold when they're changed - grumble, grumble :) BR |
Quote:
|
| All times are GMT -4. The time now is 08:03 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.