Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 02-14-2011, 10:41 AM   #1
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: 31,455
Karma: 87141754
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
DRM Check: Find out what DRM that ebook has got.

I wrote a python script that identifies ebook type, compression and DRM. It should work for Mobipocket, Topaz, PalmDoc, eReader and ePubs.

I've also done an Applescript wrapper for Mac users. The Applescript will handle multiple files/folders, and now displays the report on all files at the end of the run, with an option to save to a text file.

Bug reports still welcome.

This software (python script and AppleScript) are released with the Unlicence. See http://unlicense.org/

July 2011:
DRM Check.py 1.01 — minor tweak to make batch operation easier.
DRM Check Applescript 1.01 — proper batch operation.
Attached Files
File Type: zip drmcheck.py.zip (2.9 KB, 462 views)
File Type: zip DRM Check 1.0.1.app.zip (36.5 KB, 301 views)

Last edited by pdurrant; 07-16-2011 at 04:04 AM.
pdurrant is online now   Reply With Quote
Old 02-14-2011, 11:08 AM   #2
speedlever
Fanatic
speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.
 
Posts: 507
Karma: 138200
Join Date: Nov 2010
Location: NC, USA
Device: Kindle 3 (wifi), iPad
Thought I'd give it a test. Do I need to d/l both files in the box above? (Win 7 environment).
speedlever is offline   Reply With Quote
Old 02-14-2011, 11:39 AM   #3
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: 31,455
Karma: 87141754
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by speedlever View Post
Thought I'd give it a test. Do I need to d/l both files in the box above? (Win 7 environment).
Under windows, only the python script will be useful. You'll also need to install Python if you don't have it already. I'd suggest installing the free version of ActivePython from here: http://www.activestate.com/activepython/downloads

Whether your Windows machine is 64-bit or 32-bit, you should install the 32-bit version of ActivePython.

Once installed, open up a command window and give the script a go.
pdurrant is online now   Reply With Quote
Old 02-14-2011, 11:47 AM   #4
speedlever
Fanatic
speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.
 
Posts: 507
Karma: 138200
Join Date: Nov 2010
Location: NC, USA
Device: Kindle 3 (wifi), iPad
Thanks. I had v2.7/32 installed on my old HD before THE crash in December. I don't know if I reinstalled it since the plug-ins came along soon thereafter.

Looks like I need the 2nd file of the two in the OP.

Edit: back again. I see an OSX file in each of the downloads. Sorry, I'm still not sure what I need.

Edit2: nevermind. Looks like I just need the 2nd file and the drmcheck.py file in it.

Last edited by speedlever; 02-14-2011 at 11:52 AM.
speedlever is offline   Reply With Quote
Old 02-14-2011, 12:04 PM   #5
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: 31,455
Karma: 87141754
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by speedlever View Post
Edit: back again. I see an OSX file in each of the downloads. Sorry, I'm still not sure what I need.

Edit2: nevermind. Looks like I just need the 2nd file and the drmcheck.py file in it.
Yes, you just need the drmcheck.py. I've tweaked the .zip file to remove the non-essential MACOSX stuff.
pdurrant is online now   Reply With Quote
Old 02-14-2011, 11:35 PM   #6
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: 2,901
Karma: 5643439
Join Date: Aug 2007
Location: Columbus, Ohio
Device: Dell Axim, PRS350/650, Nook Glow, PB Touch Lux 623
Can it be used to check if a book is DRM free, as well?
FizzyWater is offline   Reply With Quote
Old 02-15-2011, 03:39 AM   #7
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: 31,455
Karma: 87141754
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by FizzyWater View Post
Can it be used to check if a book is DRM free, as well?
Yes, it'll say if the file is unencrypted too. Give it a try and let me know what you think.
pdurrant is online now   Reply With Quote
Old 02-15-2011, 09:20 AM   #8
speedlever
Fanatic
speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.
 
Posts: 507
Karma: 138200
Join Date: Nov 2010
Location: NC, USA
Device: Kindle 3 (wifi), iPad
Just tried it Paul. No luck. What did I do wrong?

My DOS days are too far back. Did I execute the CMD wrong? I don't know how to interpret the results.


Last edited by speedlever; 02-15-2011 at 10:41 AM.
speedlever is offline   Reply With Quote
Old 02-15-2011, 10:05 AM   #9
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: 31,455
Karma: 87141754
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
You didn't give the full path of the ebook (missed the disk d:), and you need to add quotes to handle the space in the file path.

