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 01-02-2018, 05:45 PM   #121
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: 7,630
Karma: 5433388
Join Date: Nov 2009
Device: many
Note, filesystem/path encodings in Python can differ greatly on Windows from the utf-8 standard used on Linux and Macs.

So if you are trying to convert a bytestring in Python that contains a path or partial path to full unicode you should probably decode it using sys.getfilesystemencoding() to create a full unicode string and then encode that into utf-8 for printing.

Alternatively, you can use 'replace' with decode and encode routines to prevent problems with unknown bytestrings.

See my unipath.py code here for routines for fighting this battle:

https://github.com/Sigil-Ebook/Sigil...hon/unipath.py
KevinH is offline   Reply With Quote
Old 01-03-2018, 02:37 PM   #122
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
Thanks Kevin, I will take a look of that. As my main platform is Windows (although currently I develop on Linux for Python), I would have never catched this.
Toxaris is offline   Reply With Quote
Old 01-03-2018, 03:07 PM   #123
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: 7,630
Karma: 5433388
Join Date: Nov 2009
Device: many
Python 3.6 has a new PEP 528 and PEP 529 that changes things for paths on Windows.

Windows is hard but Python 3.6 and sys.getfilesystemencoding() will fix most of this. The real problem for paths in Python is in Linux which can theoretically use arbitrary bytes sequences with no encoding at all inside file paths when the C-locale is set by the user forcing the use of surrogateescape to smuggle/hide these non-utf-8 byte sequences into utf-8 strings. But, of course these can not be printed either!

https://www.python.org/dev/peps/pep-0528/

https://www.python.org/dev/peps/pep-0529/
KevinH is offline   Reply With Quote
Old 04-13-2018, 02:00 PM   #124
big_smile
Junior Member
big_smile began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Apr 2018
Device: Kindle
Hope it's okay to bump this, but I am having an issue.

I have installed the latest Sigil on my Mac. I have also installed Mono Framework from here.

However, when I run ePub optimizer, I get the following error message:
Quote:
Status: failed

mono /Users/appleuser/Library/Application Support/sigil-ebook/sigil/plugins/ePUBOptimizer/ePUBOptimizer.exe /Users/appleuser/Library/Application Support/sigil-ebook/sigil/plugins/ePUBOptimizer/dummy.epub
Traceback (most recent call last):
File "/Applications/Sigil.app/Contents/plugin_launchers/python/launcher.py", line 135, in launch
self.exitcode = target_script.run(container)
File "/Users/appleuser/Library/Application Support/sigil-ebook/sigil/plugins/ePUBOptimizer/plugin.py", line 95, in run
result = OptiWrapper(*args)
File "/Users/appleuser/Library/Application Support/sigil-ebook/sigil/plugins/ePUBOptimizer/plugin.py", line 146, in OptiWrapper
process = Popen(list(args), stdout=PIPE, stderr=PIPE)
File "subprocess.py", line 947, in __init__
File "subprocess.py", line 1551, in _execute_child
FileNotFoundError: [Errno 2] No such file or directory: 'mono'
Error: [Errno 2] No such file or directory: 'mono'
I don't understand why it says no mono as I have installed the framework.

I am running Mac Os 10.13.4
big_smile is offline   Reply With Quote
Old 04-13-2018, 02:37 PM   #125
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,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
It just can't find the mono binary for some reason.

