07-25-2008, 04:11 PM | #121 |
Resident Curmudgeon
Posts: 73,938
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Using Windows command prompt, you don't need any quotes around the PID eevne if the PID has a $ in it.
|
07-25-2008, 08:37 PM | #122 |
Reticulator of Tharn
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
|
|
07-25-2008, 08:58 PM | #123 |
fruminous edugeek
Posts: 6,745
Karma: 551260
Join Date: Oct 2006
Location: Northeast US
Device: iPad, eBw 1150
|
The fact that some folks are getting it to work on a PC but then it fails on a Mac when the file has been transferred between the two systems makes me suspect that something to do with differences between those two platforms might be involved, e.g. the byte order or line ending characters. But that's just a wild guess.
|
07-26-2008, 12:51 AM | #124 |
Addict
Posts: 321
Karma: 432192
Join Date: Dec 2007
Location: Glasgow, Scotland
Device: Amazon Kindle Paperwhite
|
Words cannot express my relief; it finally worked, by the simple act of placing single quotes around the PID in the command line version. Thank you, llasram, for your help in that corner, and thank you, pdurrant, for your offer of help; I tried running your script on my mac and putting single quotes around the PID when the box popped up, but unfortunately that didn't work. But, most importantly ... I got my book, and I can now buy mobi books and be able to read them on my Sony 500, despite owning an ibook.
Ah, the overwhelming sense of relief. I feel like a nice cup of tea and a read. |
07-26-2008, 09:09 AM | #125 |
The Grand Mouse 高貴的老鼠
Posts: 71,504
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
New Patches to MobiDeDRM 0.02
Many thanks to JSWolf for helping me see what's going wrong with the 0.02 (& my 0.03 patch version) of the MobiDeDRM script.
Since I now have examples of files that work with 1 but not 2 and 2 but not 1, and a little more experience with the Mobipocket file format, I think I've got to the bottom of the problem, and so I now have a new set of patches for the original 0.02 code. Here's the instructions for my new patch, line by line. Also thanks to others who helped find a problem with the 0.04 patch version. These instructions now convert 0.02 to 0.05. change line 165: print "MobiDeDrm v0.02. Copyright (c) 2008 The Dark Reverser" to print "MobiDeDrm v0.05. Copyright (c) 2008 The Dark Reverser" just so that you don't get confused at the command line. Add a tab and make changes to line 136: [tab][tab]extra_data_flags, = struct.unpack('>L', sect[0xF0:0xF4]) to make it [tab][tab][tab]extra_data_flags, = struct.unpack('>H', sect[0xF2:0xF4]) After line 135: [tab][tab]records, = struct.unpack('>H', sect[0x8:0x8+2]) add in the following three lines [tab][tab]mobi_length, = struct.unpack('>L',sect[0x14:0x18]) [tab][tab]extra_data_flags = 0 [tab][tab]if mobi_length >= 0xE4: (note that tricky comma after the first instance of mobi_length) And finally, after line 63: [tab][tab]bitpos, result = 0,0 add in the following two lines: [tab][tab]if size <= 0: [tab][tab][tab]return result These changes should mean that any file that works with either 0.01 or 0.02 will work with 0.05. I'd love to hear about any problems. Paul Last edited by pdurrant; 12-31-2008 at 11:36 AM. |
07-26-2008, 09:33 AM | #126 |
Wizard
Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
|
Use [code] tags to keep the tabs.
|
07-26-2008, 10:53 AM | #127 |
Linux User
Posts: 323
Karma: 13682
Join Date: Aug 2007
Location: Germany
Device: Kindle 3
|
Haven't had any problems with your last patch, pdurrant, but thanks for the new one.
|
07-26-2008, 11:02 AM | #128 | |
reader
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
|
Quote:
|
|
07-26-2008, 01:44 PM | #129 |
The Grand Mouse 高貴的老鼠
Posts: 71,504
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
I've uploaded a new version of my Applescript that can cope with $ in PIDs, and yes, it does that by enclosing the PID in single quotes.
It's worth a download even if your PIDs don't have $ in them, as it also now reports errors returned from the python script, and the readme has the new fix instructions for the 0.02 version of the MobiDeDRM.py script. https://www.mobileread.com/forums/sho...&postcount=103 Paul |
07-26-2008, 07:04 PM | #130 |
Resident Curmudgeon
Posts: 73,938
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
pdurrant ... Thanks for fixing things. Glad I could help you debug the problem. I'm hoping this is it and we have one program for now.
|
08-10-2008, 01:45 AM | #131 | |
You kids get off my lawn!
Posts: 4,220
Karma: 73492664
Join Date: Aug 2007
Location: Columbus, Ohio
Device: Oasis 2 and Libra H2O and half a dozen older models I can't let go of
|
I'm not a python programmer (have some exposure to VBA and VbScript only), so my notes below may be obvious to those of you who are, but for "idiots" like me, who are just trying to make a great tool work even better:
Quote:
The rest of the line numbers matched in my copy...BUT!...only if I worked the corrections from the bottom up. As soon as you follow the first correction's suggestion (to add three rows of code after line 62/63), the line numbers no longer match up. Just thought I'd share it for the other novices like me, who might have tried this and gave up when it didn't seem to line up. |
|
08-10-2008, 07:01 AM | #132 | |
The Grand Mouse 高貴的老鼠
Posts: 71,504
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Thanks for the clarification. I should have mentioned that any line numbers was the line numbers or the original file. Hopefully by quoting each line that I also referenced by number I didn't confuse too many.
Paul Quote:
|
|
08-15-2008, 03:57 AM | #133 | |
The Grand Mouse 高貴的老鼠
Posts: 71,504
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
I bought the Chambers 10th Edition dictionary. A DRMed Mobipocket book over 40MiB in size.
I'm glad to say that the new version worked perfectly on it, although it did take over 80 minutes running on a 2GHz Dual Core machine. Paul Quote:
|
|
08-15-2008, 07:04 AM | #134 |
Linux User
Posts: 323
Karma: 13682
Join Date: Aug 2007
Location: Germany
Device: Kindle 3
|
Huh? I bought the Chambers too, but my version is only 24.7 MB in size. And MobiDeDrm worked here too, but took even longer (140 minutes with a 1.4 Ghz Celeron M).
|
08-15-2008, 07:39 AM | #135 |
The Grand Mouse 高貴的老鼠
Posts: 71,504
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
You're right. I was typing from memory and my memory was faulty. The time is about right though.
Paul |
Tags |
conversion, drm, formatting, mobipocket |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
New Epub/Mobipocket creation tool: Jutoh | Julian Smart | ePub | 78 | 03-28-2014 07:28 AM |
eReader Decoder Tool | wallcraft | Workshop | 177 | 09-27-2009 08:46 PM |
Secure Mobipocket Decoder | ebookfab | Kindle Formats | 3 | 12-09-2008 08:50 PM |
Secure Mobipocket Decoder v0.3 | Aenea | Kindle Formats | 74 | 07-10-2008 09:57 AM |
Secure Mobipocket Decoder is no more... | Aenea | Kindle Formats | 26 | 04-12-2008 09:53 AM |