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 02-15-2017, 02:31 PM   #31
RbnJrg
Guru
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 883
Karma: 3273785
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by elibrarian View Post
When you run the plugin, it generates a footnote.css file. When you run it again (which, btw., I would advise against, since the new footnote's numbers would be duplicate, beginning all over from no. 1, and it's a sheer hell to sort that out), the footnote.css exists, and hence "Manifest Id is not unique".

That might be fixed by letting the plugin check for existing footnote.css - I'll look into it next weekend - but still, this is not footnotes the MSWord/Libreoffice way, and I doubt it's possible to get that functionality in Sigil. (But ideas are welcome, and anyone are welcome to tamper with my probably rather crude coding.)

Regards,

Kim
Thank you very much for your fast answer. Regarding the ID footnotes number, maybe the plugin could ask the user for the number of the next footnote. Of that way, footnotes number never will be duplicated. And indeed, after erasing "footnote.css", the plugin works, although, footnotes number are duplicated as you said.

So, after you explained me how works your plugin, I could manage a bit the issue by doing the following:

1) By erasing "footnote.css"
2) By opening "plugin.py" and changing manually the values for "lastid" and "fnid".

But of course, if you can check the existence of "footnote.css" and add a field for your plugin where the user can write the number of the next footnote would be great

Many thanks again for your answer!
Rubén
RbnJrg is offline   Reply With Quote
Old 02-20-2017, 08:02 AM   #32
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: 160
Karma: 345678
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
New version 0.2.0

I' ve uploaded a new version of the plugin in post #1 of this thread, adressing some of RbnJrg's needs.

It should be considered a beta-version, so don't run it on original/production files until you're satisfied it works as expected.