Try:

drmcheck.py 'd:\Ebooks\Ebook downloads\Borders\Odyssey.epub'
pdurrant is online now   Reply With Quote
Old 02-15-2011, 10:13 AM   #10
KevinH
Guru
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 843
Karma: 349410
Join Date: Nov 2009
Device: many
Hi Paul,

Nicely done! Thanks for this script.

KevinH


Quote:
Originally Posted by pdurrant View Post
I wrote a python script that identifies ebook type, compression and DRM. It should work for Mobipocket, Topaz, PalmDoc, eReader and ePubs.

I've also done an Applescript wrapper for Mac users. The Applescript will handle multiple files/folders, but only reports one-by-one, so its not really suitable for mass checking.

This is only a quick attempt, and the first version at that. Bug reports welcome.

This software (python script and AppleScript) are released with the Unlicence. See http://unlicense.org/
KevinH is offline   Reply With Quote
Old 02-15-2011, 10:32 AM   #11
speedlever
Fanatic
speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.
 
Posts: 507
Karma: 138200
Join Date: Nov 2010
Location: NC, USA
Device: Kindle 3 (wifi), iPad
Quote:
Originally Posted by pdurrant View Post
You didn't give the full path of the ebook (missed the disk d, and you need to add quotes to handle the space in the file path.

Try:

drmcheck.py 'd:\Ebooks\Ebook downloads\Borders\Odyssey.epub'
Thanks. That did the trick. Boy, am I lazy or what? I sure miss the GUI! I wouldn't want to check many ebooks that way.

speedlever is offline   Reply With Quote
Old 02-15-2011, 10:40 AM   #12
speedlever
Fanatic
speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.speedlever can fool all of the people all of the time.
 
Posts: 507
Karma: 138200
Join Date: Nov 2010
Location: NC, USA
Device: Kindle 3 (wifi), iPad
And here's an interesting result:

speedlever is offline   Reply With Quote
Old 02-15-2011, 11:26 AM   #13
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: 31,455
Karma: 87141754
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by speedlever View Post
And here's an interesting result:
That is interesting. The epub is zipped incorrectly, or possibly the mimetype file in the epub is missing entirely. That it comes up as "unencrypted" surprises me, as that implies that the code couldn't find the rights.xml or the encryption.xml files.

Luckily the drm removal plugin for Calibre, or the stand-alone Windows version of DeDRM will fix up the epub structure before removing any DRM.

But perhaps I ought to try making the detection code a bit more robust. I can probably steal some code from the epubfix script that the DeDRM code uses.

Thanks for the feedback.

[EDIT: I've decided to leave the zipfix/epubfix code out of this, so I can still use unlicense. If you're doing batch operations, it's probably best to run zipfix before running drmcheck.]

Last edited by pdurrant; 07-16-2011 at 03:37 AM.
pdurrant is online now   Reply With Quote
Old 07-15-2011, 07:50 PM   #14
j.p.s
Fanatic
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 558
Karma: 3775418
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by pdurrant View Post
Give it a try and let me know what you think.
Nice program! Thanks!

Would you consider changing all the print statements except the last to use:
sys.stderr.write()
instead of print?

This would be usefull when the output from multiple calls is redirected to a file as in the following bash script:
Code:
for name in *
do
    echo $name >> results.txt
    drmcheck.py $name >> results.txt
done
j.p.s is offline   Reply With Quote
Old 07-16-2011, 03:34 AM   #15
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: 31,455
Karma: 87141754
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by j.p.s View Post
Would you consider changing all the print statements except the last to use:
sys.stderr.write()
instead of print?

This would be usefull when the output from multiple calls is redirected to a file.
I see what you mean. A good point, but I'm not happy about writing non-errors to the error stream, just to prevent them going to stdout.

I think it's probably best to just move the announcement to the Usage section. I'll do that and upload.
pdurrant is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Found another DRM vs no DRM picture on the Net Krystian Galaj News 29 03-18-2010 06:25 AM
ShineBook Mobile eBook Reader announced in Germany, reads both DRM-prc + DRM-ePub ... K-Thom News 11 12-12-2009 06:50 AM
Erstes eBook, DRM? Targor E-Books 2 05-15-2009 08:13 AM
DRM, or not DRM: that is the question (poll) Alexander Turcic News 54 02-08-2009 01:27 PM


All times are GMT -4. The time now is 03:12 PM.


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