Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 09-11-2015, 12:14 PM   #1
elibrarian
Imperfect Perfectionist
elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.
 
elibrarian's Avatar
 
Posts: 542
Karma: 863576
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
[Plugin] Easy Footnote Insertion

Plugin for easy insertion of epub 2.0 style footnotes.

The text for the notes must be at the place in the surrounding text, where the reference should be inserted, surrounded by ^[ ... ] - same way as Pandoc inline-notes. Read more and see some screen captures in the attached pdf.

License: No formalized license as such - do whatever you like with my code, as long as you don't charge for it, and if you come up with any improvements, please share.

---

What's new?
  • 0.2.0: Plugin can be run on epubs with existing notes.
  • 0.2.0: If it finds any notes (in a known format), it will try to determine the highest reference number and continue from there, or the user can choose a higher number to start from. (E. g. if highest found is 59, then it might be convenient to start new numbers at 100, then the new notes wil be easy to find with a regex like \d\d\d or \d{3})
  • 0.2.0: If a footnote.css stylesheet file exists in the epub, it will not be overwritten, but user will get a warning to check the format of any newly inserted notes.
  • 0.2.0: Plugin autostarts.
  • 0.2.0 Now Python 3 only.

April 8. 2018: New version 0.2.1:
  • 0.2.1: Now doesn't insert multiple instances of the css-reference (thanks to BeckyEbook)
  • 0.2.1: Updated intro/userguide.

December 20. 2023: New version 0.2.2:
  • 0.2.2: Corrected an error regarding "/"s in notes and now provide an icon. All thanks go to BeckyEbook!


Future updates: Since I don't do epub version 2-books any more, this plugin will not be updated any further. (But anyone who wants to can manipulate the code and share alternate versions

Update 18. dec. 2019: From my (admittedly not very extensive) tests of this plugin with non-standard epubs and Sigil 1.0, it still works as advertised.

Regards,

Kim
Attached Files
File Type: pdf epub2-notes.pdf (178.4 KB, 435 views)
File Type: zip ePub2-Notes_0.2.2.zip (4.3 KB, 812 views)

Last edited by elibrarian; 12-20-2023 at 10:16 AM.
elibrarian is offline   Reply With Quote
Old 09-11-2015, 01:21 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,156
Karma: 5450818
Join Date: Nov 2009
Device: many
Hi Kim,

Wonderful. Thanks for contributing to Sigil via your plugin. I am tied up at work right now, but I will add plugin to the official Sigil Plugin Index thread when I get a free moment this weekend. If you have any technical questions about plugin development, please don't hesitate to ask in the main plugin thread.

Thanks!

KevinH
KevinH is offline   Reply With Quote
Advert
Old 09-11-2015, 02:23 PM   #3
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,441
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by KevinH View Post
Hi Kim,

Wonderful. Thanks for contributing to Sigil via your plugin. I am tied up at work right now, but I will add plugin to the official Sigil Plugin Index thread when I get a free moment this weekend. If you have any technical questions about plugin development, please don't hesitate to ask in the main plugin thread.

Thanks!

KevinH
I added it, but for some reason the item spacing is off
theducks is offline   Reply With Quote
Old 09-11-2015, 03:30 PM   #4
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,038
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Did you really just make a pdf to document how to use an epub plugin?
DiapDealer is offline   Reply With Quote
Old 09-11-2015, 04:16 PM   #5
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: 12,729
Karma: 75000000
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Quote:
Originally Posted by DiapDealer View Post
Did you really just make a pdf to document how to use an epub plugin?
He's following the lead of a certain calibre plugin author...
PeterT is offline   Reply With Quote
Advert
Old 09-11-2015, 04:16 PM   #6
elibrarian
Imperfect Perfectionist
elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.
 
elibrarian's Avatar
 
Posts: 542
Karma: 863576
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
Quote:
Originally Posted by DiapDealer View Post
Did you really just make a pdf to document how to use an epub plugin?
Yup - I use Libreoffice and Snap8 all the time to make docs like this at work, so it was the easiest way for me instead of fiddling for hours with image placements in an epub ...

Regards

