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-01-2016, 11:33 AM   #76
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,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
epubcheck mimetype bug checker for Windows

exaltedwombat found a bug in version 0.3 of the epubcheck plugin that causes Sigil to write an ePub with two mimetype entries in the ePub file list. (For more information see this thread.)
This bug has been fixed in the latest epubcheck plugin version (0.3.5), which has been attached to the first post in this thread.

If you saved an ePub file immediately after running the old epubcheck plugin, you might have created an ePub file with two mimetype file entries.
You can tell whether ePubs that you've edited are affected by this bug, by opening them with an archive manager, e.g. 7Zip. If you see two mimetype files, your ePub file has been saved with an invalid zip file list and you'll need to re-open and re-save the ePub file(s) with Sigil or Calibre Editor.

I created a batch file that'll help you track down these files.

Prerequisites: Download and install 7Zip (both the GUI version and the standalone console version).

1. Extract 7za.exe from 7z1514-extra.7z to a temporary folder.

2. Create a text file with the follwing contents in the same folder:

Code:
FOR /R %%f IN ("*.epub") DO  (
    echo %%f >> mimetype.log
	7za l "%%f" | findstr -N "mimetype" | find /c ":" >> mimetype.log
)
3. Rename the text file to mimetype.cmd.

4. Copy both mimetype.cmd and 7za.exe to your ePub folder and double-click mimetype.cmd. This will recursively search that folder as well as all sub-folders for ePubs and write the results to mimetype.log. (If you don't want to search subfolders change FOR /R to FOR).

5. Open mimetype.log with a text editor and look for ePub file names followed by a 2, which indicates ePub files with two mimetype file list entries.
Doitsu is offline   Reply With Quote
Old 01-02-2016, 01:33 PM   #77
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,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I realized I never got back to this after promising to take a look.

I don't see anything in the update checker portion (or the rest of the plugin) that could cause the plugin to be removed from the list of installed plugins.

I did notice, however, the exception when on Windows to ignore any errors when attempting to delete the temp directory.

Code:
# delete temp folder
ignore_errors = (sys.platform == 'win32')
shutil.rmtree(temp_dir, ignore_errors)
The reason errors are being raised on Windows is because you're cd'ing into temp directory in the beginning of the plugin.
Code:
# create mimetype file
os.chdir(temp_dir)
mimetype = open("mimetype", "w")
mimetype.write("application/epub+zip")
mimetype.close()
Windows won't let you delete the working directory (which is what 'temp_dir' became when you did the os.chdir call). Either change to a different directory before attempting to delete it, or never cd into it in the first place. That way you won't be leaving temp directories behind on Windows (ignoring the error does just that).

Something like:
Code:
# create mimetype file
mimetype = open(os.path.join(temp_dir, "mimetype"), "w")
mimetype.write("application/epub+zip")
mimetype.close()
...should work without actually cd'ing into the directory. You could still ignore errors on Windows if you like, but I guarantee there would be a lot less errors to ignore (and a lot less tmp folders left behind).
DiapDealer is offline   Reply With Quote
Advert
Old 01-02-2016, 02:30 PM   #78
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: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Doitsu View Post
Prerequisites: Download and install 7Zip (both the GUI version and the standalone console version).
Why not make a ZIP file of the batch file and all the bits needed? Unless you have 7-zip, you cannot get the standalone version because you then need 7-zip to get at it. And you also have to install 7-zip. This just makes it a PIA. The Kobo patches come with all the utilties needed to do the job and that just makes it much easier.
JSWolf is offline   Reply With Quote
Old 01-02-2016, 03:18 PM   #79
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,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
@DiapDealer: Thank you very much for your thorough code review!!!

                        

I've implemented all your suggestions and attached a new version.

Quote:
Originally Posted by JSWolf View Post
Why not make a ZIP file of the batch file and all the bits needed?
1. There are 32bit and 64bit versions of 7za.exe and some users simply won't run re-packaged executable files at all, unless they can validate the integrity of the files. Unfortunately, the developer didn't provide checksum files.

2. Usually, developers insist on their files being redistributed in their original archives.
Doitsu is offline   Reply With Quote
Old 01-02-2016, 11:36 PM   #80
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
2) Nu-uh.

7-Zip is open-source.

Last edited by eschwartz; 01-04-2016 at 03:53 PM. Reason: typo
eschwartz is offline   Reply With Quote
Advert
Old 01-03-2016, 03:25 AM   #81
rubeus
Banned
rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.
 
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
Open source does not mean you can do what you want. It just says: You may have a look at the source.
rubeus is offline   Reply With Quote
Old 01-04-2016, 03:52 PM   #82
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by rubeus View Post
Open source does not mean you can do what you want. It just says: You may have a look at the source.
Methinks you could use a read-through of the definition of Open-Source Software and related Wikipdia article.

