DeDRM tools for ebooks
Go to file
Adam Plaice 4bd89fa4aa Fix automatic import of decryption keys on Linux with wine
By default, the wineprefix passed to WineGetKeys is "". Unfortunately,

    os.path.abspath(os.path.expanduser(os.path.expandvars("")))

returns the path to the working directory, which depends on the
directory from which calibre was invoked.  Hence under current
behaviour the wineprefix becomes that path, no longer being the empty
string.  This means that the `cmdline` that's run is always
`WINEPREFIX=/some/path/ wine python.exe [...]`, rather than `wine
python.exe [...]` even under default conditions, when the wineprefix
hasn't been changed.  Unless the user is improbably lucky and invokes
calibre from ~/.wine/ (the default wineprefix), this causes automatic
retrieval of the keys to always fail.

The bug was introduced in f2190a6755.

Checking for "" allows for correct behaviour in the default case,
while keeping the nice behaviour of expanding `~`.
2019-06-12 21:13:25 +02:00
contrib Version to 6.6.3 with update for kindle book name cleanup and .kinf2018 support (initial) 2019-03-30 15:02:40 +00:00
dedrm_src Fix automatic import of decryption keys on Linux with wine 2019-06-12 21:13:25 +02:00
obok_src Move to new positions 2018-12-02 11:37:07 +00:00
.gitattributes :neckbeard: Added .gitattributes & .gitignore files 2015-02-19 07:18:22 +00:00
.gitignore Update kobo plugin to 3.1.3 with Portuguese and Arabic translations. Include .mo files in git. 2015-08-05 06:59:01 +01:00
CALIBRE_CLI_INSTRUCTIONS.md Clarify CLI instructions are for Calibre plugin 2018-10-13 14:34:47 -04:00
FAQs.md Update FAQs.md 2019-04-22 15:03:09 +01:00
make_release.py 64-bit Macintosh Application, executable bit set on droplet, Updated release script, Version set to 6.6.2 2018-12-02 12:37:52 +00:00
README.md Update README.md 2019-05-18 18:42:56 +01:00

DeDRM_tools

DeDRM tools for ebooks

This is a repository of all the scripts and other tools for removing DRM from ebooks that I could find, committed in date order as best as I could manage. (Except for the Requiem tools for Apple's iBooks, and Convert LIT for Microsoft's .lit ebooks.)

Mostly it tracks the tools releases by Apprentice Alf, athough it also includes the individual tools and their histories from before Alf had a blog.

Users should download the latest zip archive. Developers might be interested in forking the repository, as it contains unzipped versions of those tools that are zipped, and text versions of the AppleScripts, to make the changes over time easier to follow.

For the latest Amazon KFX format, users of the calibre plugin should also install the KFX Input plugin from the standard calibre plugin menu. It's also available from the MobileRead thread here: https://www.mobileread.com/forums/showthread.php?t=291290

I welcome contributions from others to improve these tools, from expanding the range of books handled, improving key retrieval, to just general bug fixes, speed improvements and UI enhancements.

I urge people to read the FAQs. But to cover the most common: Use ADE 2.0.1 to be sure not to get the new DRM scheme that these tools can't handle. Use Kindle for Mac/PC 1.24 or earlier, the tools don't currently work with 1.25 or later. Do remember to unzip the downloaded archive to get the plugin. You can't load the whole archive into calibre.

My special thanks to all those developers who have done the hard work of reverse engineering to provide the initial tools.

Apprentice Harper.