For those who likes dissection code: it's a mess, I know that, but this is more or less a "learning by doing"-project for me, and I must confess, I find python's way of handling variables and the necessity to use indents rather confusing (I'm coming from Lotus Notes/VBA/Object Pascal). So it's more or less: Hey, this works, I'll use it

Regards,

Kim
elibrarian is offline   Reply With Quote
Old 02-20-2017, 03:20 PM   #33
RbnJrg
Guru
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 883
Karma: 3273785
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by elibrarian View Post
I' ve uploaded a new version of the plugin in post #1 of this thread, adressing some of RbnJrg's needs.

It should be considered a beta-version, so don't run it on original/production files until you're satisfied it works as expected.

For those who likes dissection code: it's a mess, I know that, but this is more or less a "learning by doing"-project for me, and I must confess, I find python's way of handling variables and the necessity to use indents rather confusing (I'm coming from Lotus Notes/VBA/Object Pascal). So it's more or less: Hey, this works, I'll use it

Regards,

Kim
Many thanks but when I try to install it, I receive a Sigil message that is not a valid plugin. What am I doing wrong? (I'm using Python 3.6)

Rubén
RbnJrg is offline   Reply With Quote
Old 02-20-2017, 03:34 PM   #34
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: 160
Karma: 345678
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
Quote:
Originally Posted by RbnJrg View Post
Many thanks but when I try to install it, I receive a Sigil message that is not a valid plugin. What am I doing wrong? (I'm using Python 3.6)
My bad. Just rename the zip file to ePub2-Notes_0.2.0.zip - that is, the last - should be _. I'll correct the file in post no. 1 later.

It's made with Python 3.6 and tested under Sigil's builtin P. 3.5, and since I'm not using anything advanced, neither version should pose any problems - just the damned underscore

Regards,

Kim

Last edited by elibrarian; 02-20-2017 at 03:41 PM.
elibrarian is offline   Reply With Quote
Old 02-20-2017, 05:00 PM   #35
RbnJrg
Guru
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 883
Karma: 3273785
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by elibrarian View Post
My bad. Just rename the zip file to ePub2-Notes_0.2.0.zip - that is, the last - should be _. I'll correct the file in post no. 1 later.

It's made with Python 3.6 and tested under Sigil's builtin P. 3.5, and since I'm not using anything advanced, neither version should pose any problems - just the damned underscore

Regards,

Kim
It works perfectly!
RbnJrg is offline   Reply With Quote
Old 03-13-2017, 08:49 PM   #36
AtomicDecay
Junior Member
AtomicDecay began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Mar 2017
Location: Tampa, FL
Device: iPad
FYI, the 0.2.0 beta script is using 'tilbage' instead of 'back' for the link on the bottom of the page. Unless that's intended as a step in the subtle 'Dane World Domination' plan.

Otherwise, the script works great so far.
AtomicDecay is offline   Reply With Quote
Old 03-14-2017, 08:58 AM   #37
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: 160
Karma: 345678
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
Quote:
Originally Posted by AtomicDecay View Post
FYI, the 0.2.0 beta script is using 'tilbage' instead of 'back' for the link on the bottom of the page.
"Back" is back …

Quote:
Originally Posted by AtomicDecay View Post
Unless that's intended as a step in the subtle 'Dane World Domination' plan.
Damn! We were so close

Quote:
Originally Posted by AtomicDecay View Post
Otherwise, the script works great so far.
Good to know, thanks!


Regards,

Kim
elibrarian is offline   Reply With Quote
Old 03-14-2017, 09:02 AM   #38
exaltedwombat
Guru
exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.
 
Posts: 654
Karma: 1771606
Join Date: Nov 2011
Device: none
I love an ingenious plugin as much as anyone! But note that Word has full support for endnotes and that, as long as Paragraph Styles have been strictly used, an epub conversion by Calibre supports them very well.
exaltedwombat is offline   Reply With Quote
Old 03-14-2017, 09:19 AM   #39
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: 18,592
Karma: 95833334
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by exaltedwombat View Post
I love an ingenious plugin as much as anyone! But note that Word has full support for endnotes and that, as long as Paragraph Styles have been strictly used, an epub conversion by Calibre supports them very well.
Please note that many people who use Sigil and/or Sigil plugins aren't always that interested in inserting calibre into their epub making/editing workflow. In addition to this plugin, there's also several Sigil docx/odt import plugins that will honor Word/OpenOffice endnotes just as well (without the need for a conversion by an external program).

If there's something that can be done with calibre that can't be done with Sigil or Sigil plugins (or if someone specifically asks about calibre functionality), by all means, share (where relevant). I'm certainly no enemy of calibre, after all. But otherwise, consider leaving the random calibre lessons for the calibre/EPUB forums, please.

Last edited by DiapDealer; 03-14-2017 at 09:29 AM.
DiapDealer is offline   Reply With Quote
Old 03-14-2017, 09:20 AM   #40
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: 160
Karma: 345678
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
Quote:
Originally Posted by exaltedwombat View Post
I love an ingenious plugin as much as anyone! But note that Word has full support for endnotes and that, as long as Paragraph Styles have been strictly used, an epub conversion by Calibre supports them very well.
I know. So does LibreOffice and probably most other wordprocessor or layout software worth it's salt. This plugin - like PanDoc, that inspired it - is not meant as a replacement for this, but some of us (me, for instance) doesn't use wordprocessors to make epubs, but want the full control of codes and css by using a programmable texteditor + Sigil. So after making around 400 notes for my danish epub-edition of Thackeray's Vanity Fair in NoteTab, I had to do something to make it a more manageable task to put them into the ePub - which has led to me to make this plugin

Regards,

Kim
elibrarian is offline   Reply With Quote
Old 03-16-2017, 08:11 AM   #41
exaltedwombat
Guru
exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.
 
Posts: 654
Karma: 1771606
Join Date: Nov 2011
Device: none
I fully support your freedom to do things the tecchy way! But you might be surprised at how clean the epub code is from a properly structured Word document converted by the generally-available tools. No-one's suggesting it shouldn't then be enhanced in Sigil.

The easiest money I ever earned was an epub conversion from a book created in Word, by someone who knew how to use Word properly. A rare occurrence!
exaltedwombat is offline   Reply With Quote
Old 04-07-2018, 07:57 PM   #42
BeckyEbook
Zealot
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 113
Karma: 452180
Join Date: Jan 2017
Location: Poland
Device: Kindle (Key3, PW2, PW3), Nook (ST, GLP), Kobo Touch, Tolino Vision 2
Add to code (line 71):
Code:
            # only once for each file with notes
            cssexist = re.search(r'\.\.\/Styles\/footnote\.css', html)
            if not cssexist:
And the plugin will not insert the repeated link to the footnote.css file after running again.
BeckyEbook is online now   Reply With Quote
Old 04-08-2018, 07:19 AM   #43
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: 160
Karma: 345678
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
Quote:
Originally Posted by BeckyEbook View Post
Add to code (line 71):
Code:
            # only once for each file with notes
            cssexist = re.search(r'\.\.\/Styles\/footnote\.css', html)
            if not cssexist:
And the plugin will not insert the repeated link to the footnote.css file after running again.
Thanks for that!

I've updated the plugin as per your suggestion, and uploaded a new version 0.2.1 to the first post of this thread. Also I've updated the intro/userguide pdf.

Since we don't do epub-2 any more, it's unlikely the plugin will be further developed (unless someone catches an error). I might have an epub-3-savvy version in the works, but at present this is not ready for the rest of the world to see.

Regards,

Kim
elibrarian 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.