Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle

Notices

Reply
 
Thread Tools Search this Thread
Old 08-29-2012, 08:08 AM   #1
pwright2
Connoisseur
pwright2 began at the beginning.
 
Posts: 92
Karma: 10
Join Date: Dec 2011
Device: Kindle Touch
Scanner for DRM?

I have Calibre and MobiHandler, so I can do it a file at a time but what I would like is a program that would scan through a folder (and subfolders) of files and identify which ones have DRM. Is there something which will do that?
pwright2 is offline   Reply With Quote
Old 08-29-2012, 08:10 AM   #2
pwright2
Connoisseur
pwright2 began at the beginning.
 
Posts: 92
Karma: 10
Join Date: Dec 2011
Device: Kindle Touch
Oh. As curiousity, what does it mean when a book is marked as Sample in MobiHandler? I know that there are sample books but some of the ones that I have purchased and are full books show up marked as sample in MH.
pwright2 is offline   Reply With Quote
Old 08-29-2012, 08:17 AM   #3
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
https://www.mobileread.com/forums/sho...d.php?t=171861 , read the first 40 posts.
ixtab is offline   Reply With Quote
Old 08-31-2012, 12:22 PM   #4
pwright2
Connoisseur
pwright2 began at the beginning.
 
Posts: 92
Karma: 10
Join Date: Dec 2011
Device: Kindle Touch
Thanks for the link. Reading such stuff is educational. But, for anyone interested but in a hurry, here is what worked for me:

Download drmcheck.py.zip from the first post of this thread. https://www.mobileread.com/forums/sho...d.php?t=121387

unzip it and put it in the folder with all the files you want to check.

If it doesn't scare you, I recommend using a text editor to make a slight modification to drmcheck.py. Scroll to the bottom of the file. There is a print command there. Don't modify that command but insert a line immediately above it. Type "print sys.argv[1:]" (without the quotes). That will include the name of the book in the printout. Save the modified file.

Then create a file named drm.bat in that same folder. The bat file should read:

echo off
echo Checking files for DRM > Filelist.txt
for %%a in (*.*) do drmcheck "%%a" >> Filelist.txt
echo on

Save that. This bat file will step thru all the files in the folder and create a file named Filelist.txt which will list the drm status of each file.

If someone knows how to get it to step through subfolders, that would be great.

-----Paul-----
pwright2 is offline   Reply With Quote
Old 08-31-2012, 01:35 PM   #5
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Simple, unoptimized example for Linux (which doesn't even require to change the drmcheck.py file):

Code:
find . -type f -print0 | sort -z | xargs -0 -n1 -i sh -c 'echo -n "{}: "; python ~/kindle-touch/drm/drmcheck.py "{}"' | egrep -v '^$' | grep -v "Unknown ebook" > /tmp/list.txt
I don't know how this can be done with the Windows "shell" though.

Last edited by ixtab; 08-31-2012 at 01:39 PM.
ixtab is offline   Reply With Quote
Old 08-31-2012, 02:52 PM   #6
pwright2
Connoisseur
pwright2 began at the beginning.
 
Posts: 92
Karma: 10
Join Date: Dec 2011
Device: Kindle Touch
Well, if you're going to use Linux ... I'm just out of the game.
pwright2 is offline   Reply With Quote
Old 08-31-2012, 03:07 PM   #7
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by pwright2 View Post
Well, if you're going to use Linux ... I'm just out of the game.
Pretty much the same for me with Windows - I try to avoid it whenever I can, because it just seems too complicated and unusable to me.

BTW, your Kindle is running on Linux under the hood...

(OK - no, let's not start a flamewar ).
ixtab is offline   Reply With Quote
Old 08-31-2012, 03:15 PM   #8
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
A good place to start on windows is by typing "help", and "for /?". I have written some incredibly complex scripts (batch files) that run on windows and do cool stuff. This forum is not the place to share them though.

A lot of people prefer newer scripting engines such as VBScript though, but DOS commands can be quite powerful when combined into a batch file.

There are some great tutorials out there to get you started. Google can be your friend there, especially if you turn off its "personalization" feature so it does not hide "new stuff" from your search results.
geekmaster is offline   Reply With Quote
Old 09-05-2012, 12:46 PM   #9
pwright2
Connoisseur
pwright2 began at the beginning.
 
Posts: 92
Karma: 10
Join Date: Dec 2011
Device: Kindle Touch
No,no flames. I have great respect for Linux, periodically install it as dual boot, and then find I'm unwilling to give up Picasa or some other program that doesn't do Linux. So I just never get around to really getting into it.

And, yes, back in the day I was able to do some quite ornate things in DOS with batch files. Though even that was generally modifying other people's stuff. People would wonder why it took my machine so long to boot. Big batch files are not all that fast.

But now I'm really old and lazy.

Afraid I am more likely to gripe than grep.

-----Paul-----
pwright2 is offline   Reply With Quote
Old 09-05-2012, 01:36 PM   #10
pwright2
Connoisseur
pwright2 began at the beginning.
 
Posts: 92
Karma: 10
Join Date: Dec 2011
Device: Kindle Touch
Hmmmph! After all that I did do a little googling and discovreed all I needed to do was add a /r in the FOR command. Well, I had to change the reference to drmcheck to drmcheck.py. I'm lrunning on a different machine from originally. May have something to do with it. Anyhow, this worked fine and would scan thru the entire Calibre library and provide a list indicating what was encrypted and what not.

There was a lot of output from non book files though, so I modified it to scan only for book files that I know of. So I made the change below to the bat files and I think that satisfies my needs and I'll leave it at that.

Text of modified DRM.BAT

-----------
echo off
echo Checking files for DRM > Filelist.txt
for /r %%a in (*.azw) do drmcheck.py "%%a" >> Filelist.txt
for /r %%a in (*.azw3) do drmcheck.py "%%a" >> Filelist.txt
for /r %%a in (*.mobi) do drmcheck.py "%%a" >> Filelist.txt
for /r %%a in (*.txt) do drmcheck.py "%%a" >> Filelist.txt
for /r %%a in (*.pdf) do drmcheck.py "%%a" >> Filelist.txt
echo on
----------------

-----Paul-----
pwright2 is offline   Reply With Quote
Reply

Tags
drm, kindle


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scanner recommendation? NASCARaddicted Workshop 14 04-03-2013 09:49 AM
Anybody have a flatbed scanner and a PE? cBird enTourage Archive 6 04-21-2011 02:45 PM
Scanner recommendation Skydog Workshop 24 05-11-2010 02:22 PM
Welcher Scanner? Jacques_N Lounge 15 04-01-2010 05:34 PM
scanner problem scanner Workshop 6 09-29-2008 08:37 AM


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


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