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 11-25-2014, 01:54 PM   #31
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,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by DiapDealer View Post
Do you have the compatibility_utils installed? The latest one?
I've only installed the updates posted in this thread. If there was one for compatibility_utils.py I must have missed it.

BTW, given the many updates, it'd be helpful if the plugin launcher files had version numbers in the comments section.

Quote:
Originally Posted by DiapDealer View Post
At this point, your best bet is to grab all the latest launcher files from Kevin's github and then replace launcher.py with the most recent one he posted in this thread. That's what I did with Sigil 0.8.1 and everything worked as it should.
I assumed that the current Github laucher files have been updated for the upcoming 0.8.2 version. For example, there are validator plugin python files, but, AFAIK, Sigil 0.8.1 doesn't have validator plugin support.
Anyway after grabbing the latest compatibility_utils.py version from Github the error disappeared.
Doitsu is offline   Reply With Quote
Old 11-25-2014, 02:08 PM   #32
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by KevinH View Post
Hi Toxaris,

I stole a free moment at work to try and turn off the feature that allows plugin prints to appear immediately in the Sigil window. This feature requires changes in Sigil as well.

So please try the following version of launcher.py that should disable this new feature and hopefully work for you.

Sorry about that. I keep forgetting that Sigil 0.8.2 is not out yet!

KevinH

ps. To get around your second error you will need to add the following files to the plugin_launcher as well (after unzipping).
No problem at all. I replaced all the files and I do get further. Now I get a popup saying: Error parsing result XML: Start tag expected

Then I see the results, but they are not pushed to Sigil.

Last edited by KevinH; 11-25-2014 at 03:12 PM.
Toxaris is offline   Reply With Quote
Advert
Old 11-25-2014, 03:15 PM   #33
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,160
Karma: 5450818
Join Date: Nov 2009
Device: many
Hi Toxaris,

The second modified launcher.py should have handled that error but I guess it did not. DiapDealer has said he needs other files from the new launcher as well to get anything to work with the Sigil 0.8.1 build.

So I will put together a full set when I get home from work tonight and modify them to work with Sigil 0.8.1 so that you have something to continue development with while we wait for Sigil 0.8.2 to officially come out.

Take care,

KevinH

Quote:
Originally Posted by Toxaris View Post
No problem at all. I replaced all the files and I do get further. Now I get a popup saying: Error parsing result XML: Start tag expected

Then I see the results, but they are not pushed to Sigil.

Last edited by KevinH; 11-25-2014 at 04:30 PM.
KevinH is offline   Reply With Quote
Old 11-25-2014, 04:47 PM   #34
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,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
Hi KevinH,