tl;dr Eyeballing the source code is only one of several rights inherent in the standardized definition of Open-Source.

Last edited by eschwartz; 01-04-2016 at 04:07 PM. Reason: fixed link
eschwartz is offline   Reply With Quote
Old 01-04-2016, 03:58 PM   #83
rubeus
Banned
rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.
 
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
SAP is Open Source. You can study it, but you cant distribute it due its license. In this case the definition of Open Source in Wikipedia(en) is bullshit.
rubeus is offline   Reply With Quote
Old 01-04-2016, 04:11 PM   #84
Blossom
Treasure Seeker
Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.
 
Blossom's Avatar
 
Posts: 18,708
Karma: 26026435
Join Date: Mar 2010
Device: Kobo HD Glo, Kindles, Kindle Fires, Andriod Devices
Doitsu has requested that his thread stay on topic so please take the open source discussion to the appropriate forum.
Blossom is offline   Reply With Quote
Old 01-10-2016, 11:11 AM   #85
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
Java 1.6

I am totally unfamiliar with java.
Would you please provide me with a URL to Java 1.6 for Win 7 64bit.

Thank you.
crutledge is offline   Reply With Quote
Old 01-10-2016, 11:16 AM   #86
rubeus
Banned
rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.
 
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
http://www.oracle.com/technetwork/ja...s-2133154.html

This is the Server Version. It does not require a server operating system, it perfectly runs on any client. The advantage: it does not come with any browser plugin not opening any security issues. Disadvantage: it just copies the file to your disk - you have to set environment variables and file associations for yourself.
rubeus is offline   Reply With Quote
Old 01-10-2016, 11:40 AM   #87
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,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by crutledge View Post
I am totally unfamiliar with java.
Would you please provide me with a URL to Java 1.6 for Win 7 64bit.
The download link for the current 64bit Windows Java version is here.

After installing Java, you'll need to open a command prompt window and enter the following command to check the availability of Java:

Code:
java -version
If you don't get a version information message, you'll need to manually add the Java path to the Path environment variable following the instructions in the first post.

If you don't get a message about disabled browser extensions during the Java installation, you'll need to manually disable the Java browser extensions.
Doitsu is offline   Reply With Quote
Old 01-10-2016, 12:35 PM   #88
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Easiest is to install this here: https://chocolatey.org/packages/javaruntime

Will download and install the latest version of java, auto-decline the bundled malware , and set the appropriate environment variables.
Chocolatey is a general must-have for Windows, really.
eschwartz is offline   Reply With Quote
Old 04-23-2016, 04:13 PM   #89
wrCisco
Enthusiast
wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.
 
Posts: 34
Karma: 467802
Join Date: Apr 2016
Device: none
Hello everyone, I was trying the Epubcheck plugin but I got this error:

Running ePubCheck ... please wait
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/francesco/Library/Application Support/sigil-ebook/sigil/plugins/EpubCheck/plugin.py", line 43, in run
epc_errors = result[1].decode(os_encoding).split('\n')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 136: ordinal not in range(128)
Error: 'ascii' codec can't decode byte 0xc3 in position 136: ordinal not in range(128)

I'm using Sigil 0.9.5 in MacOSX 10.11 and the bundled python interpreter.
If I change the value of os_encoding from locale.getpreferredencoding() (which seems to be US-ASCII unless I start the interpreter from the bash, in which case it is utf-8) to 'utf-8' all goes well, so it's not a big deal to me, but a more general solution would be probably better.

Thanks!
wrCisco is offline   Reply With Quote
Old 04-23-2016, 07:44 PM   #90
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,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Thanks for the bug report!

Quote:
Originally Posted by wrCisco View Post
If I change the value of os_encoding from locale.getpreferredencoding() (which seems to be US-ASCII unless I start the interpreter from the bash, in which case it is utf-8) to 'utf-8' all goes well, so it's not a big deal to me, but a more general solution would be probably better.
Unfortunately, I don't have a Mac and os_encoding = locale.getpreferredencoding() works for both ًWindows and Linux machines. BTW, the line is required because Windows machines don't use utf-8 as the default locale. (My machine uses cp1252.)
I'll fix this when the IDPF releases the next ePubCheck version.
Doitsu is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] PunctuationSmarten Sigil plugin DiapDealer Plugins 138 07-11-2023 11:22 AM
[Plugin] KindleImport Sigil plugin DiapDealer Plugins 187 07-04-2022 10:11 AM
Sigil Plugin Index Thasaidon Plugins 0 10-04-2014 07:41 AM
FC and Sigil 0.5.3 ePUBcheck failure Hitch Sigil 32 04-17-2012 02:56 AM
Web-based epubcheck upgraded to epubcheck 1.0.5 kjk ePub 4 02-09-2010 09:53 PM


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


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