|
|
#1 |
|
Enthusiast
![]() 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 |
|
|
|
|
|
#2 |
|
Enthusiast
![]() Posts: 27
Karma: 10
Join Date: Jan 2021
Device: iBooks
|
Sorry, I thought I was in the plugin subsection.
Feel free to move this. |
|
|
|
| Advert | |
|
|
|
|
#3 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,208
Karma: 211539966
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
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. |
|
|
|
|
|
|
#4 |
|
Enthusiast
![]() 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.) |
|
|
|
|
|
#5 |
|
Enthusiast
![]() Posts: 27
Karma: 10
Join Date: Jan 2021
Device: iBooks
|
Last edited by MikeMaloney; Yesterday at 05:29 PM. |
|
|
|
| Advert | |
|
|
|
|
#6 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
|
|
|
|
|
#7 |
|
Enthusiast
![]() 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? |
|
|
|
|
|
#8 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
|
|
|
|
|
#9 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
|
|
|
|
|
#10 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,803
Karma: 24088595
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
|
|
|
|
|
|
|
#11 | |
|
Enthusiast
![]() Posts: 27
Karma: 10
Join Date: Jan 2021
Device: iBooks
|
Quote:
Lesson learned: always use a dedicated programming tool. |
|
|
|
|
|
|
#12 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,208
Karma: 211539966
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
|
|
|
![]() |
|
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 |