Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 03:41 PM   #1
MikeMaloney
Enthusiast
MikeMaloney began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Jan 2021
Device: iBooks
Help writing a plugin

The attached zip isn't being accepted as a valid plugin.
It is simply an xml file that points to a python script.

Using the web interface to the main documentation, the link to the plugin documentation is broken, so I don't know if there are any missing xml tags.

Thanks
Attached Files
File Type: zip FootnoteFixer.zip (1.0 KB, 4 views)
MikeMaloney is offline   Reply With Quote
Old Yesterday, 03:45 PM   #2
MikeMaloney
Enthusiast
MikeMaloney began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Jan 2021
Device: iBooks
Sorry, I thought I was in the plugin subsection.

Feel free to move this.
MikeMaloney is offline   Reply With Quote
Advert
Old Yesterday, 04:32 PM   #3
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: 29,208
Karma: 211539966
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by MikeMaloney View Post
Using the web interface to the main documentation, the link to the plugin documentation is broken, so I don't know if there are any missing xml tags.
Can you please clarify exactly what link you're talking about that's broken? I'd dearly love to fix it.

As to your specific problem; a Sigil plugin is much more than an xml file pointing to a Python script. Your best bet for learning is to download and examining existing plugins.

Last edited by DiapDealer; Yesterday at 05:48 PM.
DiapDealer is offline   Reply With Quote
Old Yesterday, 05:11 PM   #4
MikeMaloney
Enthusiast
MikeMaloney began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Jan 2021
Device: iBooks
I found the framework documentation using a web search. It may be that firewall settings are interfering with the execution of the link.

Having found the documentation, I'm still missing something.

Would you be kind enough to look at this revised attempt?
(It's a really short program.)
Attached Files
File Type: zip FootnoteFixer_0-2.zip (1.1 KB, 6 views)
MikeMaloney is offline   Reply With Quote
Old Yesterday, 05:27 PM   #5
MikeMaloney
Enthusiast
MikeMaloney began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Jan 2021
Device: iBooks
Broken link: https://github.com/Sigil-Ebook/Sigil...ork_rev14.epub

Under: Write Your Own Plugins

Last edited by MikeMaloney; Yesterday at 05:29 PM.
MikeMaloney is offline   Reply With Quote
Advert
Old Yesterday, 05:46 PM   #6
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: 29,208
Karma: 211539966
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I only have portable devices at my disposal for the time being. So unzipping and reading the code would be awkward at best. If the code is not available on GitHub, I've got to wait until I get near a PC.

I've fixed the broken link in the user manual, but just know that it's always going to be a download link to an epub.
DiapDealer is offline   Reply With Quote
Old Yesterday, 05:59 PM   #7
MikeMaloney
Enthusiast
MikeMaloney began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Jan 2021
Device: iBooks
I simply did a copy and paste using the examples in the framework guide and Sigil doesn't like the zip file.

When zipping the files I used: zip -r ../demo.zip . -x "*.DS_Store" in the terminal and
unzip -l demo.zip reports
Archive: demo.zip
Length Date Time Name
--------- ---------- ----- ----
313 03-17-2026 14:50 plugin.xml
479 03-17-2026 14:53 plugin.py
--------- -------
792 2 files

Any other suggestions?
MikeMaloney is offline   Reply With Quote
Old Yesterday, 06:11 PM   #8
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: 29,208
Karma: 211539966
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
A plugin's zip must contain a top-level folder that matches the name tag in the plugin.xml file. All files will be inside that folder.
DiapDealer is offline   Reply With Quote
Old Yesterday, 07:59 PM   #9
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: 9,446
Karma: 6734148
Join Date: Nov 2009
Device: many
Please see the latest revision of the Sigil_PlugIn_Framework_rev15.epub here:

https://github.com/Sigil-Ebook/Sigil...ork_rev15.epub

You can download the epub in raw format from github.

And yes the name of the plugin (less version info) and the name of its enclosing folder must match and be correctly identified in the plugin's plugin.xml file.

But your plugin.xml is not well formed xml:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<plugin>>
  <name>FootnoteFixer</name>
  <type>edit</type>
  <version>1.0</version>
  <author>AMaloney</author>
  <description>Converts marked multi-paragraph footnotes to EPUB 3 pop-ups.</description>
  <engine>python3.4</engine>
  <autostart>true</autostart>
  <autoclose>true</autoclose>
  <oslist>osx,unx,win</oslist>
</plugin>

Notice your plugin tag is written incorrectly as "<plugin>>" instead of "<plugin>"

and for consistency your version string should have 3 parts so "1.0.0" versus "1.0" and it should appear in the plugin name after the underscore:

FootnoteFixer_v1.0.0.zip

to match what your plugin.xml says.

After making that change, it should work as far as I can tell.

Last edited by KevinH; Today at 11:14 AM.
KevinH is offline   Reply With Quote
Old Today, 06:57 AM   #10
Doitsu
Grand Sorcerer
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: 5,803
Karma: 24088595
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by MikeMaloney View Post
I found the framework documentation using a web search. It may be that firewall settings are interfering with the execution of the link.

Having found the documentation, I'm still missing something.

Would you be kind enough to look at this revised attempt?
(It's a really short program.)
I had a quick look at the code and I believe that it's somewhat similar to my Footnote Linker plugin.
Doitsu is offline   Reply With Quote
Old Today, 01:30 PM   #11
MikeMaloney
Enthusiast
MikeMaloney began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Jan 2021
Device: iBooks
Quote:
Notice your plugin tag is written incorrectly as "<plugin>>" instead of "<plugin>"

and for consistency your version string should have 3 parts so "1.0.0" versus "1.0" and it should appear in the plugin name after the underscore:

FootnoteFixer_v1.0.0.zip

to match what your plugin.xml says.

After making that change, it should work as far as I can tell.
D’oh I knew it had to be something obvious. Thanks

Lesson learned: always use a dedicated programming tool.
MikeMaloney is offline   Reply With Quote
Old Today, 01:58 PM   #12
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: 29,208
Karma: 211539966
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by MikeMaloney View Post
Lesson learned: always use a dedicated programming tool.
Or at least a validator.
DiapDealer is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Writing a Plugin for File Checksums lucask Development 8 07-27-2025 12:20 AM
Writing a plugin and my method isn't being called plugin_dev Development 8 09-20-2014 09:02 AM
Writing a first plugin Agama Development 50 07-07-2012 04:06 PM
Help with plugin writing meme Plugins 2 01-21-2011 01:57 PM
Writing an interface action plugin kiwidude Plugins 21 11-11-2010 04:11 PM


All times are GMT -4. The time now is 03:42 PM.


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