Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 09-15-2014, 06:13 PM   #1
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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Sigil Plugins (for Sigil 0.7xx Alpha)

Thought I'd start a separate thread for plugin's that can be used with the latest 0.7.700 Alpha build of Sigil. No use clogging up that thread with questions/suggestions about the plugins themselves. If that doesn't make sense, one of the mods could merge this with the other thread if they like.

Anyway. I have an updated version of the KindleImport plugin. In addition to being able to unpack/open the KF8 sections of files, it also takes a pretty serious stab at opening the older style mobi-only files (thanks to KevinH for contributions/suggestions on that front). Also, if the original source package is a part of the file (think kindlegen output) and the original source is an epub, then the plugin will open that instead of using the unpacked version.

* Please note that there's some atrociously bad markup in many older mobi files (even retail ones), so while the plugin tries its best to whip that markup into some semblance of validity, it's still in your best interest to allow Sigil to correct any issues it may detect upon first opening. *



I'm also attaching a Punctuation smartening plugin. It's basically the same plugin as the one I did for calibre's editor, but modified to work with Sigil. It gives you a little more granular control over the SmartyPants engine and adds the ability to define an apostrophe exceptions file for words like ('tis and such). Simply put one word per line (without the apostrophe) in a text file and it will give those words the proper apostrophe instead of a left (opening) single quote.

** Because of a temporary situation with the Sigil Python 2.7 plugin framework, this plugin won't currently work with files whose names happen to have a space in them in Sigil's book browser (even if they show up as being url-quoted in the OPF). A fix has been found and is pending.**

EDIT: also going to attach a sample apostrophe exceptions file. Be cautious that you don't include something that could be a word in its own right that just happens to follow a single quote.

EDIT 2: Removing older plugin attachments since they won't work properly with the v0.8.0 release of Sigil as packaged.
Attached Files
File Type: txt apos_exceptions.txt (130 Bytes, 314 views)

Last edited by DiapDealer; 09-27-2014 at 05:17 PM.
DiapDealer is offline  
Old 09-17-2014, 07:16 PM   #2
JimmyG
Zealot
JimmyG solves Fermat’s last theorem while doing the crossword.JimmyG solves Fermat’s last theorem while doing the crossword.JimmyG solves Fermat’s last theorem while doing the crossword.JimmyG solves Fermat’s last theorem while doing the crossword.JimmyG solves Fermat’s last theorem while doing the crossword.JimmyG solves Fermat’s last theorem while doing the crossword.JimmyG solves Fermat’s last theorem while doing the crossword.JimmyG solves Fermat’s last theorem while doing the crossword.JimmyG solves Fermat’s last theorem while doing the crossword.JimmyG solves Fermat’s last theorem while doing the crossword.JimmyG solves Fermat’s last theorem while doing the crossword.
 
Posts: 119
Karma: 28454
Join Date: Apr 2011
Location: Yuma, AZ
Device: Kindle Touch, Voyage
Added the Smarty plugin, works great. Thanks!
JimmyG is offline  
Advert
Old 09-19-2014, 03:47 PM   #3
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
Pluigins for Dummys

I am using win 7 pro.

I have installed Python 2,7 as shown in the attached image.

I downloaded your plugins into the Sigil folder and they show up in the folder directory.

I select Add Plugin and the zip files don't appear.

What has this dummy done wrong???
Attached Thumbnails
Click image for larger version

Name:	pref.png
Views:	351
Size:	33.3 KB
ID:	128580  
crutledge is offline  
Old 09-19-2014, 04:01 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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by crutledge View Post
I am using win 7 pro.

I have installed Python 2,7 as shown in the attached image.

I downloaded your plugins into the Sigil folder and they show up in the folder directory.
You don't need to put the downloaded zip files anywhere special (I probably wouldn't put them in Sigil's program directory, actually). Just put them in Downloads or Documents.

Quote:
I select Add Plugin and the zip files don't appear.

What has this dummy done wrong???
They won't just "appear." You just need to browse to wherever those zip files are. Like any other Windows file selection dialog, just browse to the folder on your drive where the plugins were put, select the plugin file (zip) and click open.

Also ...your Windows explorer may be set up to hide file extensions, so maybe you're not seeing the .zip part. But even so, the filename should be recognizable and the icon will probably look like zipper. I'm afraid I don't know off-hand what you need to do to show all file-extensions on Windows any more.

Last edited by DiapDealer; 09-19-2014 at 04:17 PM.
DiapDealer is offline  
Old 09-19-2014, 04:33 PM   #5
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
Exception file

Where do I put the Apostrophe Exception file?
crutledge is offline  
Advert
Old 09-19-2014, 04:47 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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by crutledge View Post
Where do I put the Apostrophe Exception file?
Anywhere you want to. When you run the plugin for the first time, you tell it where the apostrophe exception file is located. It should remember that location for subsequent runs.
DiapDealer is offline  
Old 09-19-2014, 06:45 PM   #7
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
Quote:
Originally Posted by DiapDealer View Post
Anywhere you want to. When you run the plugin for the first time, you tell it where the apostrophe exception file is located. It should remember that location for subsequent runs.
Thank you, sir.
Is it a possibility that the Calibre translators/converters can be added as a plug-in?
crutledge is offline  
Old 09-19-2014, 07:52 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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by crutledge View Post
Thank you, sir.
Is it a possibility that the Calibre translators/converters can be added as a plug-in?
You mean converting the current epub to the various ebook formats that calibre supports (using calibre)?