At a guess (defer to Toxaris' advice if and when he responds), I'd say mono needs to be in the Path for the plugin to find it. Was there an option for adding Mono to the Path when installing it?

Last edited by DiapDealer; 04-13-2018 at 02:46 PM.
DiapDealer is offline   Reply With Quote
Old 04-13-2018, 03:38 PM   #126
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,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
@big_smile: If you've Calibre installed on your Mac, you can also use Polish Books. (It also uses cjpeg, jpegtran and optipng for lossless image compression.)

@DiapDealer: Even though I have Mono installed on my Arch Linux machine I never could get the plugin to work. Does it work on your Linux machine?
Doitsu is offline   Reply With Quote
Old 04-14-2018, 06:13 AM   #127
big_smile
Junior Member
big_smile began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Apr 2018
Device: Kindle
Quote:
Originally Posted by Doitsu View Post
@big_smile: If you've Calibre installed on your Mac, you can also use Polish Books. (It also uses cjpeg, jpegtran and optipng for lossless image compression.)
Thanks, I'll give a try!
Does it do all the shrinking to ebooks that ePUB Optimizer does?

Quote:
Originally Posted by DiapDealer View Post
It just can't find the mono binary for some reason.

At a guess (defer to Toxaris' advice if and when he responds), I'd say mono needs to be in the Path for the plugin to find it. Was there an option for adding Mono to the Path when installing it?
No, it didn't give an option. Do you know which path it should be in? Maybe I can move it manually. Thanks for your help!
big_smile is offline   Reply With Quote
Old 04-14-2018, 07:35 AM   #128
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,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Doitsu View Post
@DiapDealer: Even though I have Mono installed on my Arch Linux machine I never could get the plugin to work. Does it work on your Linux machine?
I've never tried. I was just giving some quick advice as to what sounded reasonable. I just sort of assumed the plugin had been vetted on a Mac.
DiapDealer is offline   Reply With Quote
Old 04-14-2018, 07:49 AM   #129
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,887
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
OS X 10.13.4 will only run 64-bit software. That means that if anything in Sigil relies on 32-bit code, it won't work. So that means even Python has to be 64-bit.
JSWolf is offline   Reply With Quote
Old 04-14-2018, 08:35 AM   #130
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: 7,630
Karma: 5433388
Join Date: Nov 2009
Device: many
No, 32 bit software still runs fine in OSX with the latest update. It will just warn you that with the next major update it will not.

On OSX, python is embedded in Sigil and everything already is 64 bit and has been for years.
KevinH is offline   Reply With Quote
Old 04-14-2018, 01:51 PM   #131
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
The plugin will not search for mono. It should be in the path so it can be called directly. Open an command prompt and just run mono to see if it is in the path. If not, you could try 'which mono' to see if you can find a path and adapt that yourself in the plugin call.

If you don't use fonts in your ePUB, Polish Ebooks will do the same.
Toxaris is offline   Reply With Quote
Old 04-14-2018, 02:48 PM   #132
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,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Doitsu View Post
@DiapDealer: Even though I have Mono installed on my Arch Linux machine I never could get the plugin to work. Does it work on your Linux machine?
I got it working, yes.

In addition to mono, you need to install the VisualBasic.Net interpreter: mono-basic from the AUR.

Make sure you run:

Code:
export TERM=xterm
before trying to build mono-basic (as per the latest comments).

After that, the plugin completed successfully. I didn't try it on anything but the simple, default empty plugin, but there were no errors. Hope that helps Arch users.

EDIT: and of course; libjpeg-turbo, optipng, and gifsicle for the image stuff

Last edited by DiapDealer; 04-14-2018 at 02:55 PM.
DiapDealer is offline   Reply With Quote
Old 04-14-2018, 03:02 PM   #133
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,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by DiapDealer View Post
In addition to mono, you need to install the VisualBasic.Net interpreter: mono-basic from the AUR.
Thanks for your research! After installing mono-basic the plugin worked fine.
Doitsu is offline   Reply With Quote
Old 10-24-2019, 07:55 PM   #134
fdwojo
Member
fdwojo began at the beginning.
 
fdwojo's Avatar
 
Posts: 21
Karma: 10
Join Date: Jun 2012
Device: Samsung Note20 Ultra, Kindle Fire HD10
Red face Mabye an Oopsie in the URL to download the plugin?

I apologize if you were aware of it, but I was attempting to download the latest (0.73) version of the SIGIL Plugin, but the link you showed (below) wasn't working.

Quote:
Originally Posted by Toxaris View Post
The plugin can be found here.
So, after going to your main page, I realized the the true address should have been:

http://toxaris.nl/optimizer.html

I'm going to guess that though there might have been many people who were able to figure it out like I did, you might want to actually update your post to help those who were not able to get to the correct destination?

Sorry to bother you.

Frank
fdwojo is offline   Reply With Quote
Old 09-29-2021, 04:22 PM   #135
phillipgessert
Addict
phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.
 
phillipgessert's Avatar
 
Posts: 311
Karma: 3196258
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
Have any macOS users used this lately? I'm having a heck of a time getting it to find mono. I installed mono via the instructions here: https://www.mono-project.com/docs/ge...d/install/mac/, which places it in /Library/Frameworks/Mono.framework. I added a symlink to it in my PATH, and it appears to work in Terminal (in that tab/autocomplete on "mono" pulls it up), but the plugin still fails for me with "Error: [Errno 2] No such file or directory: 'mono'".

I'm sure I'm either overlooking something obvious or have done something silly here, if anyone has any ideas for things I might try, I'd be very grateful.

Last edited by phillipgessert; 09-29-2021 at 04:25 PM.
phillipgessert is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Comic optimizer script rhon Kobo Reader 0 11-08-2012 06:04 PM
Mokle - Mangas Optimizer for Kindle devorez Kindle Developer's Corner 11 08-14-2012 07:15 PM
Patent/Heavy graphics pdfs and Adobe PDF Optimizer andrewscheinman iRex 4 12-26-2009 11:39 AM
epub, ePub, EPUB, warum blos ePub? flowoeB Lounge 5 11-27-2009 09:37 AM
PRS-500 PDF file optimizer phigdon Sony Reader Dev Corner 1 04-01-2007 11:40 PM


All times are GMT -4. The time now is 01:56 AM.


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