![]() |
#1 |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,608
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
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. Last edited by pdurrant; 07-16-2011 at 04:04 AM. |
![]() |
![]() |
![]() |
#2 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 592
Karma: 138200
Join Date: Nov 2010
Location: NC, USA
Device: PW2014, PW2012, iPad Pro
|
Thought I'd give it a test. Do I need to d/l both files in the box above? (Win 7 environment).
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,608
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#4 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 592
Karma: 138200
Join Date: Nov 2010
Location: NC, USA
Device: PW2014, PW2012, iPad Pro
|
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. |
![]() |
![]() |
![]() |
#5 |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,608
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Yes, you just need the drmcheck.py. I've tweaked the .zip file to remove the non-essential MACOSX stuff.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
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
|
Can it be used to check if a book is DRM free, as well?
|
![]() |
![]() |
![]() |
#7 |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,608
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
|
![]() |
![]() |
![]() |
#8 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 592
Karma: 138200
Join Date: Nov 2010
Location: NC, USA
Device: PW2014, PW2012, iPad Pro
|
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. |
![]() |
![]() |
![]() |
#9 |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,608
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
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' |
![]() |
![]() |
![]() |
#10 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,450
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Hi Paul,
Nicely done! Thanks for this script. KevinH Quote:
|
|
![]() |
![]() |
![]() |
#11 | |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 592
Karma: 138200
Join Date: Nov 2010
Location: NC, USA
Device: PW2014, PW2012, iPad Pro
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#12 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 592
Karma: 138200
Join Date: Nov 2010
Location: NC, USA
Device: PW2014, PW2012, iPad Pro
|
And here's an interesting result:
![]() |
![]() |
![]() |
![]() |
#13 |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,608
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
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. |
![]() |
![]() |
![]() |
#14 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,732
Karma: 103020299
Join Date: Apr 2011
Device: pb360
|
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 |
![]() |
![]() |
![]() |
#15 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,608
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Quote:
I think it's probably best to just move the announcement to the Usage section. I'll do that and upload. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |