Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 07-01-2017, 07:18 AM   #1
Doitsu
Wizard
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: 3,953
Karma: 12058512
Join Date: Dec 2010
Device: Kindle PW2
[Plugin] FootnoteLinker

Updated: September 20, 2017
Current Version: "0.3.1"

This very simple plugin will automatically generate links to endnotes and backlinks to footnote anchors.
By default, it'll look for footnote anchors with a noteanchor class attribute (e.g. <sup class="noteanchor">1</sup>) and endnote defintions with a note class attribute (e.g. <p class="note">1. Footnote definition...</p>).
You'll also need to right-click the endnotes file and select Add Semantics... > Notes/Footnotes. (For an example, see the test file.)

Please make sure to make a backup copy before running this plugin!


Credits: roger64 for beta testing and feedback.

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 FootnoteLinker_v0.3.1.zip. This will install the FootnoteLinker plugin, which you can select via Plugins > Edit > FootnoteLinker.

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

Name:	FootnoteLinker.png
Views:	59
Size:	12.2 KB
ID:	158078  
Attached Files
File Type: epub FNLTest.epub (2.7 KB, 157 views)
File Type: zip FootnoteLinker_v0.3.1.zip (5.9 KB, 113 views)

Last edited by Doitsu; 09-20-2017 at 03:43 AM. Reason: Uploaded new version
Doitsu is offline   Reply With Quote
Advert
Old 07-04-2017, 08:24 PM   #2
Auramazda
Member
Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.
 
Posts: 14
Karma: 1422
Join Date: Mar 2016
Device: none
I find a little problem, if you use the plugin then add some other note and use again the plugin in the foot note page you have two link of the past note:
1 1 in matters of taste, there is no argument...
not a big problem for me just for information
Auramazda is offline   Reply With Quote
Old 07-05-2017, 05:04 AM   #3
Doitsu
Wizard
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: 3,953
Karma: 12058512
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Auramazda View Post
I find a little problem, if you use the plugin then add some other note and use again the plugin in the foot note page you have two link of the past note
Ideally, you should run this plugin only once, but I've updated the code to allow users to run it multiple times.
Doitsu is offline   Reply With Quote
Old 07-05-2017, 11:17 AM   #4
nqk
Addict
nqk began at the beginning.
 
Posts: 227
Karma: 10
Join Date: Feb 2012
Device: Samsung Galaxy Tab 8.9
Dear Doitsu,

Would you please make this for Calibre Editor too?
nqk is offline   Reply With Quote
Old 07-05-2017, 11:54 AM   #5
Doitsu
Wizard
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: 3,953
Karma: 12058512
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by nqk View Post
Would you please make this for Calibre Editor too?
Unfortunately, that is not possible, since this plugin uses the Beautiful Soup Python package, which is bundled with Sigil but not with Calibre.
Doitsu is offline   Reply With Quote
Advert
Old 07-05-2017, 12:43 PM   #6
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 10,091
Karma: 59950303
Join Date: Nov 2007
Location: Toronto
Device: Wife: Touch, Arc, Vox Me: Nexus 7, Glo
I was sure beautiful soup was in Calibre; I'm sure it's used by many of the recipes for news downloads.

Sent from my Nexus 7 using Tapatalk
PeterT is offline   Reply With Quote
Old 07-05-2017, 12:50 PM   #7
Doitsu
Wizard
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: 3,953
Karma: 12058512
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by PeterT View Post
I was sure beautiful soup was in Calibre; I'm sure it's used by many of the recipes for news downloads.
AFAIK, all bundled Python packages are supposed to be in the C:\Program Files\Calibre2\app\pylib.zip archive, but I didn't see beautiful soup. Is there any Calibre folder or file that contains optional Python packages?

EDIT: I just checked the recipe documentation and it looks that your right, because one of the examples contain the following import:

Code:
from calibre.ebooks.BeautifulSoup import BeautifulSoup

Last edited by Doitsu; 07-05-2017 at 12:54 PM.
Doitsu is offline   Reply With Quote
Old 07-05-2017, 02:25 PM   #8
KevinH
Wizard
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: 2,624
Karma: 780906
Join Date: Nov 2009
Device: many
Yes, that is a copy of the original BS module for python 2 (it used to be a single file). I think it even has some Kovid improvements to it. Should work basically the same way to the extent that BS4 was almost backwards compatible with the original BS.
KevinH is offline   Reply With Quote
Old 07-24-2017, 02:29 PM   #9
Doitsu
Wizard
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: 3,953
Karma: 12058512
Join Date: Dec 2010
Device: Kindle PW2
I attached a new version, which allows users to customize the footnote and anchor id prefixes.
Doitsu is offline   Reply With Quote
Old 10-12-2017, 02:59 PM   #10
KarenD
Junior Member
KarenD began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2017
Device: Kindle Paperwhite
Doitsu I'm using your plugin (thank you) and I'm stuck. I'm getting this error message:

Status: failed
Error: Missing Notes guide item. Use Add Semantics > Notes to mark the footnote definitions file.

I've put the class="noteanchor" in the <sup> tags and the class="note" in the end notes section on the <p> tags, just like in the example ePub.

I've left the items in the box (in your intial post) as you have them (although I don't know what the 2nd, 4th and 5th items mean and I can't find them anywhere in your example ePub either).

I have no idea what the "Add Semantics" bit means either - I can't find any menu items called that.

Any idea what's going wrong and how I can get it to work?
Thanks
KarenD is offline   Reply With Quote
Old 10-12-2017, 05:51 PM   #11
Doitsu
Wizard
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: 3,953
Karma: 12058512
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KarenD View Post
I'm getting this error message:

Status: failed
Error: Missing Notes guide item. Use Add Semantics > Notes to mark the footnote definitions file.
Add Semantics is a a Book Browser context menu item. You'll have to right-click the (X)HTML file that contains the footnote definitions in the Book Browser and select Add Semantics... > Notes.

This'll add the following line to content.opf:

Code:
<guide>
    <!-- more entries -->
    <reference type="notes" title="Notes" href="Text/endnotes.xhtml"/>
    <!-- more entries -->
  </guide>
(Of course the file name href will differ from your file name.)

After adding the Notes semantic you should also see (Notes) after your endnotes file, if you hover the mouse over it in the Book Browser.
Doitsu is offline   Reply With Quote
Old 10-12-2017, 05:56 PM   #12
BetterRed
null operator
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: 9,298
Karma: 7810051
Join Date: Mar 2012
Location: Sydney Australia
Device: none
ninja'd by the chief warrior himself

@KarenD - right click the xhtml file where you have the notes, select Add Semantics, a list of available values will pop (n.b. different, but similar lists for ePub2 and ePub3) select the one for Notes

BR
BetterRed is offline   Reply With Quote
Old 10-13-2017, 10:48 AM   #13
KarenD
Junior Member
KarenD began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2017
Device: Kindle Paperwhite
Thank you! That got it working Had no idea there was a right click menu on the files.
KarenD is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
kindlegen plugin for Sigil Doitsu Plugins 92 12-11-2017 03:22 PM
[Plugin] ePub3-itizer - epub3 output plugin for Sigil KevinH Plugins 288 12-01-2017 10:49 AM
[Plugin] KindleImport Sigil plugin DiapDealer Plugins 151 09-27-2017 06:05 PM
[Plugin] PunctuationSmarten Sigil plugin DiapDealer Plugins 72 09-25-2017 01:50 PM
epubcheck plugin for Sigil Doitsu Plugins 148 09-16-2017 09:03 AM


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


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