View Single Post
Old 06-05-2010, 05:38 AM   #764
lester
Junior Member
lester began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2010
Device: iPad
Corrupted output

Quote:
Originally Posted by FlorenceArt View Post
Hi Lester, welcome to the forum!

To avoid trouble with file paths and names, here's what I do:

I created a folder in my user root folder (the one that has my user name). I called this folder Tools, of course the name doesn't matter but it's better if it's short

I moved all the files I need in this folder: the python scripts, the adeptkey.der file, and I temorarily also move the ebook files that I want to decrypt to this same folder.

When I start the Terminal, it positions me in my root folder, so I only have to type the following to go to the Tools folder:

Code:
cd Tools
Then I type the command line. Since I am already in the folder where everything is, I don't need to type the file path, so it looks like this:

Code:
python ineptepub.py adeptkey.der booknamedrm.epub booknamenodrm.epub
Since I type everything manually, I often shorten the file name of the book too. I have copied the code line to a text file as a reminder, but in fact I almost never re-type it completely: in the Terminal, you can use the up arrow to recall the last few lines you typed and change them. It will even remember them from one session to the next, which is cool.

Hope this helps
Florence
Thanks Florence,
I tried your suggestion and was excited when I saw that there was some kind of output but when I tried to open it (in any reader) it seems to be corrupted. The output from the Terminal was:

~$ python aineptepub.py adeptkey.der bookdrm.epub booknodrm.epub
Traceback (most recent call last):
File "aineptepub.py", line 372, in <module>
sys.exit(cli_main())
File "aineptepub.py", line 229, in cli_main
data = inf.read(path)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/zipfile.py", line 834, in read
return self.open(name, "r", pwd).read()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/zipfile.py", line 874, in open
zinfo.orig_filename, fname)
zipfile.BadZipfile: File name in directory "OEBPS/Lars_9780307593672_epub" and header "OEBPS/Lars_9780307593672_epub_epl_r1.htm" differ.

Any thoughts?
lester is offline   Reply With Quote