![]() |
#1 |
Connoisseur
![]() 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?
|
![]() |
![]() |
![]() |
#2 |
Connoisseur
![]() 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.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
(offline)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,907
Karma: 6736094
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.
|
![]() |
![]() |
![]() |
#4 |
Connoisseur
![]() 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----- |
![]() |
![]() |
![]() |
#5 |
(offline)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,907
Karma: 6736094
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 Last edited by ixtab; 08-31-2012 at 01:39 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Connoisseur
![]() 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.
|
![]() |
![]() |
![]() |
#7 | |
(offline)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,907
Karma: 6736094
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Quote:
![]() BTW, your Kindle is running on Linux under the hood... (OK - no, let's not start a flamewar ![]() |
|
![]() |
![]() |
![]() |
#8 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#9 |
Connoisseur
![]() 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----- |
![]() |
![]() |
![]() |
#10 |
Connoisseur
![]() 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----- |
![]() |
![]() |
![]() |
Tags |
drm, kindle |
|
![]() |
||||
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 |