|
|
#61 |
|
The Grand Mouse
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,906
Karma: 74252384
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle 2; iPhone 3G; Bookeen Opus; NOOK ST GlowLight
|
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.
__________________
Kai Lung Raises His Voice, now available at Amazon and BooksOnBoard A new collection of ‘Kai Lung’ stories by Ernest Bramah, including four previously unpublished stories. Books I've read in 2013, 2012, 2011, 2010 Last edited by pdurrant; 12-27-2012 at 04:58 PM. Reason: typo |
|
|
|
|
|
#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? |
|
|
|
|
Enthusiast
|
|
|
|
#63 |
|
The Grand Mouse
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,906
Karma: 74252384
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle 2; iPhone 3G; Bookeen Opus; NOOK ST GlowLight
|
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.
__________________
Kai Lung Raises His Voice, now available at Amazon and BooksOnBoard A new collection of ‘Kai Lung’ stories by Ernest Bramah, including four previously unpublished stories. Books I've read in 2013, 2012, 2011, 2010 |
|
|
|
|
|
#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. |
|
|
|
|
|
#65 |
|
The Grand Mouse
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,906
Karma: 74252384
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle 2; iPhone 3G; Bookeen Opus; NOOK ST GlowLight
|
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.
__________________
Kai Lung Raises His Voice, now available at Amazon and BooksOnBoard A new collection of ‘Kai Lung’ stories by Ernest Bramah, including four previously unpublished stories. Books I've read in 2013, 2012, 2011, 2010 |
|
|
|
|
|
#66 |
|
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Nov 2012
Location: Germany
Device: Kindle Paperwhite
|
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. |
|
|
|
|
|
#67 |
|
Booklegger
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,694
Karma: 7585206
Join Date: Jun 2009
Location: Toronto, Ontario, Canada
Device: BeBook(1 & 2010), PEZ, PRS-505, Kobo BT, PRS-T1, Playbook
|
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.
__________________
Everything in moderation.... except chocolate... and circumvention. |
|
|
|
|
|
#68 |
|
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Nov 2012
Location: Germany
Device: Kindle Paperwhite
|
Well my point was that it works with Python 3 after applying the changes in the "Bugfixed portion of Code" Spoiler
|
|
|
|
|
|
#69 |
|
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Jan 2013
Device: none
|
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
|
|
|
|
|
|
#70 | |
|
The Grand Mouse
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,906
Karma: 74252384
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle 2; iPhone 3G; Bookeen Opus; NOOK ST GlowLight
|
Quote:
__________________
Kai Lung Raises His Voice, now available at Amazon and BooksOnBoard A new collection of ‘Kai Lung’ stories by Ernest Bramah, including four previously unpublished stories. Books I've read in 2013, 2012, 2011, 2010 |
|
|
|
|
|
|
#71 | |
|
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Jan 2013
Device: none
|
Quote:
|
|
|
|
|
|
|
#72 |
|
The Grand Mouse
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,906
Karma: 74252384
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle 2; iPhone 3G; Bookeen Opus; NOOK ST GlowLight
|
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.
__________________
Kai Lung Raises His Voice, now available at Amazon and BooksOnBoard A new collection of ‘Kai Lung’ stories by Ernest Bramah, including four previously unpublished stories. Books I've read in 2013, 2012, 2011, 2010 |
|
|
|
|
|
#73 |
|
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Nov 2012
Location: Germany
Device: Kindle Paperwhite
|
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 |
|
|
|
|
|
#74 |
|
Enthusiast
![]() Posts: 29
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.
|
|
|
|
|
|
#75 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,064
Karma: 1895158
Join Date: Apr 2009
Location: USA
Device: iPod Touch, Nook STR, Xoom, Kindle Touch, PW & Fire, Sony PRS-T1, iPad
|
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 |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Applescript Wrapper Application for Kindlegen | pdurrant | Mobi | 13 | 03-14-2013 02:07 PM |
| 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 |