01-01-2016, 11:33 AM | #76 |
Grand Sorcerer
Posts: 5,635
Karma: 23191067
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 ) 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. |
01-02-2016, 01:33 PM | #77 |
Grand Sorcerer
Posts: 27,902
Karma: 198500000
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) Code:
# create mimetype file os.chdir(temp_dir) mimetype = open("mimetype", "w") mimetype.write("application/epub+zip") mimetype.close() Something like: Code:
# create mimetype file mimetype = open(os.path.join(temp_dir, "mimetype"), "w") mimetype.write("application/epub+zip") mimetype.close() |
Advert | |
|
01-02-2016, 02:30 PM | #78 | |
Resident Curmudgeon
Posts: 75,865
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
01-02-2016, 03:18 PM | #79 | |
Grand Sorcerer
Posts: 5,635
Karma: 23191067
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:
2. Usually, developers insist on their files being redistributed in their original archives. |
|
01-02-2016, 11:36 PM | #80 |
Ex-Helpdesk Junkie
Posts: 19,421
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 |
Advert | |
|
01-03-2016, 03:25 AM | #81 |
Banned
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.
|
01-04-2016, 03:52 PM | #82 | |
Ex-Helpdesk Junkie
Posts: 19,421
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:
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 |
|
01-04-2016, 03:58 PM | #83 |
Banned
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.
|
01-04-2016, 04:11 PM | #84 |
Treasure Seeker
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.
|
01-10-2016, 11:11 AM | #85 |
eBook FANatic
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. |
01-10-2016, 11:16 AM | #86 |
Banned
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. |
01-10-2016, 11:40 AM | #87 | |
Grand Sorcerer
Posts: 5,635
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
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 message about disabled browser extensions during the Java installation, you'll need to manually disable the Java browser extensions. |
|
01-10-2016, 12:35 PM | #88 |
Ex-Helpdesk Junkie
Posts: 19,421
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. |
04-23-2016, 04:13 PM | #89 |
Enthusiast
Posts: 38
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! |
04-23-2016, 07:44 PM | #90 | |
Grand Sorcerer
Posts: 5,635
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Thanks for the bug report!
Quote:
I'll fix this when the IDPF releases the next ePubCheck version. |
|
|
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 |