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

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 01-26-2010, 08:12 PM   #1
gameking66
Banned
gameking66 began at the beginning.
 
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.
gameking66 is offline   Reply With Quote
Old 02-03-2010, 07:32 PM   #2
calvin-c
Guru
calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.
 
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."
calvin-c is offline   Reply With Quote
Advert
Old 02-03-2010, 08:15 PM   #3
daffy4u
I'm Super Kindle-icious
daffy4u ought to be getting tired of karma fortunes by now.daffy4u ought to be getting tired of karma fortunes by now.daffy4u ought to be getting tired of karma fortunes by now.daffy4u ought to be getting tired of karma fortunes by now.daffy4u ought to be getting tired of karma fortunes by now.daffy4u ought to be getting tired of karma fortunes by now.daffy4u ought to be getting tired of karma fortunes by now.daffy4u ought to be getting tired of karma fortunes by now.daffy4u ought to be getting tired of karma fortunes by now.daffy4u ought to be getting tired of karma fortunes by now.daffy4u ought to be getting tired of karma fortunes by now.
 
daffy4u's Avatar
 
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.
daffy4u is offline   Reply With Quote
Old 02-04-2010, 11:41 AM   #4
calvin-c
Guru
calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.
 
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.
calvin-c is offline   Reply With Quote
Old 02-11-2010, 09:09 AM   #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: 71,369
Karma: 305065800
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by gameking66 View Post
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.
I believe that v0.10 now only makes the output file if the decryption has worked. So with that version of the script things might work as you expect.

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
pdurrant is offline   Reply With Quote
Advert
Old 02-11-2010, 11:20 AM   #6
angelad
Groupie
angelad is on a distinguished road
 
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.
angelad is offline   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
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


All times are GMT -4. The time now is 09:59 AM.


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