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 09-11-2015, 11:14 AM   #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: 173
Karma: 345678
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.

Future updates: Since I don't do epub version 2-books any more, this plugin will not be updated any further.

Regards,

Kim
Attached Files
File Type: pdf epub2-notes.pdf (185.5 KB, 479 views)
File Type: zip ePub2-Notes_0.2.1.zip (2.4 KB, 447 views)

Last edited by elibrarian; 04-08-2018 at 07:13 AM.
elibrarian is offline   Reply With Quote
Old 09-11-2015, 12:21 PM   #2
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: 3,299
Karma: 1958102
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, 01: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: 23,073
Karma: 24012262
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab A, Kobo Aura2
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, 02: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: 20,126
Karma: 103978634
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, 03: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: 10,513
Karma: 60960973
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
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, 03: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: 173
Karma: 345678
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, 10: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: 958
Karma: 4059461
Join Date: Mar 2009
Location: Rosario, Argentina
Device: SONY PRS-505, PRS-T2
Very nice plugin eLibrarian!

Pablo is offline   Reply With Quote
Old 09-14-2015, 02:14 PM   #8
CalibUser
Zealot
CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.
 
Posts: 147
Karma: 61844
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, 05: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 07:13 AM.
gipsy is offline   Reply With Quote
Old 09-29-2015, 08: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: 173
Karma: 345678
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, 09: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, 05:01 AM   #12
Leonatus
Guru
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: 660
Karma: 7077424
Join Date: Mar 2013
Location: Berlin, Germany
Device: Kobo Touch
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, 07: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: 173
Karma: 345678
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, 02:23 AM   #14
Leonatus
Guru
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: 660
Karma: 7077424
Join Date: Mar 2013
Location: Berlin, Germany
Device: Kobo Touch
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, 11:50 AM   #15
Leonatus
Guru
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: 660
Karma: 7077424
Join Date: Mar 2013
Location: Berlin, Germany
Device: Kobo Touch
Kim, I tested it, and I'm overwhelmed! Really amazing!
Leonatus 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
How to publish epub with endnotes on Feedbooks? Begemot Writers' Corner 6 09-04-2015 05:51 AM
Conversion of Endnotes .docx to .epub profjones Conversion 1 11-01-2013 08:05 AM
Public domain ePub with endnotes. John F Reading Recommendations 8 03-27-2012 11:09 AM
Linked endnotes in epub virtual_ink ePub 30 08-30-2011 04:47 PM
endnotes in epub with Sigil, multiple html BMaloney Sigil 4 03-03-2011 05:38 PM


All times are GMT -4. The time now is 06:53 AM.


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