I'm using Calibre to manage my ebooks and I'm trying to install a plugin that will allow me to manage library books that I get through Adobe Digital Editions via Wine. I've got everything installed, but I need to run an additional script to tie it all together. I get to one step in the instructions that says "you'll need to run the adobekey.pyw script using the python installation in your Wine system."
So how do I run a script using the python installation in Wine?
This is my first time using Wine, so please make your answers as basic as possible.
Here's the steps provided by the Calibre Ineptepub plugin's Readme
DRM tool available here: http://apprenticealf.wordpress.com/2012/09/10/drm-removal-tools-for-ebooks/
Linux and Adobe Digital Editions ePubs
Here are the instructions for using the tools with ePub books and Adobe Digital Editions on Linux under Wine. (Thank you mclien and Fadel!)
download the most recent version of wine from winehq.org (1.3.29 in my case)
properly install Wine (see the Wine site for details)
python 2.7 should already be installed on your system but you may need the following additional python package
all programms need to be installed as normal user. The .exe files are installed using ‘wine ’ but .msi files must be installed using ‘wine start ’ we need:
a) Adobe Digital Edition 1.7.2(from: http://kb2.adobe.com/cps/403/kb403051.html) (there is a “can’t install ADE” site, where the setup.exe hides)
b) ActivePython-2.7.2.5-win32-x86.msi (from: http://www.activestate.com/activepython/downloads)
c) Win32OpenSSL_Light-0_9_8r.exe (from: http://www.slproweb.com/)
d) pycrypto-2.3.win32-py2.7.msi (from: http://www.voidspace.org.uk/python/modules.shtml)
now get and unpack the very latest tools_vX.X (from Apprentice Alf) in the users drive_c of wine (~/.wine/drive_c/)
start ADE with:
wine digitaleditions.exe
or from the Unity Dash search "Adobe Digital Editions"register this instance of ADE with your adobeID and close it, open terminal and change to the tools_vX.X dir:
create the adeptkey.der with:
wine python ineptkey.py
(only need once!) (key will be here: ~/.wine/drive_c/tools_vX.X/Other_Tools/adeptkey.der)Use ADE running under Wine to dowload all of your purchased ePub ebooks
install the ineptepub and ineptpdf plugins from the tools as discribed in the readmes.
copy the adeptkey.der into the config dir of calibre (~/.config/calibre in debian/ubuntu). Your ADE books imported to calibre will automatically be freed from DRM.
Here's an updated version that works in Mint 18.2
Install Wine from the repository (I have v 1.6).
Use Winetricks to install Python 2.6.
Copy file from https://github.com/psyrendust/dedrm-ebook-tools/blob/master/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/adobekey.py to a text file adobekey.py in ~/C and make it executable. This file is also included with the DeDRM plugin - perhaps also PyCrypto as well. I just didn't take the time to see how to use those.
Install PyCrypto 2.6 for Python 2.6 from http://www.voidspace.org.uk/python/modules.shtml#pycrypto Download link: http://www.voidspace.org.uk/downloads/pycrypto26/pycrypto-2.6.win32-py2.6.exe. I used the 32-bit version even though I'm running a 64-bit system.
Install Adobe Digital Editions (ADE) version 1.7.2 from http://download.macromedia.com/pub/developer/digitalpublishing/digitaleditions_172.exe. Later versions of ADE might work, but v 1.6 doesn't work.
Authenticate your computer with your Adobe ID account when ADE first starts.
Download the protected book (ePub or PDF) and open in ADE. I just drag the URLLink.acsm file into ADE, and it downloads and opens the book. Make certain you can open the book, and then exit ADE. Note that ADE saves the files in
~/My Digital Editions
.cd
to your~/C
directory.Run
wine \\\\python26\\\\python.exe adobekey.py
If all goes well, it should create a file adobekey_1.der in that directory.
Install / Open Calibre with the DeDRM plugin already installed. Instructions for doing this are easy to find online (and linked above).
Go to Preferences -> Plugins -> File type plugins and double-click the DeDRM plugin. Select Adobe Digital Editions ebooks from configuration list. Click Import Existing Keyfiles and select the adobekey_1.der from
~/C
.Calibre should now be able to remove the DRM and open ADE protected documents. You should be able to remove PyCrypto and Python 2.6 and delete the adobekey_1.der keyfile.