As long as calibre is installed on the machine in question, I see no reason an output plugin couldn't build the necessary command and farm it out to calibre's command-line interface for conversion.
DiapDealer is offline  
Old 09-20-2014, 09:13 AM   #9
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
Punctuation Smarten

I start Edit-Punctuation Smarten.

Press Start and a window opens
The Status begins sweeping
All options are selected
Press Process

All actions stop and no change is made to the file.

I guess I'm very dumb.
crutledge is offline  
Old 09-20-2014, 10:30 AM   #10
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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by crutledge View Post
I start Edit-Punctuation Smarten.

Press Start and a window opens
The Status begins sweeping
All options are selected
Press Process

All actions stop and no change is made to the file.

I guess I'm very dumb.
Have you selected any files for it to process in the plugin's file selection Listbox? You can process individual files or any combination (including all files) to process. Using the standard ctrl and shift keys while selecting will handle selecting (or unselecting) multiple files. Highlight the first file, scroll down and hold the shift key down while clicking the last file to select them all.

I have plans to make it easier to select all files, as well as give a warning if no files have been selected when clicking "Process," but I haven't gotten around to it quite yet.

NOTE: being able to detect which files are selected in Sigil's Book Browser is currently not something a plugin (or plugin developer) is capable of doing in this Sigil alpha. Hence the need to choose the files from within the plugin. It's either that, or offer the user no choice and just apply the plugin to all files. Not sure if Sigil's selected resources will be passed to the plugin framework in future versions of Sigil or not. I know the topic has come up.

Last edited by DiapDealer; 09-20-2014 at 10:37 AM.
DiapDealer is offline  
Old 09-20-2014, 06:10 PM   #11
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
I get this error when I run Smarten
Is there something else I need to do?

Status: failed

Quote:
Traceback (most recent call last):
File "C:\Program Files\Sigil\plugin_launchers\\python2_7\launcher.p y", line 113, in launch
self.exitcode = target_script.run(container)
File "C:\Users\Owner\AppData\Local\sigil-ebook\sigil\plugins\PunctuationSmarten\Punctuation Smarten.py", line 364, in run
html = bk.readfile(id)
File "C:\Program Files\Sigil\plugin_launchers\python2_7\bookcontain er.py", line 85, in readfile
return self._w.readfile(id)
File "C:\Program Files\Sigil\plugin_launchers\python2_7\wrapper.py" , line 316, in readfile
raise WrapperException('Id does not exist in manifest')
WrapperException: Id does not exist in manifest
Error: Id does not exist in manifest
crutledge is offline  
Old 09-20-2014, 06:43 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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by crutledge View Post
I get this error when I run Smarten
Is there something else I need to do?

Status: failed
That's the Python plugin framework bug I mentioned in the first post concerning filenames with spaces in them.

Quote:
Originally Posted by DiapDealer View Post
** Because of a temporary situation with the Sigil Python 2.7 plugin framework, this plugin won't currently work with files whose names happen to have a space in them in Sigil's book browser (even if they show up as being url-quoted in the OPF). A fix has been found and is pending.**
Should be fixed in the next Sigil ALPHA/BETA (or it's a fairly simple tweak to one of the Python files in Sigil's program directory for the adventurous). It's either that or rename the epub's chapter files (with Sigil) so there's no spaces.

Last edited by DiapDealer; 09-20-2014 at 06:48 PM.
DiapDealer is offline  
Old 09-21-2014, 10:32 AM   #13
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
Quote:
Originally Posted by DiapDealer View Post
That's the Python plugin framework bug I mentioned in the first post concerning filenames with spaces in them.



Should be fixed in the next Sigil ALPHA/BETA (or it's a fairly simple tweak to one of the Python files in Sigil's program directory for the adventurous). It's either that or rename the epub's chapter files (with Sigil) so there's no spaces.
Many thanks. Have run into that before and should read the entire thread.

Question:

Does Python have a compile option so that the entire Python need not be loaded?
crutledge is offline  
Old 09-21-2014, 11:38 AM   #14
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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by crutledge View Post
Does Python have a compile option so that the entire Python need not be loaded?
The "entire Python" is never really loaded to begin with. The various modules/libraries that each script requires are imported by the interpreter at run time.

You certainly have the option to custom compile your own version of Python in order to leave out certain libraries/modules. But that's not really going to affect the overall resource/performance overhead (and runs the risk of leaving out something a plugin needs to run), it's just going to reduce the amount of disk-space Python takes up in your filesystem.
DiapDealer is offline  
Old 09-22-2014, 07:40 PM   #15
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by DiapDealer View Post
The "entire Python" is never really loaded to begin with. The various modules/libraries that each script requires are imported by the interpreter at run time.
To add to this Python is started when the plugin is run and stops when the plugin stops. It's not resident in memory or hanging around when a plugin isn't actively running.
user_none is offline  
Closed Thread


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sigil Plugins! DiapDealer Sigil 33 03-19-2016 08:18 PM
Epub crashes on Sigil for Mac, OK on Sigil for PC crystamichelle Sigil 6 08-14-2013 02:52 PM
Sigil 0.4.1 : unwanted span added by Sigil Bertrand Sigil 0 09-02-2011 05:28 AM
Sigil 0.3.4 / Sigil 0.4.0 RC1 / Cover in Nook Color Bertrand Sigil 13 08-06-2011 04:06 AM
Sigil 0.3.4 / Problème CSS entre Sigil et iPad Grivels Software 10 07-03-2011 09:06 AM


All times are GMT -4. The time now is 05:44 PM.


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