01-26-2010, 08:12 PM | #1 |
Banned
Posts: 9
Karma: 10
Join Date: Jan 2010
Device: Kindle
|
MobiDeDRM deleting my files.
I'm writing a batch file to automatically strip the DRM from all azw files on my Kindle. Now, it appears to work as intended at first glance, but the problem is that MobiDeDRM creates the output file BEFORE checking for errors. Basically, my input and output are the same (books on my Kindle), and if an error occurs, it ends up clearing my book to a 0kb file!
Now, I'm no python scripter, but it seems relatively easy to fix. I want to continue using the same input/output file, how do I go about modifying MobiDeDRM (using v.0.09) to check for errors before creating the output file, I'm getting tired of having my books wiped if something goes wrong with the script. |
02-03-2010, 07:32 PM | #2 |
Guru
Posts: 787
Karma: 1575310
Join Date: Jul 2009
Device: Moon+ Pro
|
Do it in the batch file. Output goes to a different file name. If no errors (you might need to modify the script to return an Errorlevel indicating whether or not there were errors) the batch file can delete the original & rename the output back to the input.
Note that I don't know Python. I do know batch files-so the old adage applies. "If all you have is a hammer then every problem looks like a nail." |
Advert | |
|
02-03-2010, 08:15 PM | #3 |
I'm Super Kindle-icious
Posts: 6,734
Karma: 2434103
Join Date: Apr 2008
Location: Long Drive, Calinadia Candafornia
Device: KDXG, KT, Oasis
|
If you convert your MobideDRM script to a plug-in for Calibre (instructions should be in the script), you can have the DRM removed when you add books to your Calibre library. It will strip a copy of the book and leave the original intact.
|
02-04-2010, 11:41 AM | #4 |
Guru
Posts: 787
Karma: 1575310
Join Date: Jul 2009
Device: Moon+ Pro
|
My problem is that I don't like Calibre's file naming scheme. I have my own scheme around which I've built a number of management programs (just to be clear, I'm not talking complex programs-many of them are batch file programs). I do like Calibre's conversion capabilities so I'm starting to integrate that into my management programs. I.e. I'm writing (actually, have written but not finished testing) a program that will grab the converted file from where Calibre put it, rename it & move it back into my file management system.
Since the OP's desire seems to be to keep the name the same, I assume he has a similar problem with the fact that you can't control how Calibre renames it. But that is an assumption-maybe he just didn't know about Calibre, and I certainly didn't think of telling him about it, since it didn't seem relevant to his problem. I should have though-so thanks, Daffy. |
02-11-2010, 09:09 AM | #5 | |
The Grand Mouse 高貴的老鼠
Posts: 71,429
Karma: 305784726
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Quote:
But I feel that decrypting 'in place' is inherently risky - make sure you can re-download, or otherwise have backups of your encrypted files. regards, Paul |
|
Advert | |
|
02-11-2010, 11:20 AM | #6 |
Groupie
Posts: 163
Karma: 64
Join Date: Jun 2009
Device: kindle dx
|
That's got to be really frustrating, and I'm already pissed at DRM stuff.
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PRS-300 Problem deleting files | ardeegee | Sony Reader | 5 | 03-18-2011 12:20 AM |
Calibre deleting files? | al35 | Calibre | 7 | 03-22-2010 12:43 PM |
Confirmation before deleting files | mrgoodkat | Calibre | 2 | 02-06-2010 11:24 PM |
MobiDeDRM for .prc files | bringer666 | Kindle Formats | 17 | 05-24-2009 05:10 AM |
Remove books not deleting layout files | davef | Calibre | 1 | 03-05-2009 12:11 PM |