I installed all new files and didn't get any error messages. However, my test case still doesn't fully work.
When I add and remove a font with bk.addfile() and bk.deletefile (using the code that I've already posted), the font is added and subsequently removed from the .opf file and the Book View Fonts folder, but when I unzip the saved ePub file, it's still in the Fonts folder.

D.
Doitsu is offline   Reply With Quote
Old 11-25-2014, 05:05 PM   #35
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,160
Karma: 5450818
Join Date: Nov 2009
Device: many
Hi Doitsu,

I am confused. If you use bk.addfile to add a new file to the ebook and then use bk.deletefile to remove that same file, you should net to no change in the underlying epub? Or are you saying that a deletefile on some other file will not work after any addfile?

Please post your full testcase so that I can recreate what you are seeing exactly. The only code you had posted previously was mixing addfile and deleteotherfile which is always a mistake. If the file has been added to the manifest with addfile, you should delete it with deletefile NOT deleteotherfile.

Thanks,


Kevin



Quote:
Originally Posted by Doitsu View Post
Hi KevinH,

I installed all new files and didn't get any error messages. However, my test case still doesn't fully work.
When I add and remove a font with bk.addfile() and bk.deletefile (using the code that I've already posted), the font is added and subsequently removed from the .opf file and the Book View Fonts folder, but when I unzip the saved ePub file, it's still in the Fonts folder.

D.

Last edited by KevinH; 11-25-2014 at 05:10 PM.
KevinH is offline   Reply With Quote
Advert
Old 11-25-2014, 05:16 PM   #36
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,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
Hi Kevin,

Quote:
Originally Posted by KevinH View Post
I am confused. If you use bk.addfile to add a new file to the ebook and then use bk.deletefile to remove that same file, you should net to no change in the underlying epub? Or are you saying hat a deletefile on some other file will not work after any addfile?
To test bk.deletefile() I opened Sigil without a book ran the original plugin, which added the font file to the epub. So far so good. I then saved the file, reopened it, changed the the last file in the plugin code from:

Code:
    bk.addfile('doitsu', binary_file, data, 'application/x-font-ttf')
to:

Code:
    bk.deletefile('doitsu')
I then ran the modified plugin again, which removed the font that I added during the first run from the .opf file and the Book View Fonts folder but not the actual Fonts folder in the epub.

D.
Doitsu is offline   Reply With Quote
Old 11-25-2014, 05:56 PM   #37
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,160
Karma: 5450818
Join Date: Nov 2009
Device: many
Hi Doitsu!

Yes that is a bug! I can now recreate this when trying to delete any file in the original ebook. It just appears to go away but is still there somehow.

Unfortunately this bug is in the Sigil code base and not the launcher code so I can't fix this until the upcoming release, which should be soon but ...

I have just now committed a fix for this to my tree so that it is available when user-none does the official Sigil 0.8.2 builds. With this change Sigil will actually do the "physical" removal as well as the "logical" removal of the ebook.

There is no workaround I can do from my end. If you work on a Mac, I would be happy to build you a pre-release version of Sigil 0.8.2 so that you can continue to work. If Linux, I could probably get a Linux build done as well. Unfortunately, I do not own a Windows box and so could not make a build for you but perhaps DiapDealer would be willing to share his once he updates from my github tree to get this Sigil fix.

Thanks ever so much for catching this bug before the release!!!!!!

Take care,

Kevin


Quote:
Originally Posted by Doitsu View Post
Hi Kevin,

To test bk.deletefile() I opened Sigil without a book ran the original plugin, which added the font file to the epub. So far so good. I then saved the file, reopened it, changed the the last file in the plugin code from:

Code:
    bk.addfile('doitsu', binary_file, data, 'application/x-font-ttf')
to:

Code:
    bk.deletefile('doitsu')
I then ran the modified plugin again, which removed the font that I added during the first run from the .opf file and the Book View Fonts folder but not the actual Fonts folder in the epub.

D.
KevinH is offline   Reply With Quote
Old 11-25-2014, 06:04 PM   #38
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,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
Hi Kevin,

Quote:
Originally Posted by KevinH View Post
Thanks ever so much for catching this bug before the release.
Actually, all the credit goes to Toxaris who found the bug in the first place.

Quote:
Originally Posted by KevinH View Post
There is no workaround I can do from my end. If you work on a Mac, I would be happy to build you a pre-release version of Sigil 0.8.2 so that you can continue to work. If Linux, I could probably get a Linux build done as well.
Thanks for the kind offer, but I'm going to wait for the official 0.8.2 release.

D.
Doitsu is offline   Reply With Quote
Old 11-26-2014, 07:32 AM   #39
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by Doitsu View Post
Hi Kevin,


Actually, all the credit goes to Toxaris who found the bug in the first place.


Thanks for the kind offer, but I'm going to wait for the official 0.8.2 release.

D.
No problem, I am glad that it was on time! I only found out about it since I actually wanted an edit plugin instead of a output plugin.

I will hold up the release of the plugin now and wait for Sigil 0.8.2 for testing. I might build Sigil myself, as I have a windows development machine with VS2010, but I haven't gotten around to reading the build instructions yet.
Toxaris is offline   Reply With Quote
Old 11-28-2014, 07:54 PM   #40
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,160
Karma: 5450818
Join Date: Nov 2009
Device: many
Hi Doitsu and Toxaris,
user-none has just released Sigil 0.8.2 which should now do what you need to get deletefile and your plugins going.

Please let me know if you still run into any issues.

Thanks,

KevinH

Last edited by KevinH; 11-29-2014 at 12:53 AM.
KevinH is offline   Reply With Quote
Old 11-29-2014, 04:07 AM   #41
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,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
@KevinH: I did a quick test and it appears that bk.deletefile() now works as expected; it's also now possible to display print() messages while the plugin is running, which is very helpful for displaying status messages while processing a large number of files.

Thanks for your hard work. You've made the plugin interface even more useful.
Doitsu is offline   Reply With Quote
Old 11-29-2014, 10:21 AM   #42
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,044
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Adding my thanks for the unbuffered output as well. That makes a big difference on the debugging side of things!
DiapDealer is offline   Reply With Quote
Old 11-29-2014, 12:35 PM   #43
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by KevinH View Post
Hi Doitsu and Toxaris,
user-none has just released Sigil 0.8.2 which should now do what you need to get deletefile and your plugins going.

Please let me know if you still run into any issues.

Thanks,

KevinH
Will do and if it works I can release it tonight!
Toxaris is offline   Reply With Quote
Old 11-29-2014, 03:59 PM   #44
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 18,301
Karma: 16071131
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
PunctuationSmarten

After installimg Sigil 8.1, I'm getting the following error from PunctuationSmarten.

Changes made to Text/East and West-Poems.htm
<?xml version="1.0" encoding="UTF-8"?>
<wrapper type="edit">
<result>success</result>
<changes>
<modified href="OEBPS/Text/East and West-Poems.htm" id="East_and_West-Poems.htm" media-type="application/xhtml+xml" />
</changes>
<msg>
Changes made to Text/East and West-Poems.htm
</msg>
</wrapper>
Attached Thumbnails
Click image for larger version

Name:	error.png
Views:	882
Size:	14.7 KB
ID:	131752  
crutledge is offline   Reply With Quote
Old 11-29-2014, 04:32 PM   #45
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,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by crutledge View Post
After installimg Sigil 8.1, I'm getting the following error from PunctuationSmarten.
This usually only happens if invalid .html files are processed with plugins.
1. Did you check the epub with epubcheck before you ran the plugin?
2. Did you install PunctuationSmarten_v0.1.0.zip?

If you checked the epub with epubcheck (not FlightCrew) and installed PunctuationSmarten_v0.1.0.zip you'll need to attach an epub that generates this error.

Last edited by Doitsu; 11-29-2014 at 04:34 PM.
Doitsu is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading Plugin in development Sladd Development 6 06-17-2014 07:57 PM
Question for plugin development gurus DiapDealer Plugins 2 02-05-2012 12:33 AM
DR800 Plugin development for DR800/DR1000 yuri_b iRex Developer's Corner 0 09-18-2010 10:46 AM
Device plugin development reader42 Plugins 10 03-29-2010 01:39 PM
Calibre plugin development - Newbie problems minstrel Plugins 5 04-12-2009 01:44 PM


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


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