Kim
elibrarian is offline   Reply With Quote
Old 09-14-2015, 11:52 AM   #7
Pablo
Guru
Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.
 
Pablo's Avatar
 
Posts: 971
Karma: 4999999
Join Date: Mar 2009
Location: Rosario, Argentina
Device: SONY PRS-T2, Kindle Paperwhite 11th gen
Very nice plugin eLibrarian!

Pablo is offline   Reply With Quote
Old 09-14-2015, 03:14 PM   #8
CalibUser
Addict
CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.
 
Posts: 202
Karma: 62362
Join Date: Jul 2015
Device: Sony
Thanks, eLibrarian. This will be useful for some ePubs that I am writing.
CalibUser is offline   Reply With Quote
Old 09-29-2015, 06:09 AM   #9
gipsy
Connoisseur
gipsy began at the beginning.
 
Posts: 81
Karma: 10
Join Date: Nov 2013
Device: Kobo Aura HD
@elibrarian

If the 2 ^[...] are near, the search find them as one
I solve it changing the
Code:
		found = re.search(r'\^\[.*\]',html)
to
Code:
		found = re.search(r'\^\[.*?\]',html)
EDIT: Doesn't work right. It delete the text till the last ] in those that are near
I try to figure out why

Last edited by gipsy; 09-29-2015 at 08:13 AM.
gipsy is offline   Reply With Quote
Old 09-29-2015, 09:17 AM   #10
elibrarian
Imperfect Perfectionist
elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.
 
elibrarian's Avatar
 
Posts: 542
Karma: 863576
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
I've uploaded a new version to the first post of this thread. I think I've nailed the problem with deleting text too.

Regards,

Kim
elibrarian is offline   Reply With Quote
Old 09-29-2015, 10:04 AM   #11
gipsy
Connoisseur
gipsy began at the beginning.
 
Posts: 81
Karma: 10
Join Date: Nov 2013
Device: Kobo Aura HD
Thanks Kim, works fine now
gipsy is offline   Reply With Quote
Old 09-30-2015, 06:01 AM   #12
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
Posts: 1,035
Karma: 11227259
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
A really useful tool! Thank you so much!

I'd use it principally for OCRing of scientific texts. In the original text of those, there usually appear footnotes. As I understand it, to make the tool run, I need to "cut" the footnote text and place it next to the corresponding "body" text first, right?
Leonatus is offline   Reply With Quote
Old 09-30-2015, 08:40 AM   #13
elibrarian
Imperfect Perfectionist
elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.
 
elibrarian's Avatar
 
Posts: 542
Karma: 863576
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
Quote:
Originally Posted by Leonatus View Post
As I understand it, to make the tool run, I need to "cut" the footnote text and place it next to the corresponding "body" text first, right?
If I understand you correctly, then yes - see the first image in the pdf-intro, where "Mälaren" is the word you want to explain, and ^[En sø i Sverige - A lake in Sweden] is what is to become a note. Text between the [...] wil be moved to the note at the end of the file.

Just try it on any epub - as long as it is on a copy and/or you don't save, no harm is done

Regards,

Kim
elibrarian is offline   Reply With Quote
Old 10-01-2015, 03:23 AM   #14
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
Posts: 1,035
Karma: 11227259
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
Thank you, Kim,
the actual book I'm OCRing has some footnotes, so it's a good oportunity.
Leonatus is offline   Reply With Quote
Old 10-08-2015, 12:50 PM   #15
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
Posts: 1,035
Karma: 11227259
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
Kim, I tested it, and I'm overwhelmed! Really amazing!
Leonatus is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
endnotes in epub with Sigil, multiple html BMaloney Sigil 9 10-10-2019 05:34 PM
How to publish epub with endnotes on Feedbooks? Begemot Writers' Corner 6 09-04-2015 06:51 AM
Conversion of Endnotes .docx to .epub profjones Conversion 1 11-01-2013 09:05 AM
Public domain ePub with endnotes. John F Reading Recommendations 8 03-27-2012 12:09 PM
Linked endnotes in epub virtual_ink ePub 30 08-30-2011 05:47 PM


All times are GMT -4. The time now is 02:32 PM.


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