Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 07-25-2008, 04:11 PM   #121
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: 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.
JSWolf is offline   Reply With Quote
Old 07-25-2008, 08:37 PM   #122
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by JSWolf View Post
Using Windows command prompt, you don't need any quotes around the PID eevne if the PID has a $ in it.
Oh, whoops. Someone else who had been having a similar problem was on OS X, where one would require the quotation marks. My mistake.

-Marshall
llasram is offline   Reply With Quote
Old 07-25-2008, 08:58 PM   #123
nekokami
fruminous edugeek
nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.
 
nekokami's Avatar
 
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.
nekokami is offline   Reply With Quote
Old 07-26-2008, 12:51 AM   #124
garygibsonsf
Addict
garygibsonsf ought to be getting tired of karma fortunes by now.garygibsonsf ought to be getting tired of karma fortunes by now.garygibsonsf ought to be getting tired of karma fortunes by now.garygibsonsf ought to be getting tired of karma fortunes by now.garygibsonsf ought to be getting tired of karma fortunes by now.garygibsonsf ought to be getting tired of karma fortunes by now.garygibsonsf ought to be getting tired of karma fortunes by now.garygibsonsf ought to be getting tired of karma fortunes by now.garygibsonsf ought to be getting tired of karma fortunes by now.garygibsonsf ought to be getting tired of karma fortunes by now.garygibsonsf ought to be getting tired of karma fortunes by now.
 
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.
garygibsonsf is offline   Reply With Quote
Old 07-26-2008, 09:09 AM   #125
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
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

Quote:
Originally Posted by JSWolf View Post
Actually, I've come across a couple of eBooks that your mod caused to actually break the eBooks so that it causes Mobipocket Reader to crash every time you try to view it.

I used MobiDeDRM.py version 0.01 on those eBooks without a hitch.

Last edited by pdurrant; 12-31-2008 at 11:36 AM.
pdurrant is offline   Reply With Quote
Old 07-26-2008, 09:33 AM   #126
igorsk
Wizard
igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.
 
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.
igorsk is offline   Reply With Quote
Old 07-26-2008, 10:53 AM   #127
IceHand
Linux User
IceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavens
 
IceHand's Avatar
 
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.
IceHand is offline   Reply With Quote
Old 07-26-2008, 11:02 AM   #128
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
Quote:
Originally Posted by nekokami View Post
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.
I think it is the "$" in the PID that is causing the problem, this does not matter under Windows but requires single quotes (double quotes won't work) on a Mac or under Linux.
wallcraft is offline   Reply With Quote
Old 07-26-2008, 01:44 PM   #129
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
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

Quote:
Originally Posted by wallcraft View Post
I think it is the "$" in the PID that is causing the problem, this does not matter under Windows but requires single quotes (double quotes won't work) on a Mac or under Linux.
pdurrant is offline   Reply With Quote
Old 07-26-2008, 07:04 PM   #130
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: 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.
JSWolf is offline   Reply With Quote
Old 08-10-2008, 01:45 AM   #131
FizzyWater
You kids get off my lawn!
FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.
 
FizzyWater's Avatar
 
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:
Originally Posted by pdurrant View Post
Here's the instructions for my new patch, line by line.

After line 63:
Don't know why they'd be different, but when I displayed this in Pythonwin, this was line 62 for my copy.

Quote:
Originally Posted by pdurrant View Post
After line 135:
Add a tab to line 136:
and change line 165:
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.

FizzyWater is offline   Reply With Quote
Old 08-10-2008, 07:01 AM   #132
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
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:
Originally Posted by FizzyWater View Post
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.

pdurrant is offline   Reply With Quote
Old 08-15-2008, 03:57 AM   #133
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
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:
Originally Posted by pdurrant View Post
Many thanks to JSWolf for helping me see what's going wrong with the 0.02 (& my 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.
pdurrant is offline   Reply With Quote
Old 08-15-2008, 07:04 AM   #134
IceHand
Linux User
IceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavensIceHand is a rising star in the heavens
 
IceHand's Avatar
 
Posts: 323
Karma: 13682
Join Date: Aug 2007
Location: Germany
Device: Kindle 3
Quote:
Originally Posted by pdurrant View Post
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.
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).
IceHand is offline   Reply With Quote
Old 08-15-2008, 07:39 AM   #135
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
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

Quote:
Originally Posted by IceHand View Post
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).
pdurrant is offline   Reply With Quote
Reply

Tags
conversion, drm, formatting, mobipocket


Forum Jump

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


All times are GMT -4. The time now is 08:11 AM.


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