11-03-2012, 04:48 AM | #61 |
The Grand Mouse 高貴的老鼠
Posts: 72,295
Karma: 309002296
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
When you upload a book to KDP for Amazon to sell, they strip the file into parts anyway. The source never gets to customers.
It probably won't do any harm to upload a stripped book, but it won't do any good, either. Best to be cautious and send them the unaltered output from KindleGen if at all possible. Last edited by pdurrant; 12-27-2012 at 04:58 PM. Reason: typo |
11-03-2012, 05:54 PM | #62 |
Member
Posts: 18
Karma: 10
Join Date: Jun 2012
Device: kindle fire,android
|
So would it be best if you had a situation like steppe?
Sideloading a very big image book? |
Advert | |
|
11-03-2012, 06:04 PM | #63 |
The Grand Mouse 高貴的老鼠
Posts: 72,295
Karma: 309002296
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
If it's for you own use, by all means strip the source. Steppe was uploading a very large book to Amazon's KDP service, it was above their maximum allowed upload file size before having the source stripped.
|
11-24-2012, 11:20 PM | #64 |
Member
Posts: 10
Karma: 10
Join Date: Jan 2012
Device: Kindle
|
I made a few modifications to get it to work with Python 3 - it still works in Python 2.7 (and likely 2.6 as well, but I haven't tested that).
Ran it through 2to3, which switched the print statements to a function by adding parentheses, and switched xrange to range. Then marked five strings ('NONE', 'EXTH', 'BOOKMOBI', 'SRCS', and '\0') with a "b" to mark them as byte strings rather than Unicode. |
11-25-2012, 06:33 AM | #65 |
The Grand Mouse 高貴的老鼠
Posts: 72,295
Karma: 309002296
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Certainly Python 3.x is the way to go eventually, but I'm not willing to switch yet, as the default Python installation on Mac OS X 10.6 is Python 2.5, which doesn't know about the b for byte strings.
But perhaps I should think about it a bit more. Thanks. |
Advert | |
|
12-10-2012, 08:11 PM | #66 |
Junior Member
Posts: 9
Karma: 10
Join Date: Nov 2012
Location: Germany
Device: Pocketbook Era Color
|
I had some trouble with the latest Version of KindleStrip (from THIS post) under ActivePython v3.2.2.3 (Win64-x64).
Error Message on first try: Code:
File "D:\Work\XAMPP\htdocs\test\kindlestrip_py3.py", line 224, in <module> data_file = file(infile, 'rb').read() NameError: name 'file' is not defined Code:
Traceback (most recent call last): File "D:\Work\XAMPP\htdocs\test\kindlestrip_py3.py", line 228, in <module> print("Header Bytes: " + binascii.b2a_hex(strippedFile.getHeader())) TypeError: Can't convert 'bytes' object to str implicitly Spoiler:
For a project of mine i created this PHP port of KindleStrip: Spoiler:
### EDIT ### I decided to switch to Java for my Project.. so here is a implementation in Java Spoiler:
Big to pdurrant (and contributors!) for KindleStrip Last edited by Padde; 12-21-2012 at 12:52 AM. |
12-10-2012, 10:08 PM | #67 |
Booklegger
Posts: 1,801
Karma: 7999816
Join Date: Jun 2009
Location: Toronto, Ontario, Canada
Device: BeBook(1 & 2010), PEZ, PRS-505, Kobo BT, PRS-T1, Playbook, Kobo Touch
|
As pdurrent points out in the post above yours, KindleStrip uses Python 2.x still, so you will have to install an older version of ActivePython. You should be able to have both installed in separate directories. Python 3 is the way of the future, but it is significantly different from, and incompatible with, Python 2.x.
|
12-11-2012, 04:01 AM | #68 |
Junior Member
Posts: 9
Karma: 10
Join Date: Nov 2012
Location: Germany
Device: Pocketbook Era Color
|
Well my point was that it works with Python 3 after applying the changes in the "Bugfixed portion of Code" Spoiler
|
01-27-2013, 01:08 PM | #69 |
Member
Posts: 10
Karma: 10
Join Date: Jan 2013
Device: Kindle Paperwhite
|
Today i tried to make a mobi file with kindlegen but when i used your program, this error appeared
Code:
D:\Sync\kcc-master\kcc>python.exe kindlestrip.py D:\Sync\Tools\kcc-master\kcc\content.mobi D:\crossgame1.mobi KindleStrip v1.35. Written 2010-2012 by Paul Durrant and Kevin Hendricks. Found SRCS section number 1536, and count 2 beginning at offset 111a4084 and ending at offset 10fb9863 Traceback (most recent call last): File "kindlestrip.py", line 235, in <module> main(sys.argv[1:]) File "kindlestrip.py", line 214, in main strippedFile = SectionStripper(data_file) File "kindlestrip.py", line 197, in __init__ self.data_file = self.data_file[0:offset0] + mobiheader + self.data_file[off set1:] MemoryError |
01-27-2013, 04:33 PM | #70 | |
The Grand Mouse 高貴的老鼠
Posts: 72,295
Karma: 309002296
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Quote:
|
|
01-31-2013, 03:12 AM | #71 |
Member
Posts: 10
Karma: 10
Join Date: Jan 2013
Device: Kindle Paperwhite
|
My mobi. file has a lot of images and lager than 500Mb. My computer run windows7 64bit with 4Gb RAM.
|
01-31-2013, 03:17 AM | #72 |
The Grand Mouse 高貴的老鼠
Posts: 72,295
Karma: 309002296
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
500MB file? 4GB RAM? Then that's the problem. It would need to use memory more efficiently to cope with that kind of file with that amount of installed memory, and that might not be simple.
|
01-31-2013, 04:45 PM | #73 |
Junior Member
Posts: 9
Karma: 10
Join Date: Nov 2012
Location: Germany
Device: Pocketbook Era Color
|
I took my java version of Kindlestrip and take it for a spin.
It handled a 450mb ish comic that i had at my hands just fine so i guess its worth a try. For convenience i build a executable JAR. Usage: Code:
java -jar KindleStripJava.jar input.mobi output.mobi Last edited by Padde; 01-31-2013 at 04:53 PM. Reason: Added JAR Version with sources |
02-23-2013, 12:23 AM | #74 |
Enthusiast
Posts: 32
Karma: 10
Join Date: Jun 2012
Device: Kindle 4 NT (broke), Kindle Paperwhite, Kindle 2
|
AN UPDATE: The output file of KindleStrip 1.35 works OK in the new version of Kindle Previewer: v2.8. This is true of .mobi files generated by KindleGen 1.2 and 2.8. Thank you, PDurrant and KevinH, for creating and maintaining this software.
|
03-22-2013, 02:23 PM | #75 |
Grand Sorcerer
Posts: 6,687
Karma: 26963509
Join Date: Apr 2009
Location: USA
Device: iPhone 15PM, Kindle Scribe, iPad mini 6, PocketBook InkPad Color 3
|
This will be especially useful now that the Personal Documents service preserves kf8 formatting. AFAICT, it does not strip the source before storing (file size is only modestly reduced), and there is a 50MB maximum file size enforced by Send to Kindle (and that limit is higher than can generally be sent as an email attachment). In some cases, it might be helpful to upload separate kf8 and mobi files to get under this minimum (mobi still required for iOS). Is there a way to do this?
|
Tags |
k5 tools, mobi2mobi |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Applescript Wrapper Application for Kindlegen | pdurrant | Kindle Formats | 50 | 02-18-2020 01:16 AM |
how to use python script with windows xp | tuufbiz1 | Other formats | 12 | 01-08-2011 08:22 AM |
How do I get a shortcut for a Python script onto the taskbar in W7? | Sydney's Mom | Workshop | 6 | 03-28-2010 08:11 PM |
Nedd a little help with a python script | gandor62 | Calibre | 1 | 08-07-2008 09:59 PM |
Python script to create collections | gwynevans | Sony Reader Dev Corner | 2 | 03-13-2008 12:29 PM |