diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index bdb0cab..0000000 --- a/.gitattributes +++ /dev/null @@ -1,17 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto - -# Custom for Visual Studio -*.cs diff=csharp - -# Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 8333973..0000000 --- a/.gitignore +++ /dev/null @@ -1,96 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.pyc - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.cache -nosetests.xml -coverage.xml - -# Translations -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# ========================= -# Operating System Files -# ========================= - -# OSX -# ========================= - -.DS_Store -.AppleDouble -.LSOverride - -# Thumbnails -._* - -# Files that might appear on external disk -.Spotlight-V100 -.Trashes - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# Windows -# ========================= - -# Windows image file caches -Thumbs.db -ehthumbs.db - -# Folder config file -Desktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msm -*.msp - -# Windows shortcuts -*.lnk diff --git a/dedrm_src/DeDRM_Adobe Digital Editions Key_Help.htm b/DeDRM_plugin/DeDRM_Adobe Digital Editions Key_Help.htm similarity index 100% rename from dedrm_src/DeDRM_Adobe Digital Editions Key_Help.htm rename to DeDRM_plugin/DeDRM_Adobe Digital Editions Key_Help.htm diff --git a/dedrm_src/DeDRM_Barnes and Noble Key_Help.htm b/DeDRM_plugin/DeDRM_Barnes and Noble Key_Help.htm similarity index 100% rename from dedrm_src/DeDRM_Barnes and Noble Key_Help.htm rename to DeDRM_plugin/DeDRM_Barnes and Noble Key_Help.htm diff --git a/dedrm_src/DeDRM_EInk Kindle Serial Number_Help.htm b/DeDRM_plugin/DeDRM_EInk Kindle Serial Number_Help.htm similarity index 100% rename from dedrm_src/DeDRM_EInk Kindle Serial Number_Help.htm rename to DeDRM_plugin/DeDRM_EInk Kindle Serial Number_Help.htm diff --git a/dedrm_src/DeDRM_Help.htm b/DeDRM_plugin/DeDRM_Help.htm similarity index 94% rename from dedrm_src/DeDRM_Help.htm rename to DeDRM_plugin/DeDRM_Help.htm index 3fed9df..2604054 100644 --- a/dedrm_src/DeDRM_Help.htm +++ b/DeDRM_plugin/DeDRM_Help.htm @@ -17,12 +17,12 @@ p {margin-top: 0} -

DeDRM Plugin (v6.3.0)

+

DeDRM Plugin (v6.7.0)

This plugin removes DRM from ebooks when they are imported into calibre. If you already have DRMed ebooks in your calibre library, you will need to remove them and import them again.

Installation

-

You have obviously managed to install the plugin, as otherwise you wouldn’t be reading this help file. However, you should also delete any older DeDRM plugins, as this DeDRM plugin replaces the five older plugins: Kindle and Mobipocket DeDRM (K4MobiDeDRM), Ignoble Epub DeDRM (ignobleepub), Inept Epub DeDRM (ineptepub), Inept PDF DeDRM (ineptepub) and eReader PDB 2 PML (eReaderPDB2PML).

+

You have obviously managed to install the plugin, as otherwise you wouldn’t be reading this help file. However, you should also delete any older DRM removal plugins, as this DeDRM plugin replaces the five older plugins: Kindle and Mobipocket DeDRM (K4MobiDeDRM), Ignoble Epub DeDRM (ignobleepub), Inept Epub DeDRM (ineptepub), Inept PDF DeDRM (ineptepub) and eReader PDB 2 PML (eReaderPDB2PML).

Configuration

On Windows and Mac, the keys for ebooks downloaded for Kindle for Mac/PC and Adobe Digital Editions are automatically generated. If all your DRMed ebooks can be opened and read in Kindle for Mac/PC and/or Adobe Digital Editions on the same computer on which you are running calibre, you do not need to do any configuration of this plugin. On Linux, keys for Kindle for PC and Adobe Digital Editions need to be generated separately (see the Linux section below)

diff --git a/dedrm_src/DeDRM_Kindle for Android Key_Help.htm b/DeDRM_plugin/DeDRM_Kindle for Android Key_Help.htm similarity index 100% rename from dedrm_src/DeDRM_Kindle for Android Key_Help.htm rename to DeDRM_plugin/DeDRM_Kindle for Android Key_Help.htm diff --git a/dedrm_src/DeDRM_Kindle for Mac and PC Key_Help.htm b/DeDRM_plugin/DeDRM_Kindle for Mac and PC Key_Help.htm similarity index 100% rename from dedrm_src/DeDRM_Kindle for Mac and PC Key_Help.htm rename to DeDRM_plugin/DeDRM_Kindle for Mac and PC Key_Help.htm diff --git a/dedrm_src/DeDRM_Mobipocket PID_Help.htm b/DeDRM_plugin/DeDRM_Mobipocket PID_Help.htm similarity index 100% rename from dedrm_src/DeDRM_Mobipocket PID_Help.htm rename to DeDRM_plugin/DeDRM_Mobipocket PID_Help.htm diff --git a/dedrm_src/DeDRM_eReader Key_Help.htm b/DeDRM_plugin/DeDRM_eReader Key_Help.htm similarity index 100% rename from dedrm_src/DeDRM_eReader Key_Help.htm rename to DeDRM_plugin/DeDRM_eReader Key_Help.htm diff --git a/dedrm_src/__init__.py b/DeDRM_plugin/__init__.py similarity index 80% rename from dedrm_src/__init__.py rename to DeDRM_plugin/__init__.py index 58fc623..3d74e54 100644 --- a/dedrm_src/__init__.py +++ b/DeDRM_plugin/__init__.py @@ -2,13 +2,12 @@ # -*- coding: utf-8 -*- from __future__ import with_statement -from __future__ import print_function # __init__.py for DeDRM_plugin # Copyright © 2008-2019 Apprentice Harper et al. __license__ = 'GPL v3' -__version__ = '6.6.3' +__version__ = '6.7.0' __docformat__ = 'restructuredtext en' @@ -70,6 +69,7 @@ __docformat__ = 'restructuredtext en' # 6.6.1 - Thanks to wzyboy for a fix for stand-alone tools, and the new folder structure. # 6.6.2 - revamp of folders to get Mac OS X app working. Updated to 64-bit app. Various fixes. # 6.6.3 - More cleanup of kindle book names and start of support for .kinf2018 +# 6.7.0 - Handle new library in calibre. """ @@ -77,7 +77,7 @@ Decrypt DRMed ebooks. """ PLUGIN_NAME = u"DeDRM" -PLUGIN_VERSION_TUPLE = (6, 6, 3) +PLUGIN_VERSION_TUPLE = (6, 7, 0) PLUGIN_VERSION = u".".join([unicode(str(x)) for x in PLUGIN_VERSION_TUPLE]) # Include an html helpfile in the plugin's zipfile with the following name. RESOURCE_NAME = PLUGIN_NAME + '_Help.htm' @@ -88,11 +88,6 @@ import zipfile import traceback from zipfile import ZipFile -import erdr2pml -import ineptpdf -import k4mobidedrm -import zipfix - class DeDRMError(Exception): pass @@ -170,7 +165,7 @@ class DeDRM(FileTypePlugin): else: names = [u"libalfcrypto32.so",u"libalfcrypto64.so",u"kindlekey.py",u"adobekey.py",u"subasyncio.py"] lib_dict = self.load_resources(names) - print(u"{0} v{1}: Copying needed library files from plugin's zip".format(PLUGIN_NAME, PLUGIN_VERSION)) + print u"{0} v{1}: Copying needed library files from plugin's zip".format(PLUGIN_NAME, PLUGIN_VERSION) for entry, data in lib_dict.items(): file_path = os.path.join(self.alfdir, entry) @@ -182,7 +177,7 @@ class DeDRM(FileTypePlugin): try: open(file_path,'wb').write(data) except: - print(u"{0} v{1}: Exception when copying needed library files".format(PLUGIN_NAME, PLUGIN_VERSION)) + print u"{0} v{1}: Exception when copying needed library files".format(PLUGIN_NAME, PLUGIN_VERSION) traceback.print_exc() pass @@ -203,11 +198,11 @@ class DeDRM(FileTypePlugin): inf = self.temporary_file(u".epub") try: - print(u"{0} v{1}: Verifying zip archive integrity".format(PLUGIN_NAME, PLUGIN_VERSION)) + print u"{0} v{1}: Verifying zip archive integrity".format(PLUGIN_NAME, PLUGIN_VERSION) fr = zipfix.fixZip(path_to_ebook, inf.name) fr.fix() except Exception, e: - print(u"{0} v{1}: Error \'{2}\' when checking zip archive".format(PLUGIN_NAME, PLUGIN_VERSION, e.args[0])) + print u"{0} v{1}: Error \'{2}\' when checking zip archive".format(PLUGIN_NAME, PLUGIN_VERSION, e.args[0]) raise Exception(e) # import the decryption keys @@ -220,19 +215,19 @@ class DeDRM(FileTypePlugin): #check the book if ignobleepub.ignobleBook(inf.name): - print(u"{0} v{1}: “{2}” is a secure Barnes & Noble ePub".format(PLUGIN_NAME, PLUGIN_VERSION, os.path.basename(path_to_ebook))) + print u"{0} v{1}: “{2}” is a secure Barnes & Noble ePub".format(PLUGIN_NAME, PLUGIN_VERSION, os.path.basename(path_to_ebook)) # Attempt to decrypt epub with each encryption key (generated or provided). for keyname, userkey in dedrmprefs['bandnkeys'].items(): keyname_masked = u"".join((u'X' if (x.isdigit()) else x) for x in keyname) - print(u"{0} v{1}: Trying Encryption key {2:s}".format(PLUGIN_NAME, PLUGIN_VERSION, keyname_masked)) + print u"{0} v{1}: Trying Encryption key {2:s}".format(PLUGIN_NAME, PLUGIN_VERSION, keyname_masked) of = self.temporary_file(u".epub") # Give the user key, ebook and TemporaryPersistent file to the decryption function. try: result = ignobleepub.decryptBook(userkey, inf.name, of.name) except: - print(u"{0} v{1}: Exception when trying to decrypt after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) + print u"{0} v{1}: Exception when trying to decrypt after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime) traceback.print_exc() result = 1 @@ -243,10 +238,10 @@ class DeDRM(FileTypePlugin): # Return the modified PersistentTemporary file to calibre. return of.name - print(u"{0} v{1}: Failed to decrypt with key {2:s} after {3:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,keyname_masked,time.time()-self.starttime)) + print u"{0} v{1}: Failed to decrypt with key {2:s} after {3:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,keyname_masked,time.time()-self.starttime) # perhaps we should see if we can get a key from a log file - print(u"{0} v{1}: Looking for new NOOK Study Keys after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) + print u"{0} v{1}: Looking for new NOOK Study Keys after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime) # get the default NOOK Study keys defaultkeys = [] @@ -263,7 +258,7 @@ class DeDRM(FileTypePlugin): defaultkeys = WineGetKeys(scriptpath, u".b64",dedrmprefs['adobewineprefix']) except: - print(u"{0} v{1}: Exception when getting default NOOK Study Key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) + print u"{0} v{1}: Exception when getting default NOOK Study Key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime) traceback.print_exc() newkeys = [] @@ -274,7 +269,7 @@ class DeDRM(FileTypePlugin): if len(newkeys) > 0: try: for i,userkey in enumerate(newkeys): - print(u"{0} v{1}: Trying a new default key".format(PLUGIN_NAME, PLUGIN_VERSION)) + print u"{0} v{1}: Trying a new default key".format(PLUGIN_NAME, PLUGIN_VERSION) of = self.temporary_file(u".epub") @@ -282,7 +277,7 @@ class DeDRM(FileTypePlugin): try: result = ignobleepub.decryptBook(userkey, inf.name, of.name) except: - print(u"{0} v{1}: Exception when trying to decrypt after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) + print u"{0} v{1}: Exception when trying to decrypt after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime) traceback.print_exc() result = 1 @@ -291,59 +286,59 @@ class DeDRM(FileTypePlugin): if result == 0: # Decryption was a success # Store the new successful key in the defaults - print(u"{0} v{1}: Saving a new default key".format(PLUGIN_NAME, PLUGIN_VERSION)) + print u"{0} v{1}: Saving a new default key".format(PLUGIN_NAME, PLUGIN_VERSION) try: dedrmprefs.addnamedvaluetoprefs('bandnkeys','nook_Study_key',keyvalue) dedrmprefs.writeprefs() - print(u"{0} v{1}: Saved a new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime)) + print u"{0} v{1}: Saved a new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime) except: - print(u"{0} v{1}: Exception saving a new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) + print u"{0} v{1}: Exception saving a new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime) traceback.print_exc() # Return the modified PersistentTemporary file to calibre. return of.name - print(u"{0} v{1}: Failed to decrypt with new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime)) + print u"{0} v{1}: Failed to decrypt with new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime) except Exception, e: pass - print(u"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime)) + print u"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime) raise DeDRMError(u"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) # import the Adobe Adept ePub handler import calibre_plugins.dedrm.ineptepub as ineptepub if ineptepub.adeptBook(inf.name): - print(u"{0} v{1}: {2} is a secure Adobe Adept ePub".format(PLUGIN_NAME, PLUGIN_VERSION, os.path.basename(path_to_ebook))) + print u"{0} v{1}: {2} is a secure Adobe Adept ePub".format(PLUGIN_NAME, PLUGIN_VERSION, os.path.basename(path_to_ebook)) # Attempt to decrypt epub with each encryption key (generated or provided). for keyname, userkeyhex in dedrmprefs['adeptkeys'].items(): userkey = userkeyhex.decode('hex') - print(u"{0} v{1}: Trying Encryption key {2:s}".format(PLUGIN_NAME, PLUGIN_VERSION, keyname)) + print u"{0} v{1}: Trying Encryption key {2:s}".format(PLUGIN_NAME, PLUGIN_VERSION, keyname) of = self.temporary_file(u".epub") # Give the user key, ebook and TemporaryPersistent file to the decryption function. try: result = ineptepub.decryptBook(userkey, inf.name, of.name) except: - print(u"{0} v{1}: Exception when decrypting after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) + print u"{0} v{1}: Exception when decrypting after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime) traceback.print_exc() result = 1 try: of.close() except: - print(u"{0} v{1}: Exception closing temporary file after {2:.1f} seconds. Ignored.".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) + print u"{0} v{1}: Exception closing temporary file after {2:.1f} seconds. Ignored.".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime) if result == 0: # Decryption was successful. # Return the modified PersistentTemporary file to calibre. - print(u"{0} v{1}: Decrypted with key {2:s} after {3:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,keyname,time.time()-self.starttime)) + print u"{0} v{1}: Decrypted with key {2:s} after {3:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,keyname,time.time()-self.starttime) return of.name - print(u"{0} v{1}: Failed to decrypt with key {2:s} after {3:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,keyname,time.time()-self.starttime)) + print u"{0} v{1}: Failed to decrypt with key {2:s} after {3:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,keyname,time.time()-self.starttime) # perhaps we need to get a new default ADE key - print(u"{0} v{1}: Looking for new default Adobe Digital Editions Keys after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) + print u"{0} v{1}: Looking for new default Adobe Digital Editions Keys after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime) # get the default Adobe keys defaultkeys = [] @@ -361,7 +356,7 @@ class DeDRM(FileTypePlugin): self.default_key = defaultkeys[0] except: - print(u"{0} v{1}: Exception when getting default Adobe Key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) + print u"{0} v{1}: Exception when getting default Adobe Key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime) traceback.print_exc() self.default_key = u"" @@ -373,14 +368,14 @@ class DeDRM(FileTypePlugin): if len(newkeys) > 0: try: for i,userkey in enumerate(newkeys): - print(u"{0} v{1}: Trying a new default key".format(PLUGIN_NAME, PLUGIN_VERSION)) + print u"{0} v{1}: Trying a new default key".format(PLUGIN_NAME, PLUGIN_VERSION) of = self.temporary_file(u".epub") # Give the user key, ebook and TemporaryPersistent file to the decryption function. try: result = ineptepub.decryptBook(userkey, inf.name, of.name) except: - print(u"{0} v{1}: Exception when decrypting after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) + print u"{0} v{1}: Exception when decrypting after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime) traceback.print_exc() result = 1 @@ -389,31 +384,31 @@ class DeDRM(FileTypePlugin): if result == 0: # Decryption was a success # Store the new successful key in the defaults - print(u"{0} v{1}: Saving a new default key".format(PLUGIN_NAME, PLUGIN_VERSION)) + print u"{0} v{1}: Saving a new default key".format(PLUGIN_NAME, PLUGIN_VERSION) try: dedrmprefs.addnamedvaluetoprefs('adeptkeys','default_key',keyvalue.encode('hex')) dedrmprefs.writeprefs() - print(u"{0} v{1}: Saved a new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime)) + print u"{0} v{1}: Saved a new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime) except: - print(u"{0} v{1}: Exception when saving a new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) + print u"{0} v{1}: Exception when saving a new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime) traceback.print_exc() - print(u"{0} v{1}: Decrypted with new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime)) + print u"{0} v{1}: Decrypted with new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime) # Return the modified PersistentTemporary file to calibre. return of.name - print(u"{0} v{1}: Failed to decrypt with new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime)) + print u"{0} v{1}: Failed to decrypt with new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime) except Exception, e: - print(u"{0} v{1}: Unexpected Exception trying a new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) + print u"{0} v{1}: Unexpected Exception trying a new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime) traceback.print_exc() pass # Something went wrong with decryption. - print(u"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime)) + print u"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime) raise DeDRMError(u"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime)) # Not a Barnes & Noble nor an Adobe Adept # Import the fixed epub. - print(u"{0} v{1}: “{2}” is neither an Adobe Adept nor a Barnes & Noble encrypted ePub".format(PLUGIN_NAME, PLUGIN_VERSION, os.path.basename(path_to_ebook))) + print u"{0} v{1}: “{2}” is neither an Adobe Adept nor a Barnes & Noble encrypted ePub".format(PLUGIN_NAME, PLUGIN_VERSION, os.path.basename(path_to_ebook)) raise DeDRMError(u"{0} v{1}: Couldn't decrypt after {2:.1f} seconds. DRM free perhaps?".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime)) def PDFDecrypt(self,path_to_ebook): @@ -422,17 +417,17 @@ class DeDRM(FileTypePlugin): dedrmprefs = prefs.DeDRM_Prefs() # Attempt to decrypt epub with each encryption key (generated or provided). - print(u"{0} v{1}: {2} is a PDF ebook".format(PLUGIN_NAME, PLUGIN_VERSION, os.path.basename(path_to_ebook))) + print u"{0} v{1}: {2} is a PDF ebook".format(PLUGIN_NAME, PLUGIN_VERSION, os.path.basename(path_to_ebook)) for keyname, userkeyhex in dedrmprefs['adeptkeys'].items(): userkey = userkeyhex.decode('hex') - print(u"{0} v{1}: Trying Encryption key {2:s}".format(PLUGIN_NAME, PLUGIN_VERSION, keyname)) + print u"{0} v{1}: Trying Encryption key {2:s}".format(PLUGIN_NAME, PLUGIN_VERSION, keyname) of = self.temporary_file(u".pdf") # Give the user key, ebook and TemporaryPersistent file to the decryption function. try: result = ineptpdf.decryptBook(userkey, path_to_ebook, of.name) except: - print(u"{0} v{1}: Exception when decrypting after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) + print u"{0} v{1}: Exception when decrypting after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime) traceback.print_exc() result = 1 @@ -443,10 +438,10 @@ class DeDRM(FileTypePlugin): # Return the modified PersistentTemporary file to calibre. return of.name - print(u"{0} v{1}: Failed to decrypt with key {2:s} after {3:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,keyname,time.time()-self.starttime)) + print u"{0} v{1}: Failed to decrypt with key {2:s} after {3:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,keyname,time.time()-self.starttime) # perhaps we need to get a new default ADE key - print(u"{0} v{1}: Looking for new default Adobe Digital Editions Keys after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) + print u"{0} v{1}: Looking for new default Adobe Digital Editions Keys after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime) # get the default Adobe keys defaultkeys = [] @@ -464,7 +459,7 @@ class DeDRM(FileTypePlugin): self.default_key = defaultkeys[0] except: - print(u"{0} v{1}: Exception when getting default Adobe Key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) + print u"{0} v{1}: Exception when getting default Adobe Key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime) traceback.print_exc() self.default_key = u"" @@ -476,14 +471,14 @@ class DeDRM(FileTypePlugin): if len(newkeys) > 0: try: for i,userkey in enumerate(newkeys): - print(u"{0} v{1}: Trying a new default key".format(PLUGIN_NAME, PLUGIN_VERSION)) + print u"{0} v{1}: Trying a new default key".format(PLUGIN_NAME, PLUGIN_VERSION) of = self.temporary_file(u".pdf") # Give the user key, ebook and TemporaryPersistent file to the decryption function. try: result = ineptpdf.decryptBook(userkey, path_to_ebook, of.name) except: - print(u"{0} v{1}: Exception when decrypting after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) + print u"{0} v{1}: Exception when decrypting after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime) traceback.print_exc() result = 1 @@ -492,23 +487,23 @@ class DeDRM(FileTypePlugin): if result == 0: # Decryption was a success # Store the new successful key in the defaults - print(u"{0} v{1}: Saving a new default key".format(PLUGIN_NAME, PLUGIN_VERSION)) + print u"{0} v{1}: Saving a new default key".format(PLUGIN_NAME, PLUGIN_VERSION) try: dedrmprefs.addnamedvaluetoprefs('adeptkeys','default_key',keyvalue.encode('hex')) dedrmprefs.writeprefs() - print(u"{0} v{1}: Saved a new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime)) + print u"{0} v{1}: Saved a new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime) except: - print(u"{0} v{1}: Exception when saving a new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) + print u"{0} v{1}: Exception when saving a new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime) traceback.print_exc() # Return the modified PersistentTemporary file to calibre. return of.name - print(u"{0} v{1}: Failed to decrypt with new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime)) + print u"{0} v{1}: Failed to decrypt with new default key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime) except Exception, e: pass # Something went wrong with decryption. - print(u"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime)) + print u"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime) raise DeDRMError(u"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) @@ -539,8 +534,8 @@ class DeDRM(FileTypePlugin): decoded = False # perhaps we need to get a new default Kindle for Mac/PC key defaultkeys = [] - print(u"{0} v{1}: Failed to decrypt with error: {2}".format(PLUGIN_NAME, PLUGIN_VERSION,e.args[0])) - print(u"{0} v{1}: Looking for new default Kindle Key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) + print u"{0} v{1}: Failed to decrypt with error: {2}".format(PLUGIN_NAME, PLUGIN_VERSION,e.args[0]) + print u"{0} v{1}: Looking for new default Kindle Key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime) try: if iswindows or isosx: @@ -553,7 +548,7 @@ class DeDRM(FileTypePlugin): scriptpath = os.path.join(self.alfdir,u"kindlekey.py") defaultkeys = WineGetKeys(scriptpath, u".k4i",dedrmprefs['kindlewineprefix']) except: - print(u"{0} v{1}: Exception when getting default Kindle Key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) + print u"{0} v{1}: Exception when getting default Kindle Key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime) traceback.print_exc() pass @@ -563,12 +558,12 @@ class DeDRM(FileTypePlugin): if keyvalue not in dedrmprefs['kindlekeys'].values(): newkeys[keyname] = keyvalue if len(newkeys) > 0: - print(u"{0} v{1}: Found {2} new {3}".format(PLUGIN_NAME, PLUGIN_VERSION, len(newkeys), u"key" if len(newkeys)==1 else u"keys")) + print u"{0} v{1}: Found {2} new {3}".format(PLUGIN_NAME, PLUGIN_VERSION, len(newkeys), u"key" if len(newkeys)==1 else u"keys") try: book = k4mobidedrm.GetDecryptedBook(path_to_ebook,newkeys.items(),[],[],[],self.starttime) decoded = True # store the new successful keys in the defaults - print(u"{0} v{1}: Saving {2} new {3}".format(PLUGIN_NAME, PLUGIN_VERSION, len(newkeys), u"key" if len(newkeys)==1 else u"keys")) + print u"{0} v{1}: Saving {2} new {3}".format(PLUGIN_NAME, PLUGIN_VERSION, len(newkeys), u"key" if len(newkeys)==1 else u"keys") for keyvalue in newkeys.values(): dedrmprefs.addnamedvaluetoprefs('kindlekeys','default_key',keyvalue) dedrmprefs.writeprefs() @@ -576,7 +571,7 @@ class DeDRM(FileTypePlugin): pass if not decoded: #if you reached here then no luck raise and exception - print(u"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime)) + print u"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime) raise DeDRMError(u"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime)) of = self.temporary_file(book.getBookExtension()) @@ -595,7 +590,7 @@ class DeDRM(FileTypePlugin): # Attempt to decrypt epub with each encryption key (generated or provided). for keyname, userkey in dedrmprefs['ereaderkeys'].items(): keyname_masked = u"".join((u'X' if (x.isdigit()) else x) for x in keyname) - print(u"{0} v{1}: Trying Encryption key {2:s}".format(PLUGIN_NAME, PLUGIN_VERSION, keyname_masked)) + print u"{0} v{1}: Trying Encryption key {2:s}".format(PLUGIN_NAME, PLUGIN_VERSION, keyname_masked) of = self.temporary_file(u".pmlz") # Give the userkey, ebook and TemporaryPersistent file to the decryption function. @@ -606,12 +601,12 @@ class DeDRM(FileTypePlugin): # Decryption was successful return the modified PersistentTemporary # file to Calibre's import process. if result == 0: - print(u"{0} v{1}: Successfully decrypted with key {2:s} after {3:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,keyname_masked,time.time()-self.starttime)) + print u"{0} v{1}: Successfully decrypted with key {2:s} after {3:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,keyname_masked,time.time()-self.starttime) return of.name - print(u"{0} v{1}: Failed to decrypt with key {2:s} after {3:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,keyname_masked,time.time()-self.starttime)) + print u"{0} v{1}: Failed to decrypt with key {2:s} after {3:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,keyname_masked,time.time()-self.starttime) - print(u"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime)) + print u"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime) raise DeDRMError(u"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) @@ -621,7 +616,7 @@ class DeDRM(FileTypePlugin): sys.stdout=SafeUnbuffered(sys.stdout) sys.stderr=SafeUnbuffered(sys.stderr) - print(u"{0} v{1}: Trying to decrypt {2}".format(PLUGIN_NAME, PLUGIN_VERSION, os.path.basename(path_to_ebook))) + print u"{0} v{1}: Trying to decrypt {2}".format(PLUGIN_NAME, PLUGIN_VERSION, os.path.basename(path_to_ebook)) self.starttime = time.time() booktype = os.path.splitext(path_to_ebook)[1].lower()[1:] @@ -640,9 +635,9 @@ class DeDRM(FileTypePlugin): # Adobe Adept or B&N ePub decrypted_ebook = self.ePubDecrypt(path_to_ebook) else: - print(u"Unknown booktype {0}. Passing back to calibre unchanged".format(booktype)) + print u"Unknown booktype {0}. Passing back to calibre unchanged".format(booktype) return path_to_ebook - print(u"{0} v{1}: Finished after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime)) + print u"{0} v{1}: Finished after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime) return decrypted_ebook def is_customizable(self): diff --git a/dedrm_src/activitybar.py b/DeDRM_plugin/activitybar.py similarity index 100% rename from dedrm_src/activitybar.py rename to DeDRM_plugin/activitybar.py diff --git a/dedrm_src/adobekey.py b/DeDRM_plugin/adobekey.py similarity index 100% rename from dedrm_src/adobekey.py rename to DeDRM_plugin/adobekey.py diff --git a/dedrm_src/aescbc.py b/DeDRM_plugin/aescbc.py similarity index 100% rename from dedrm_src/aescbc.py rename to DeDRM_plugin/aescbc.py diff --git a/dedrm_src/alfcrypto.dll b/DeDRM_plugin/alfcrypto.dll similarity index 100% rename from dedrm_src/alfcrypto.dll rename to DeDRM_plugin/alfcrypto.dll diff --git a/dedrm_src/alfcrypto.py b/DeDRM_plugin/alfcrypto.py similarity index 100% rename from dedrm_src/alfcrypto.py rename to DeDRM_plugin/alfcrypto.py diff --git a/dedrm_src/alfcrypto64.dll b/DeDRM_plugin/alfcrypto64.dll similarity index 100% rename from dedrm_src/alfcrypto64.dll rename to DeDRM_plugin/alfcrypto64.dll diff --git a/dedrm_src/alfcrypto_src.zip b/DeDRM_plugin/alfcrypto_src.zip similarity index 100% rename from dedrm_src/alfcrypto_src.zip rename to DeDRM_plugin/alfcrypto_src.zip diff --git a/dedrm_src/androidkindlekey.py b/DeDRM_plugin/androidkindlekey.py similarity index 100% rename from dedrm_src/androidkindlekey.py rename to DeDRM_plugin/androidkindlekey.py diff --git a/dedrm_src/argv_utils.py b/DeDRM_plugin/argv_utils.py similarity index 100% rename from dedrm_src/argv_utils.py rename to DeDRM_plugin/argv_utils.py diff --git a/dedrm_src/askfolder_ed.py b/DeDRM_plugin/askfolder_ed.py similarity index 100% rename from dedrm_src/askfolder_ed.py rename to DeDRM_plugin/askfolder_ed.py diff --git a/dedrm_src/config.py b/DeDRM_plugin/config.py similarity index 100% rename from dedrm_src/config.py rename to DeDRM_plugin/config.py diff --git a/dedrm_src/convert2xml.py b/DeDRM_plugin/convert2xml.py similarity index 100% rename from dedrm_src/convert2xml.py rename to DeDRM_plugin/convert2xml.py diff --git a/dedrm_src/encodebase64.py b/DeDRM_plugin/encodebase64.py similarity index 100% rename from dedrm_src/encodebase64.py rename to DeDRM_plugin/encodebase64.py diff --git a/dedrm_src/epubtest.py b/DeDRM_plugin/epubtest.py similarity index 100% rename from dedrm_src/epubtest.py rename to DeDRM_plugin/epubtest.py diff --git a/dedrm_src/erdr2pml.py b/DeDRM_plugin/erdr2pml.py similarity index 100% rename from dedrm_src/erdr2pml.py rename to DeDRM_plugin/erdr2pml.py diff --git a/dedrm_src/flatxml2html.py b/DeDRM_plugin/flatxml2html.py similarity index 100% rename from dedrm_src/flatxml2html.py rename to DeDRM_plugin/flatxml2html.py diff --git a/dedrm_src/flatxml2svg.py b/DeDRM_plugin/flatxml2svg.py similarity index 100% rename from dedrm_src/flatxml2svg.py rename to DeDRM_plugin/flatxml2svg.py diff --git a/dedrm_src/genbook.py b/DeDRM_plugin/genbook.py similarity index 100% rename from dedrm_src/genbook.py rename to DeDRM_plugin/genbook.py diff --git a/dedrm_src/ignobleepub.py b/DeDRM_plugin/ignobleepub.py similarity index 100% rename from dedrm_src/ignobleepub.py rename to DeDRM_plugin/ignobleepub.py diff --git a/dedrm_src/ignoblekey.py b/DeDRM_plugin/ignoblekey.py similarity index 100% rename from dedrm_src/ignoblekey.py rename to DeDRM_plugin/ignoblekey.py diff --git a/dedrm_src/ignoblekeyfetch.py b/DeDRM_plugin/ignoblekeyfetch.py similarity index 100% rename from dedrm_src/ignoblekeyfetch.py rename to DeDRM_plugin/ignoblekeyfetch.py diff --git a/dedrm_src/ignoblekeygen.py b/DeDRM_plugin/ignoblekeygen.py similarity index 100% rename from dedrm_src/ignoblekeygen.py rename to DeDRM_plugin/ignoblekeygen.py diff --git a/dedrm_src/ineptepub.py b/DeDRM_plugin/ineptepub.py similarity index 100% rename from dedrm_src/ineptepub.py rename to DeDRM_plugin/ineptepub.py diff --git a/dedrm_src/ineptpdf.py b/DeDRM_plugin/ineptpdf.py similarity index 100% rename from dedrm_src/ineptpdf.py rename to DeDRM_plugin/ineptpdf.py diff --git a/dedrm_src/ion.py b/DeDRM_plugin/ion.py similarity index 100% rename from dedrm_src/ion.py rename to DeDRM_plugin/ion.py diff --git a/dedrm_src/k4mobidedrm.py b/DeDRM_plugin/k4mobidedrm.py similarity index 100% rename from dedrm_src/k4mobidedrm.py rename to DeDRM_plugin/k4mobidedrm.py diff --git a/dedrm_src/kfxdedrm.py b/DeDRM_plugin/kfxdedrm.py similarity index 100% rename from dedrm_src/kfxdedrm.py rename to DeDRM_plugin/kfxdedrm.py diff --git a/dedrm_src/kgenpids.py b/DeDRM_plugin/kgenpids.py similarity index 100% rename from dedrm_src/kgenpids.py rename to DeDRM_plugin/kgenpids.py diff --git a/dedrm_src/kindlekey.py b/DeDRM_plugin/kindlekey.py similarity index 100% rename from dedrm_src/kindlekey.py rename to DeDRM_plugin/kindlekey.py diff --git a/dedrm_src/kindlepid.py b/DeDRM_plugin/kindlepid.py similarity index 100% rename from dedrm_src/kindlepid.py rename to DeDRM_plugin/kindlepid.py diff --git a/dedrm_src/libalfcrypto.dylib b/DeDRM_plugin/libalfcrypto.dylib similarity index 100% rename from dedrm_src/libalfcrypto.dylib rename to DeDRM_plugin/libalfcrypto.dylib diff --git a/dedrm_src/libalfcrypto32.so b/DeDRM_plugin/libalfcrypto32.so similarity index 100% rename from dedrm_src/libalfcrypto32.so rename to DeDRM_plugin/libalfcrypto32.so diff --git a/dedrm_src/libalfcrypto64.so b/DeDRM_plugin/libalfcrypto64.so similarity index 100% rename from dedrm_src/libalfcrypto64.so rename to DeDRM_plugin/libalfcrypto64.so diff --git a/dedrm_src/mobidedrm.py b/DeDRM_plugin/mobidedrm.py similarity index 100% rename from dedrm_src/mobidedrm.py rename to DeDRM_plugin/mobidedrm.py diff --git a/dedrm_src/openssl_des.py b/DeDRM_plugin/openssl_des.py similarity index 100% rename from dedrm_src/openssl_des.py rename to DeDRM_plugin/openssl_des.py diff --git a/dedrm_src/plugin-import-name-dedrm.txt b/DeDRM_plugin/plugin-import-name-dedrm.txt similarity index 100% rename from dedrm_src/plugin-import-name-dedrm.txt rename to DeDRM_plugin/plugin-import-name-dedrm.txt diff --git a/dedrm_src/prefs.py b/DeDRM_plugin/prefs.py similarity index 100% rename from dedrm_src/prefs.py rename to DeDRM_plugin/prefs.py diff --git a/dedrm_src/pycrypto_des.py b/DeDRM_plugin/pycrypto_des.py similarity index 100% rename from dedrm_src/pycrypto_des.py rename to DeDRM_plugin/pycrypto_des.py diff --git a/dedrm_src/python_des.py b/DeDRM_plugin/python_des.py similarity index 100% rename from dedrm_src/python_des.py rename to DeDRM_plugin/python_des.py diff --git a/dedrm_src/scriptinterface.py b/DeDRM_plugin/scriptinterface.py similarity index 100% rename from dedrm_src/scriptinterface.py rename to DeDRM_plugin/scriptinterface.py diff --git a/dedrm_src/scrolltextwidget.py b/DeDRM_plugin/scrolltextwidget.py similarity index 100% rename from dedrm_src/scrolltextwidget.py rename to DeDRM_plugin/scrolltextwidget.py diff --git a/dedrm_src/simpleprefs.py b/DeDRM_plugin/simpleprefs.py similarity index 100% rename from dedrm_src/simpleprefs.py rename to DeDRM_plugin/simpleprefs.py diff --git a/dedrm_src/stylexml2css.py b/DeDRM_plugin/stylexml2css.py similarity index 100% rename from dedrm_src/stylexml2css.py rename to DeDRM_plugin/stylexml2css.py diff --git a/dedrm_src/subasyncio.py b/DeDRM_plugin/subasyncio.py similarity index 100% rename from dedrm_src/subasyncio.py rename to DeDRM_plugin/subasyncio.py diff --git a/dedrm_src/topazextract.py b/DeDRM_plugin/topazextract.py similarity index 100% rename from dedrm_src/topazextract.py rename to DeDRM_plugin/topazextract.py diff --git a/dedrm_src/utilities.py b/DeDRM_plugin/utilities.py similarity index 100% rename from dedrm_src/utilities.py rename to DeDRM_plugin/utilities.py diff --git a/dedrm_src/wineutils.py b/DeDRM_plugin/wineutils.py similarity index 100% rename from dedrm_src/wineutils.py rename to DeDRM_plugin/wineutils.py diff --git a/dedrm_src/zipfilerugged.py b/DeDRM_plugin/zipfilerugged.py similarity index 100% rename from dedrm_src/zipfilerugged.py rename to DeDRM_plugin/zipfilerugged.py diff --git a/dedrm_src/zipfix.py b/DeDRM_plugin/zipfix.py similarity index 100% rename from dedrm_src/zipfix.py rename to DeDRM_plugin/zipfix.py diff --git a/DeDRM_plugin_ReadMe.txt b/DeDRM_plugin_ReadMe.txt new file mode 100644 index 0000000..96a6516 --- /dev/null +++ b/DeDRM_plugin_ReadMe.txt @@ -0,0 +1,34 @@ +DeDRM_plugin.zip +================ + +This plugin will remove the DRM from: + + - Kindle ebooks (files from Kindle for Mac/PC and eInk Kindles). + - Adobe Digital Editions (v2.0.1***) ePubs (including Kobo and Google ePubs downloaded to ADE) + - Adobe Digital Editions (v2.0.1) PDFs + +For limitations and work-arounds, see the FAQ at https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md + + +Installation +------------ +Open calibre's Preferences dialog. Click on the "Plugins" button. Next, click on the button, "Load plugin from file". Navigate to the unzipped DeDRM_tools folder, find the file "DeDRM_plugin.zip". Click to select the file and select "Open". Click "Yes" in the "Are you sure?" dialog box. Click the "OK" button in the "Success" dialog box. + + +Customization +------------- +For Kindle ebooks from an E-Ink based Kindle (e.g. Voyage), or books downloaded from the Amazon web site 'for transfer via USB' to an E-Ink base Kindle, you must enter the Kindle's serial number in the customisation dialog. + +When you have finished entering your configuration information, you must click the OK button to save it. If you click the Cancel button, all your changes in all the configuration dialogs will be lost. + + +Troubleshooting +--------------- +If you find that the DeDRM plugin is not working for you (imported ebooks still have DRM - that is, they won't convert or open in the calibre ebook viewer), you should make a log of the import process by deleting the DRMed ebook from calibre and then adding the ebook to calibre when it's running in debug mode. This will generate a lot of helpful debugging info that can be copied into any online help requests. Here's how to do it: + + - Remove the DRMed book from calibre. + - Click the Preferences drop-down menu and choose 'Restart in debug mode'. + - Once calibre has re-started, import the problem ebook. + - Now close calibre. + +A log will appear that you can copy and paste into a comment at Apprentice Alf's blog, http://apprenticealf.wordpress.com/ or an issue at Apprentice Harper's repository, https://github.com/apprenticeharper/DeDRM_tools/issues . You should also give details of your computer, and how you obtained the ebook file. diff --git a/FAQs.md b/FAQs.md index 0791d3a..edc545b 100644 --- a/FAQs.md +++ b/FAQs.md @@ -20,9 +20,9 @@ Just download and use these tools, that's all! Uh, almost. There are a few, uh, But otherwise, if your ebook is from Amazon, Kobo, Barnes & Noble or any of the ebook stores selling ebooks compatible with Adobe Digital Editions 2.0.1, you should be able to remove the DRM that's been applied to your ebooks. ### A Recent Change to Kindle for PC/Kindle for Mac -Starting with version 1.19, Kindle for PC/Mac uses Amazon's new KFX format which isn't quite as good a source fro conversion to ePub as the older KF8 (& MOBI) formats. There are two options to get the older formats. Either stick with version 1.17 or earlier, or modify the executable by changing a file name. Note that with Kindle for PC/Mac 1.25 and later, there is no current solution even for FKX. You must use 1.24 or earlier. +Starting with version 1.19, Kindle for PC/Mac uses Amazon's new KFX format which isn't quite as good a source for conversion to ePub as the older KF8 (& MOBI) formats. There are two options to get the older formats. Either stick with version 1.17 or earlier, or modify the executable by changing a file name (PC) or disabling a component of the application (Mac). Note that with Kindle for **PC** 1.25 and later, there is no current solution even for KFX. You must use 1.24 or earlier. With Kindle for **Mac** 1.25 and later, see instructions in [this post](https://www.mobileread.com/forums/showpost.php?p=3819708&postcount=508). (Note: macOS Catalina can only run 64-bit apps, which means Kindle for Mac 1.25 and later. Earlier versions of Kindle for Mac are 32-bit and will not run on Catalina. If you are planning to upgrade to Catalina, [read this post](https://www.mobileread.com/forums/showpost.php?p=3819708&postcount=508) carefully first.) -Version 1.17 of Kindle is are no longer available directly from Amazon, so you will need to search for the proper file name and find it on a third party site. The name is `KindleForPC-installer-1.17.44170.exe` for PC and `KindleForMac-44182.dmg` for Mac. +Version 1.17 of Kindle is no longer available directly from Amazon, so you will need to search for the proper file name and find it on a third party site. The name is `KindleForPC-installer-1.17.44170.exe` for PC and `KindleForMac-44182.dmg` for Mac. Verify the one of the following cryptographic hash values, using software of your choice, before installing the downloaded file in order to avoid viruses. If the hash does not match, delete the downloaded file and try again from another site. #### Kindle for PC `KindleForPC-installer-1.17.44170.exe`: @@ -37,7 +37,7 @@ Verify the one of the following cryptographic hash values, using software of you You will need to go to the preferences and uncheck the auto update checkbox. Then download and install 1.17 over the top of the 1.19 installation. You'll also need to delete the KFX folders from your My Kindle Content folder. -A other possible solution is to use 1.19 or later, but disable KFX by renaming or disabling a necessary component of the application. This may or may not work on versions after 1.20. In a command window, enter the following commands when Kindle for PC/Mac is not running: +Another possible solution is to use 1.19 or later, but disable KFX by renaming or disabling a necessary component of the application. This may or may not work on versions after 1.20. In a command window, enter the following commands when Kindle for PC/Mac is not running: #### Windows `ren %localappdata%\Amazon\Kindle\application\renderer-test.exe renderer-test.xxx` @@ -52,7 +52,7 @@ Mac Note: If the chmod command fails with a permission error try again using `su After restarting the Kindle program any books previously downloaded in KFX format will no longer open. You will need to remove them from your device and re-download them. All future downloads will use the older Kindle formats instead of KFX although they will continue to be placed in one individual subdirectory per book. #### Decrypting KFX -Thanks to work by several people, the tools can now decrypt KFX format ebooks from Kindle for PC. In addition to the DeDRM plugin, calibre users will also need to install jhowell's KFX Input plugin which is available through the standard plugin menu in calibre, or directly from [his plugin thread](https://www.mobileread.com/forums/showthread.php?t=291290) on Mobileread. Not that KFX decryption does not work for Kindle for Mac 1.25 and later. +Thanks to work by several people, the tools can now decrypt KFX format ebooks from Kindle for PC. In addition to the DeDRM plugin, calibre users will also need to install jhowell's KFX Input plugin which is available through the standard plugin menu in calibre, or directly from [his plugin thread](https://www.mobileread.com/forums/showthread.php?t=291290) on Mobileread. Note that KFX decryption does not work for Kindle for PC/Mac 1.25 and later. #### Thanks Thanks to jhowell for his investigations into KFX format and the KFX Input plugin. Some of these instructions are from [his thread on the subject](https://www.mobileread.com/forums/showthread.php?t=283371) at MobileRead. diff --git a/obok_src/__init__.py b/Obok_plugin/__init__.py similarity index 98% rename from obok_src/__init__.py rename to Obok_plugin/__init__.py index b678f06..b593136 100644 --- a/obok_src/__init__.py +++ b/Obok_plugin/__init__.py @@ -3,6 +3,7 @@ from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' +__version__ = '6.7.0' __docformat__ = 'restructuredtext en' ##################################################################### @@ -19,7 +20,7 @@ except NameError: PLUGIN_NAME = 'Obok DeDRM' PLUGIN_SAFE_NAME = PLUGIN_NAME.strip().lower().replace(' ', '_') PLUGIN_DESCRIPTION = _('Removes DRM from Kobo kepubs and adds them to the library.') -PLUGIN_VERSION_TUPLE = (6, 5, 4) +PLUGIN_VERSION_TUPLE = (6, 7, 0) PLUGIN_VERSION = '.'.join([str(x) for x in PLUGIN_VERSION_TUPLE]) HELPFILE_NAME = PLUGIN_SAFE_NAME + '_Help.htm' PLUGIN_AUTHORS = 'Anon' diff --git a/obok_src/action.py b/Obok_plugin/action.py similarity index 100% rename from obok_src/action.py rename to Obok_plugin/action.py diff --git a/obok_src/common_utils.py b/Obok_plugin/common_utils.py similarity index 100% rename from obok_src/common_utils.py rename to Obok_plugin/common_utils.py diff --git a/obok_src/config.py b/Obok_plugin/config.py similarity index 100% rename from obok_src/config.py rename to Obok_plugin/config.py diff --git a/obok_src/dialogs.py b/Obok_plugin/dialogs.py similarity index 100% rename from obok_src/dialogs.py rename to Obok_plugin/dialogs.py diff --git a/obok_src/images/obok.png b/Obok_plugin/images/obok.png similarity index 100% rename from obok_src/images/obok.png rename to Obok_plugin/images/obok.png diff --git a/obok_src/obok/__init__.py b/Obok_plugin/obok/__init__.py similarity index 100% rename from obok_src/obok/__init__.py rename to Obok_plugin/obok/__init__.py diff --git a/obok_src/obok/legacy_obok.py b/Obok_plugin/obok/legacy_obok.py similarity index 100% rename from obok_src/obok/legacy_obok.py rename to Obok_plugin/obok/legacy_obok.py diff --git a/obok_src/obok/obok.py b/Obok_plugin/obok/obok.py similarity index 100% rename from obok_src/obok/obok.py rename to Obok_plugin/obok/obok.py diff --git a/obok_src/obok_dedrm_Help.htm b/Obok_plugin/obok_dedrm_Help.htm similarity index 100% rename from obok_src/obok_dedrm_Help.htm rename to Obok_plugin/obok_dedrm_Help.htm diff --git a/obok_src/plugin-import-name-obok_dedrm.txt b/Obok_plugin/plugin-import-name-obok_dedrm.txt similarity index 100% rename from obok_src/plugin-import-name-obok_dedrm.txt rename to Obok_plugin/plugin-import-name-obok_dedrm.txt diff --git a/obok_src/translations/ar.mo b/Obok_plugin/translations/ar.mo similarity index 100% rename from obok_src/translations/ar.mo rename to Obok_plugin/translations/ar.mo diff --git a/obok_src/translations/ar.po b/Obok_plugin/translations/ar.po similarity index 100% rename from obok_src/translations/ar.po rename to Obok_plugin/translations/ar.po diff --git a/obok_src/translations/de.mo b/Obok_plugin/translations/de.mo similarity index 100% rename from obok_src/translations/de.mo rename to Obok_plugin/translations/de.mo diff --git a/obok_src/translations/de.po b/Obok_plugin/translations/de.po similarity index 100% rename from obok_src/translations/de.po rename to Obok_plugin/translations/de.po diff --git a/obok_src/translations/default.po b/Obok_plugin/translations/default.po similarity index 100% rename from obok_src/translations/default.po rename to Obok_plugin/translations/default.po diff --git a/obok_src/translations/es.mo b/Obok_plugin/translations/es.mo similarity index 100% rename from obok_src/translations/es.mo rename to Obok_plugin/translations/es.mo diff --git a/obok_src/translations/es.po b/Obok_plugin/translations/es.po similarity index 100% rename from obok_src/translations/es.po rename to Obok_plugin/translations/es.po diff --git a/obok_src/translations/nl.mo b/Obok_plugin/translations/nl.mo similarity index 100% rename from obok_src/translations/nl.mo rename to Obok_plugin/translations/nl.mo diff --git a/obok_src/translations/nl.po b/Obok_plugin/translations/nl.po similarity index 100% rename from obok_src/translations/nl.po rename to Obok_plugin/translations/nl.po diff --git a/obok_src/translations/pt.mo b/Obok_plugin/translations/pt.mo similarity index 100% rename from obok_src/translations/pt.mo rename to Obok_plugin/translations/pt.mo diff --git a/obok_src/translations/pt.po b/Obok_plugin/translations/pt.po similarity index 100% rename from obok_src/translations/pt.po rename to Obok_plugin/translations/pt.po diff --git a/Obok_plugin/translations/sv.mo b/Obok_plugin/translations/sv.mo new file mode 100644 index 0000000..235c9da Binary files /dev/null and b/Obok_plugin/translations/sv.mo differ diff --git a/Obok_plugin/translations/sv.po b/Obok_plugin/translations/sv.po new file mode 100644 index 0000000..66b14ab --- /dev/null +++ b/Obok_plugin/translations/sv.po @@ -0,0 +1,366 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-11-17 12:51+0100\n" +"PO-Revision-Date: 2020-02-02 09:18+0100\n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Last-Translator: \n" +"Language-Team: \n" +"X-Generator: Poedit 2.2.4\n" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:80 +msgid "" +"

No books found in Kobo Library\n" +"Are you sure it's installed\\configured\\synchronized?" +msgstr "" +"

Inga böcker finns i Kobo-bibliotek\n" +"Är du säker på att den är installerad\\konfigurerad\\synkroniserad?" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:87 +msgid "Legacy key found: " +msgstr "Äldre nyckel hittades: " + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:93 +msgid "Trouble retrieving keys with newer obok method." +msgstr "Problem med att hämta nycklar med nyare obok-metod." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:97 +msgid "Found {0} possible keys to try." +msgstr "Hittade {0} möjliga nycklar att pröva med." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:99 +msgid "

No userkeys found to decrypt books with. No point in proceeding." +msgstr "" +"

Inga användarnycklar hittades för att dekryptera böcker med. Det är ingen " +"idé att fortsätta." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:115 +msgid "{} - Decryption canceled by user." +msgstr "{} - Dekryptering avbryts av användaren." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:135 +msgid "{} - \"Add books\" canceled by user." +msgstr "{} - \"Lägg till böcker\" avbröts av användaren." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:137 +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:156 +msgid "{} - wrapping up results." +msgstr "{} - samlar in resultat." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:153 +msgid "{} - User opted not to try to insert EPUB formats" +msgstr "{} - Användaren valde att inte försöka infoga EPUB-format" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:188 +msgid "{0} - Decrypting {1}" +msgstr "{0} - Dekrypterar {1}" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:197 +msgid "{0} - Couldn't decrypt {1}" +msgstr "{0} - Kunde inte dekryptera {1}" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:198 +msgid "decryption errors" +msgstr "dekrypteringsfel" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:213 +msgid "{0} - Added {1}" +msgstr "{0} - Lade till {1}" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:218 +msgid "{0} - {1} already exists. Will try to add format later." +msgstr "{0} - {1} finns redan. Kommer att försöka lägga till format senare." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:219 +msgid "duplicate detected" +msgstr "dubblett upptäcktes" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:233 +msgid "{0} - Successfully added EPUB format to existing {1}" +msgstr "{0} - Lade till EPUB-format till befintliga {1}" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:236 +msgid "" +"{0} - Error adding EPUB format to existing {1}. This really shouldn't happen." +msgstr "" +"{0} - Fel vid tillägg av EPUB-format till befintligt {1}. Det här borde inte " +"hända." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:259 +msgid "{} - \"Insert formats\" canceled by user." +msgstr "{} - \"Infoga format\" avbröts av användaren." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:291 +msgid "" +"

{0} EPUB{2} successfully added to library.

{1} " +msgstr "

{0} EPUB{2} lades till bibliotek.

{1} " + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:292 +msgid "" +"not added because books with the same title/author were detected.

Would you like to try and add the EPUB format{0}" +msgstr "" +"inte tillagd eftersom böcker med samma titel/författare upptäcktes.

Vill du försöka lägga till EPUB-formatet{0}" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:293 +msgid "" +" to those existing entries?

NOTE: no pre-existing EPUBs will be " +"overwritten." +msgstr "" +" till dessa befintliga poster?

OBS: inga befintliga EPUB:er " +"kommer att skrivas över." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:295 +msgid "" +"{0} -- not added because of {1} in your library.\n" +"\n" +msgstr "" +"{0} -- inte tillagd på grund av {1} i ditt bibliotek.\n" +"\n" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:297 +msgid "

{0} -- not added because of {1} in your library.

" +msgstr "" +"

{0} -- inte tillagd på grund av {1} i ditt bibliotek.

" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:298 +msgid "" +"Would you like to try and add the EPUB format to an available calibre " +"duplicate?

" +msgstr "" +"Vill du försöka lägga till EPUB-formatet till en tillgänglig calibre-" +"dubblett?

" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:299 +msgid "NOTE: no pre-existing EPUB will be overwritten." +msgstr "OBS: ingen befintlig EPUB kommer att skrivas över." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:346 +msgid "Trying key: " +msgstr "Prövar nyckel: " + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:378 +msgid "Decryption failed, trying next key." +msgstr "Det gick inte att dekryptera, prövar nästa nyckel." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:382 +msgid "Unknown Error decrypting, trying next key.." +msgstr "Okänt fel dekryptering, prövar nästa nyckel.." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:395 +msgid "" +"

All selected Kobo books added as new calibre books or inserted into " +"existing calibre ebooks.

No issues." +msgstr "" +"

Alla valda Kobo-böcker läggs till som nya calibre-böcker eller infogas i " +"befintliga calibre-e-böcker.

Inga problem." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:399 +msgid "

{0} successfully added." +msgstr "

{0} har lagts till." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:403 +msgid "" +"

Not all selected Kobo books made it into calibre.

View report " +"for details." +msgstr "" +"

Inte alla valda Kobo-böcker lades till i calibre.

Visa rapport " +"för detaljer." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:404 +msgid "

Total attempted: {}

\n" +msgstr "

Försök totalt: {}

\n" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:405 +msgid "

Decryption errors: {}

\n" +msgstr "

Dekrypteringsfel: {}

\n" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:411 +msgid "

New Books created: {}

\n" +msgstr "

Nya böcker skapade: {}

\n" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:418 +msgid "

Duplicates that weren't added: {}

\n" +msgstr "

Dubbletter som inte tillsattes: {}

\n" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:426 +msgid "

Book imports cancelled by user: {}

\n" +msgstr "

Bokimport avbröts av användaren: {}

\n" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:428 +msgid "" +"

New EPUB formats inserted in existing calibre books: {0}

\n" +msgstr "" +"

Nya EPUB-format infogade i befintliga calibre-böcker: {0}

\n" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:434 +msgid "" +"

EPUB formats NOT inserted into existing calibre books: {}
\n" +msgstr "" +"

EPUB-format som INTE infogats i befintliga calibre-böcker: {}
\n" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:435 +msgid "" +"(Either because the user chose not to insert them, or because all " +"duplicates already had an EPUB format)" +msgstr "" +"(Antingen för att användaren valde att inte infoga dem, eller för att " +"alla dubbletter redan hade ett EPUB-format)" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:444 +msgid "

Format imports cancelled by user: {}

\n" +msgstr "

Format-import avbröts av användaren: {}

\n" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:458 +msgid "Unknown Book Title" +msgstr "Okänd boktitel" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:460 +msgid "it couldn't be decrypted." +msgstr "den kunde inte dekrypteras." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:462 +msgid "" +"user CHOSE not to insert the new EPUB format, or all existing calibre " +"entries HAD an EPUB format already." +msgstr "" +"användaren VALDE att inte infoga det nya EPUB-formatet, eller alla " +"befintliga calibre-poster hade redan ett EPUB-format." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:464 +msgid "of unknown reasons. Gosh I'm embarrassed!" +msgstr "av okända skäl. Jag skäms!" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\action.py:465 +msgid "

{0} not added because {1}" +msgstr "

{0} inte tillagd eftersom {1}" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\common_utils.py:226 +msgid "Help" +msgstr "Hjälp" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\common_utils.py:235 +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\utilities.py:214 +msgid "Restart required" +msgstr "Omstart krävs" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\common_utils.py:236 +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\utilities.py:215 +msgid "" +"Title image not found - you must restart Calibre before using this plugin!" +msgstr "" +"Titelbild hittades inte - du måste starta calibre innan du använder denna " +"insticksmodul!" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\common_utils.py:322 +msgid "Undefined" +msgstr "Obestämd" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\config.py:30 +msgid "When should Obok try to insert EPUBs into existing calibre entries?" +msgstr "När ska Obok försöka infoga EPUB:er i befintliga calibre-böcker?" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\config.py:33 +msgid "" +"

Default behavior when duplicates are detected. None of the choices will " +"cause calibre ebooks to be overwritten" +msgstr "" +"

Standardbeteende när dubbletter upptäcks. Inget av alternativen kommer " +"att orsaka calibre-e-böcker att skrivas över" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\config.py:35 +msgid "Ask" +msgstr "Fråga" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\config.py:35 +msgid "Always" +msgstr "Alltid" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\config.py:35 +msgid "Never" +msgstr "Aldrig" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\dialogs.py:60 +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\utilities.py:150 +msgid " v" +msgstr " v" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\dialogs.py:65 +msgid "Obok DeDRM" +msgstr "Obok DeDRM" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\dialogs.py:68 +msgid "Help" +msgstr "Hjälp" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\dialogs.py:89 +msgid "Select All" +msgstr "Välj alla" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\dialogs.py:90 +msgid "Select all books to add them to the calibre library." +msgstr "Välj alla böcker för att lägga till dem i calibre-biblioteket." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\dialogs.py:92 +msgid "All with DRM" +msgstr "Alla med DRM" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\dialogs.py:93 +msgid "Select all books with DRM." +msgstr "Välj alla böcker med DRM." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\dialogs.py:95 +msgid "All DRM free" +msgstr "Alla DRM fria" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\dialogs.py:96 +msgid "Select all books without DRM." +msgstr "Välj alla böcker utan DRM." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\dialogs.py:146 +msgid "Title" +msgstr "Titel" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\dialogs.py:146 +msgid "Author" +msgstr "Författare" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\dialogs.py:146 +msgid "Series" +msgstr "Serier" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\dialogs.py:369 +msgid "Copy to clipboard" +msgstr "Kopiera till urklipp" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\dialogs.py:397 +msgid "View Report" +msgstr "Visa rapport" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\__init__.py:21 +msgid "Removes DRM from Kobo kepubs and adds them to the library." +msgstr "Tar bort DRM från Kobo-kepubs och lägger till dem i biblioteket." + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\obok\obok.py:162 +msgid "AES improper key used" +msgstr "AES felaktig nyckel används" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\obok\obok.py:167 +msgid "Failed to initialize AES key" +msgstr "Det gick inte att initiera AES-nyckel" + +#: I:\Herramientas\PoeditPortable\App\Poedit\bin\obok_plugin-3.1.0_trad\obok\obok.py:175 +msgid "AES decryption failed" +msgstr "AES dekryptering misslyckades" diff --git a/obok_src/utilities.py b/Obok_plugin/utilities.py similarity index 100% rename from obok_src/utilities.py rename to Obok_plugin/utilities.py diff --git a/contrib/Other_Tools/B_and_N_Download_Helper/BN-Dload.user.js b/Other_Tools/B_and_N_Download_Helper/BN-Dload.user.js similarity index 100% rename from contrib/Other_Tools/B_and_N_Download_Helper/BN-Dload.user.js rename to Other_Tools/B_and_N_Download_Helper/BN-Dload.user.js diff --git a/contrib/Other_Tools/B_and_N_Download_Helper/BN-Dload.user_ReadMe.txt b/Other_Tools/B_and_N_Download_Helper/BN-Dload.user_ReadMe.txt similarity index 100% rename from contrib/Other_Tools/B_and_N_Download_Helper/BN-Dload.user_ReadMe.txt rename to Other_Tools/B_and_N_Download_Helper/BN-Dload.user_ReadMe.txt diff --git a/contrib/Other_Tools/DRM_Key_Scripts/Adobe_Digital_Editions/adobekey.pyw b/Other_Tools/DRM_Key_Scripts/Adobe_Digital_Editions/adobekey.pyw similarity index 100% rename from contrib/Other_Tools/DRM_Key_Scripts/Adobe_Digital_Editions/adobekey.pyw rename to Other_Tools/DRM_Key_Scripts/Adobe_Digital_Editions/adobekey.pyw diff --git a/contrib/Other_Tools/DRM_Key_Scripts/Barnes_and_Noble_ePubs/ignoblekey.pyw b/Other_Tools/DRM_Key_Scripts/Barnes_and_Noble_ePubs/ignoblekey.pyw similarity index 100% rename from contrib/Other_Tools/DRM_Key_Scripts/Barnes_and_Noble_ePubs/ignoblekey.pyw rename to Other_Tools/DRM_Key_Scripts/Barnes_and_Noble_ePubs/ignoblekey.pyw diff --git a/contrib/Other_Tools/DRM_Key_Scripts/Barnes_and_Noble_ePubs/ignoblekeyfetch.pyw b/Other_Tools/DRM_Key_Scripts/Barnes_and_Noble_ePubs/ignoblekeyfetch.pyw similarity index 100% rename from contrib/Other_Tools/DRM_Key_Scripts/Barnes_and_Noble_ePubs/ignoblekeyfetch.pyw rename to Other_Tools/DRM_Key_Scripts/Barnes_and_Noble_ePubs/ignoblekeyfetch.pyw diff --git a/contrib/Other_Tools/DRM_Key_Scripts/Barnes_and_Noble_ePubs/ignoblekeygen.pyw b/Other_Tools/DRM_Key_Scripts/Barnes_and_Noble_ePubs/ignoblekeygen.pyw similarity index 100% rename from contrib/Other_Tools/DRM_Key_Scripts/Barnes_and_Noble_ePubs/ignoblekeygen.pyw rename to Other_Tools/DRM_Key_Scripts/Barnes_and_Noble_ePubs/ignoblekeygen.pyw diff --git a/contrib/Other_Tools/DRM_Key_Scripts/Kindle_for_Android/androidkindlekey.pyw b/Other_Tools/DRM_Key_Scripts/Kindle_for_Android/androidkindlekey.pyw similarity index 100% rename from contrib/Other_Tools/DRM_Key_Scripts/Kindle_for_Android/androidkindlekey.pyw rename to Other_Tools/DRM_Key_Scripts/Kindle_for_Android/androidkindlekey.pyw diff --git a/contrib/Other_Tools/DRM_Key_Scripts/Kindle_for_Mac_and_PC/kindlekey.pyw b/Other_Tools/DRM_Key_Scripts/Kindle_for_Mac_and_PC/kindlekey.pyw similarity index 100% rename from contrib/Other_Tools/DRM_Key_Scripts/Kindle_for_Mac_and_PC/kindlekey.pyw rename to Other_Tools/DRM_Key_Scripts/Kindle_for_Mac_and_PC/kindlekey.pyw diff --git a/contrib/Other_Tools/DRM_Key_Scripts/Kindle_for_iOS/kindleiospidgen.pyw b/Other_Tools/DRM_Key_Scripts/Kindle_for_iOS/kindleiospidgen.pyw similarity index 100% rename from contrib/Other_Tools/DRM_Key_Scripts/Kindle_for_iOS/kindleiospidgen.pyw rename to Other_Tools/DRM_Key_Scripts/Kindle_for_iOS/kindleiospidgen.pyw diff --git a/contrib/Other_Tools/Kindle_for_Android_Patches/A_Patching_Experience.txt b/Other_Tools/Kindle_for_Android_Patches/A_Patching_Experience.txt similarity index 100% rename from contrib/Other_Tools/Kindle_for_Android_Patches/A_Patching_Experience.txt rename to Other_Tools/Kindle_for_Android_Patches/A_Patching_Experience.txt diff --git a/contrib/Other_Tools/Kindle_for_Android_Patches/kindle_version_3.0.1.70/ReadMe_K4Android.txt b/Other_Tools/Kindle_for_Android_Patches/kindle_version_3.0.1.70/ReadMe_K4Android.txt similarity index 100% rename from contrib/Other_Tools/Kindle_for_Android_Patches/kindle_version_3.0.1.70/ReadMe_K4Android.txt rename to Other_Tools/Kindle_for_Android_Patches/kindle_version_3.0.1.70/ReadMe_K4Android.txt diff --git a/contrib/Other_Tools/Kindle_for_Android_Patches/kindle_version_3.0.1.70/kindle3.0.1.70.patch b/Other_Tools/Kindle_for_Android_Patches/kindle_version_3.0.1.70/kindle3.0.1.70.patch similarity index 100% rename from contrib/Other_Tools/Kindle_for_Android_Patches/kindle_version_3.0.1.70/kindle3.0.1.70.patch rename to Other_Tools/Kindle_for_Android_Patches/kindle_version_3.0.1.70/kindle3.0.1.70.patch diff --git a/contrib/Other_Tools/Kindle_for_Android_Patches/kindle_version_3.7.0.108/ReadMe_K4Android.txt b/Other_Tools/Kindle_for_Android_Patches/kindle_version_3.7.0.108/ReadMe_K4Android.txt similarity index 100% rename from contrib/Other_Tools/Kindle_for_Android_Patches/kindle_version_3.7.0.108/ReadMe_K4Android.txt rename to Other_Tools/Kindle_for_Android_Patches/kindle_version_3.7.0.108/ReadMe_K4Android.txt diff --git a/contrib/Other_Tools/Kindle_for_Android_Patches/kindle_version_3.7.0.108/kindle3.7.0.108.patch b/Other_Tools/Kindle_for_Android_Patches/kindle_version_3.7.0.108/kindle3.7.0.108.patch similarity index 100% rename from contrib/Other_Tools/Kindle_for_Android_Patches/kindle_version_3.7.0.108/kindle3.7.0.108.patch rename to Other_Tools/Kindle_for_Android_Patches/kindle_version_3.7.0.108/kindle3.7.0.108.patch diff --git a/contrib/Other_Tools/Kindle_for_Android_Patches/kindle_version_4.0.2.1/kindle4.0.2.1.patch b/Other_Tools/Kindle_for_Android_Patches/kindle_version_4.0.2.1/kindle4.0.2.1.patch similarity index 100% rename from contrib/Other_Tools/Kindle_for_Android_Patches/kindle_version_4.0.2.1/kindle4.0.2.1.patch rename to Other_Tools/Kindle_for_Android_Patches/kindle_version_4.0.2.1/kindle4.0.2.1.patch diff --git a/contrib/Other_Tools/Kindle_for_Android_Patches/kindle_version_4.8.1.10/Notes on the Patch.txt b/Other_Tools/Kindle_for_Android_Patches/kindle_version_4.8.1.10/Notes on the Patch.txt similarity index 100% rename from contrib/Other_Tools/Kindle_for_Android_Patches/kindle_version_4.8.1.10/Notes on the Patch.txt rename to Other_Tools/Kindle_for_Android_Patches/kindle_version_4.8.1.10/Notes on the Patch.txt diff --git a/contrib/Other_Tools/Kindle_for_Android_Patches/kindle_version_4.8.1.10/kindle4.8.1.10.patch b/Other_Tools/Kindle_for_Android_Patches/kindle_version_4.8.1.10/kindle4.8.1.10.patch similarity index 100% rename from contrib/Other_Tools/Kindle_for_Android_Patches/kindle_version_4.8.1.10/kindle4.8.1.10.patch rename to Other_Tools/Kindle_for_Android_Patches/kindle_version_4.8.1.10/kindle4.8.1.10.patch diff --git a/contrib/Other_Tools/Kobo/obok.py b/Other_Tools/Kobo/obok.py similarity index 100% rename from contrib/Other_Tools/Kobo/obok.py rename to Other_Tools/Kobo/obok.py diff --git a/contrib/Other_Tools/Rocket_ebooks/rebhack.zip b/Other_Tools/Rocket_ebooks/rebhack.zip similarity index 100% rename from contrib/Other_Tools/Rocket_ebooks/rebhack.zip rename to Other_Tools/Rocket_ebooks/rebhack.zip diff --git a/contrib/Other_Tools/Rocket_ebooks/rebhack_ReadMe.txt b/Other_Tools/Rocket_ebooks/rebhack_ReadMe.txt similarity index 100% rename from contrib/Other_Tools/Rocket_ebooks/rebhack_ReadMe.txt rename to Other_Tools/Rocket_ebooks/rebhack_ReadMe.txt diff --git a/contrib/Other_Tools/Scuolabook_DRM/Scuolabook_ReadMe.txt b/Other_Tools/Scuolabook_DRM/Scuolabook_ReadMe.txt similarity index 100% rename from contrib/Other_Tools/Scuolabook_DRM/Scuolabook_ReadMe.txt rename to Other_Tools/Scuolabook_DRM/Scuolabook_ReadMe.txt diff --git a/contrib/Other_Tools/Tetrachroma_FileOpen_ineptpdf/ineptpdf_8.4.51.pyw b/Other_Tools/Tetrachroma_FileOpen_ineptpdf/ineptpdf_8.4.51.pyw similarity index 100% rename from contrib/Other_Tools/Tetrachroma_FileOpen_ineptpdf/ineptpdf_8.4.51.pyw rename to Other_Tools/Tetrachroma_FileOpen_ineptpdf/ineptpdf_8.4.51.pyw diff --git a/contrib/Other_Tools/Tetrachroma_FileOpen_ineptpdf/ineptpdf_8.4.51_ReadMe.txt b/Other_Tools/Tetrachroma_FileOpen_ineptpdf/ineptpdf_8.4.51_ReadMe.txt similarity index 100% rename from contrib/Other_Tools/Tetrachroma_FileOpen_ineptpdf/ineptpdf_8.4.51_ReadMe.txt rename to Other_Tools/Tetrachroma_FileOpen_ineptpdf/ineptpdf_8.4.51_ReadMe.txt diff --git a/ReadMe_Overview.txt b/ReadMe_Overview.txt new file mode 100644 index 0000000..6610227 --- /dev/null +++ b/ReadMe_Overview.txt @@ -0,0 +1,67 @@ +Welcome to the tools! +===================== + +This file is to give users a quick overview of what is available and how to get started. This document is part of the DeDRM Tools archive from Apprentice Harper's github repository: https://github.com/apprenticeharper/DeDRM_tools/ + +This archive includes calibre plugins to remove DRM from: + + - Kindle ebooks (files from Kindle for Mac/PC and eInk Kindles). + - Adobe Digital Editions (v2.0.1***) ePubs (including Kobo and Google ePubs downloaded to ADE) + - Adobe Digital Editions (v2.0.1) PDFs + - Kobo kePubs from the Kobo Desktop application and attached Kobo readers. + +These tools do NOT work with Apple's iBooks FairPlay DRM. Use iBook Copy from TunesKit. +These tools no longer work well with books from Barnes & Noble. + +For limitations and work-arounds, see the FAQ at https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md + +About the tools +--------------- +These tools are updated and maintained by Apprentice Harper and many others. You can find the latest updates at Apprentice Harper's github repository https://github.com/apprenticeharper/DeDRM_tools/ and get support by creating an issue at the repository (github account required) or by posting a comment at Apprentice Alf's blog: http://www.apprenticealf.wordpress.com/ + +If you re-post these tools, a link to the repository and/or the blog would be appreciated. + +The tools are provided in the form of plugins for calibre. Calibre is an open source freeware ebook library manager. It is the best tool around for keeping track of your ebooks. + + +DeDRM plugin for calibre (Mac OS X, Windows) +------------------------------------------------------- +The DeDRM plugin for calibre removes DRM from your Kindle and Adobe DRM ebooks when they are imported to calibre. Just install the DeDRM plugin (DeDRM_plugin.zip), following the instructions and configuration directions provided in the ReadMe file and the help links in the plugin's configuration dialogs. + +Once installed and configured, you can simply add a DRM book to calibre and a DRM-free version will be imported into the calibre database. Note that DRM removal only occurs on IMPORT not on CONVERSION or at any other time. If you have already imported DRMed books you'll need to remove the books from calibre and re-import them. + + +Obok plugin for calibre (Mac OS X and Windows) +---------------------------------------------- +To import ebooks from the Kobo Desktop app or from a Kobo ebook reader, install the Obok plugin. This works in a different way to the DeDRM plugin, in that it finds your ebooks downloaded using the Kobo Desktop app, or on an attached Kobo ebooks reader, and displays them in a list, so that you can choose the ones you want to import into calibre. + +For instructions, see the obok_plugin_ReadMe.txt file. + + +DeDRM application for Mac OS X users: (Mac OS X 10.6 and above) +--------------------------------------------------------------- +DeDRM application for Windows users: (Windows XP through Windows 10) +------------------------------------------------------------------ +As of Version 6.7 of the tools, these are no longer provided or supported. + + +Linux support +------------- +It may be possible to use the plugins on a Linux system, but no support is given at this time. + + +Credits +------- +The original inept and ignoble scripts were by i♥cabbages +The original mobidedrm and erdr2pml scripts were by The Dark Reverser +The original topaz DRM removal script was by CMBDTC +The original topaz format conversion scripts were by some_updates, clarknova and Bart Simpson +The original KFX format decryption was by lulzkabulz, converted to python by Apprentice Naomi and integrated into the tools by tomthumb1997 +The alfcrypto library is by some_updates +The DeDRM plugin was based on plugins by DiapDealer and is maintained by Apprentice Alf and Apprentice Harper + +The original obok script was by Physisticated +The plugin conversion was done anonymously. +The Kobo reader support was added by norbusan + +Fixes, updates and enhancements to the scripts and applicatons have been made by many other anonymous people. diff --git a/contrib/DeDRM_Macintosh_Application/DeDRM ReadMe.rtf b/contrib/DeDRM_Macintosh_Application/DeDRM ReadMe.rtf deleted file mode 100644 index 42ff222..0000000 --- a/contrib/DeDRM_Macintosh_Application/DeDRM ReadMe.rtf +++ /dev/null @@ -1,102 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1561\cocoasubrtf600 -{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset134 STHeitiSC-Light;} -{\colortbl;\red255\green255\blue255;} -{\*\expandedcolortbl;;} -\paperw11900\paperh16840\vieww12000\viewh15840\viewkind0 -\deftab720 -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardeftab720\qc\partightenfactor0 - -\f0\b\fs24 \cf0 DeDRM ReadMe -\b0 \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardeftab720\qj\partightenfactor0 - -\b \cf0 \ -\ -DeDRM is now a 64-bit application for Mac OS X 10.6 and later. -\b0 \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardeftab720\partightenfactor0 -\cf0 \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardeftab720\partightenfactor0 - -\b \cf0 First Use for Mac OS X 10.9 and later\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardeftab720\partightenfactor0 - -\b0 \cf0 The application is not signed, so the first time you run it you will need to change your security options, or hold down the option key when double-clicking on the icon, or control-click or right-button to get the contextual menu to open it. For later versions, after trying to run it once, you may need to go to the security options of the control panel and give explicit permission for this application to be run.\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardeftab720\partightenfactor0 - -\b \cf0 \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardeftab720\qj\partightenfactor0 - -\b0 \cf0 DeDRM is an application that packs all of the python dm removal software into one easy to use program that remembers preferences and settings.\ -It works without manual configuration with Kindle for Mac ebooks, Adobe Digital Editions Adept ePub and PDF ebooks, and Barnes & Noble NOOK Study ebooks.\ -\ -To remove the DRM of Kindle ebooks from eInk Kindles, other Barnes & Noble ePubs, eReader pdb ebooks, or Mobipocket ebooks, you must first run DeDRM application (by double-clicking it) and set some additional Preferences, depending on the origin of your ebook files:\ -\ - -\b eInk Kindle (not Kindle Fire) -\b0 : -\b \ - -\b0 16 digit Serial Number, found in your Amazon account web pages.\ - -\b Barnes & Noble (not from NOOK Study) -\b0 : \ - Your account email and password, so the key can be retrieved from the Barnes & Noble servers.\ - An active internet connection is required for this.\ - -\b eReader -\b0 :\ - Name and last 8 digits of CC number\ - -\b Mobipocket -\b0 :\ - 10 digit PID\ -\ -A final preference is the destination folder for the DRM-free copies of your ebooks that the application produces. This can be either the same folder as the original ebook, or a folder of your choice.\ -\ -Once these preferences have been set, you can drag and drop ebooks (or folders of ebooks) onto the DeDRM droplet to remove the DRM.\ -\ -This program uses notifications, so really needs Mac OS X 10.8 or above.\ -\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardeftab720\partightenfactor0 - -\b \cf0 Installation -\b0 \ -Drag the DeDRM application from from the DeDRM_Application_Macintosh folder (the location of this ReadMe) to your Applications folder, or anywhere else you find convenient.\ -\ -\ - -\b \ -Use -\b0 \ -1. To set the preferences, double-click the application and follow the instructions in the dialogs.\ -2. Drag & Drop DRMed ebooks or folders of DRMed ebooks onto the application icon when it is not running.\ -\ -\ - -\b Troubleshooting\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardeftab720\partightenfactor0 - -\b0 \cf0 A log is created on your desktop (DeDRM.log) containing detailed information from all the scripts. If you have any problems decrypting your ebooks, copy the contents of this log in a comment at Apprentice Alf's blog.\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardeftab720\partightenfactor0 -{\field{\*\fldinst{HYPERLINK "http://apprenticealf.wordpress.com/"}}{\fldrslt \cf0 http://apprenticealf.wordpress.com/}}\ -\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardeftab720\partightenfactor0 - -\b \cf0 Credits\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardeftab720\partightenfactor0 - -\b0 \cf0 The original inept and ignoble scripts were by i -\f1 \uc0\u9829 -\f0 cabbages\ -The original mobidedrm and erdr2pml scripts were by The Dark Reverser\ -The original topaz DRM removal script was by CMBDTC\ -The original topaz format conversion scripts were by some_updates, clarknova and Bart Simpson\ -\ -The alfcrypto library is by some_updates\ -The ePub encryption detection script is by Apprentice Alf, adapted from a script by Paul Durrant\ -The ignoblekey script is by Apprentice Harper\ -The DeDRM AppleScript is by Apprentice Alf and Apprentice Harper, adapted from a script by Paul Durrant\ -\ -Many fixes, updates and enhancements to the scripts and applications have been made by many other people. For more details, see the comments in the individual scripts.\ -} \ No newline at end of file diff --git a/contrib/DeDRM_Macintosh_Application/DeDRM.app.txt b/contrib/DeDRM_Macintosh_Application/DeDRM.app.txt deleted file mode 100644 index 89b7b2f..0000000 Binary files a/contrib/DeDRM_Macintosh_Application/DeDRM.app.txt and /dev/null differ diff --git a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Info.plist b/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Info.plist deleted file mode 100644 index c21a09d..0000000 --- a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Info.plist +++ /dev/null @@ -1,91 +0,0 @@ - - - - - CFBundleAllowMixedLocalizations - - CFBundleDevelopmentRegion - English - CFBundleDocumentTypes - - - CFBundleTypeExtensions - - * - - CFBundleTypeOSTypes - - **** - - CFBundleTypeRole - Viewer - - - CFBundleExecutable - droplet - CFBundleIconFile - DeDRM - CFBundleIdentifier - com.apple.ScriptEditor.id.DeDRM - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - DeDRM - CFBundlePackageType - APPL - CFBundleShortVersionString - 6.6.3 - CFBundleSignature - dplt - LSMinimumSystemVersionByArchitecture - - x86_64 - 10.6 - - LSRequiresCarbon - - NSAppleEventsUsageDescription - This script needs to control other applications to run. - NSAppleMusicUsageDescription - This script needs access to your music to run. - NSCalendarsUsageDescription - This script needs access to your calendars to run. - NSCameraUsageDescription - This script needs access to your camera to run. - NSContactsUsageDescription - This script needs access to your contacts to run. - NSHomeKitUsageDescription - This script needs access to your HomeKit Home to run. - NSHumanReadableCopyright - Copyright © 2010–2019 Apprentice Alf - NSMicrophoneUsageDescription - This script needs access to your microphone to run. - NSPhotoLibraryUsageDescription - This script needs access to your photos to run. - NSRemindersUsageDescription - This script needs access to your reminders to run. - NSSiriUsageDescription - This script needs access to Siri to run. - NSSystemAdministrationUsageDescription - This script needs access to administer this system to run. - WindowState - - bundleDividerCollapsed - - bundlePositionOfDivider - 1162 - dividerCollapsed - - eventLogLevel - 0 - name - ScriptWindowState - positionOfDivider - 651 - savedFrame - 0 37 1680 990 0 0 1680 1027 - selectedTab - log - - - diff --git a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/MacOS/droplet b/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/MacOS/droplet deleted file mode 100755 index 7005617..0000000 Binary files a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/MacOS/droplet and /dev/null differ diff --git a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/PkgInfo b/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/PkgInfo deleted file mode 100644 index b999e99..0000000 --- a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/PkgInfo +++ /dev/null @@ -1 +0,0 @@ -APPLdplt \ No newline at end of file diff --git a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress Source.zip b/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress Source.zip deleted file mode 100644 index d0daa2a..0000000 Binary files a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress Source.zip and /dev/null differ diff --git a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress.app/Contents/Info.plist b/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress.app/Contents/Info.plist deleted file mode 100644 index 6ca1088..0000000 --- a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress.app/Contents/Info.plist +++ /dev/null @@ -1,50 +0,0 @@ - - - - - BuildMachineOSBuild - 10K549 - CFBundleDevelopmentRegion - English - CFBundleExecutable - DeDRM Progress - CFBundleGetInfoString - DeDRM Progress 1.1, Written 2010, 2012 by Apprentice Alf and others. - CFBundleIconFile - DeDRM Progress - CFBundleIdentifier - com.apprenticealf.DeDRMProgress - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - DeDRM Progress - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.1 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - DTCompiler - 4.0 - DTPlatformBuild - 10M2518 - DTPlatformVersion - PG - DTSDKBuild - 8S2167 - DTSDKName - macosx10.4 - DTXcode - 0400 - DTXcodeBuild - 10M2518 - NSAppleScriptEnabled - YES - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress.app/Contents/MacOS/DeDRM Progress b/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress.app/Contents/MacOS/DeDRM Progress deleted file mode 100644 index ca47eb4..0000000 Binary files a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress.app/Contents/MacOS/DeDRM Progress and /dev/null differ diff --git a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress.app/Contents/PkgInfo b/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress.app/Contents/PkgInfo deleted file mode 100644 index bd04210..0000000 --- a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress.app/Contents/PkgInfo +++ /dev/null @@ -1 +0,0 @@ -APPL???? \ No newline at end of file diff --git a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress.app/Contents/Resources/DeDRM Progress.icns b/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress.app/Contents/Resources/DeDRM Progress.icns deleted file mode 100644 index 69855fc..0000000 Binary files a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress.app/Contents/Resources/DeDRM Progress.icns and /dev/null differ diff --git a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress.app/Contents/Resources/English.lproj/InfoPlist.strings b/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress.app/Contents/Resources/English.lproj/InfoPlist.strings deleted file mode 100644 index efaa0d7..0000000 Binary files a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress.app/Contents/Resources/English.lproj/InfoPlist.strings and /dev/null differ diff --git a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress.app/Contents/Resources/English.lproj/MainMenu.nib b/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress.app/Contents/Resources/English.lproj/MainMenu.nib deleted file mode 100644 index 83ceb9e..0000000 Binary files a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress.app/Contents/Resources/English.lproj/MainMenu.nib and /dev/null differ diff --git a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress.app/Contents/Resources/Scripts/Window.scpt b/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress.app/Contents/Resources/Scripts/Window.scpt deleted file mode 100644 index 5274a48..0000000 Binary files a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM Progress.app/Contents/Resources/Scripts/Window.scpt and /dev/null differ diff --git a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM.icns b/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM.icns deleted file mode 100644 index 8a6dfe3..0000000 Binary files a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/DeDRM.icns and /dev/null differ diff --git a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/Scripts/main.scpt b/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/Scripts/main.scpt deleted file mode 100644 index 6bde878..0000000 Binary files a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/Scripts/main.scpt and /dev/null differ diff --git a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/description.rtfd/TXT.rtf b/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/description.rtfd/TXT.rtf deleted file mode 100644 index b882bf1..0000000 --- a/contrib/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/description.rtfd/TXT.rtf +++ /dev/null @@ -1,5 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1671 -{\fonttbl} -{\colortbl;\red255\green255\blue255;} -{\*\expandedcolortbl;;} -} \ No newline at end of file diff --git a/contrib/DeDRM_Windows_Application/DeDRM_App/DeDRM_Drop_Target.bat b/contrib/DeDRM_Windows_Application/DeDRM_App/DeDRM_Drop_Target.bat deleted file mode 100644 index 0a3dea8..0000000 --- a/contrib/DeDRM_Windows_Application/DeDRM_App/DeDRM_Drop_Target.bat +++ /dev/null @@ -1 +0,0 @@ -chcp 65001 > nul && set PWD="%~dp0" && cd /d "%~dp0DeDRM_lib" && start /min python DeDRM_App.pyw %* diff --git a/contrib/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/DeDRM_App.pyw b/contrib/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/DeDRM_App.pyw deleted file mode 100644 index 82e2c79..0000000 --- a/contrib/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/DeDRM_App.pyw +++ /dev/null @@ -1,704 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -# DeDRM.pyw -# Copyright 2010-2019 some_updates, Apprentice Alf and Apprentice Harper - -# Revision history: -# 6.0.0 - Release along with unified plugin -# 6.0.1 - Bug Fixes for Windows App -# 6.0.2 - Fixed problem with spaces in paths and the bat file -# 6.0.3 - Fix for Windows non-ascii user names -# 6.0.4 - Fix for other potential unicode problems -# 6.0.5 - Fix typo -# 6.2.0 - Update to match plugin and AppleScript -# 6.2.1 - Fix for non-ascii user names -# 6.2.2 - Added URL method for B&N/nook books -# 6.3.0 - Add in Android support -# 6.3.1 - Version bump for clarity -# 6.3.2 - Version bump to match plugin -# 6.3.3 - Version bump to match plugin -# 6.3.4 - Version bump to match plugin -# 6.3.5 - Version bump to match plugin -# 6.3.6 - Version bump to match plugin -# 6.4.0 - Fix for Kindle for PC encryption change -# 6.4.1 - Fix for new tags in Topaz ebooks -# 6.4.2 - Fix for new tags in Topaz ebooks, and very small Topaz ebooks -# 6.4.3 - Version bump to match plugin & Mac app -# 6.5.0 - Fix for some new tags in Topaz ebooks -# 6.5.1 - Version bump to match plugin & Mac app -# 6.5.2 - Fix for a new tag in Topaz ebooks -# 6.5.3 - Explicitly warn about KFX files -# 6.5.4 - PDF float fix. -# 6.5.5 - Kindle for PC/Accented characters in username fix. -# 6.6.0 - Initial KFX support from TomThumb -# 6.6.1 - Standalong app fix from wzyboy -# 6.6.2 - Version bump for 64-bit Mac OS X app and various fixes. -# 6.6.3 - Version bump for Kindle book name fixes and start of support for .kinf2018 - -__version__ = '6.6.3' - -import sys -import os, os.path -sys.path.append(os.path.join(sys.path[0],"lib")) -import sys, os -import codecs - -from argv_utils import add_cp65001_codec, set_utf8_default_encoding, unicode_argv -add_cp65001_codec() -set_utf8_default_encoding() - - -import shutil -import Tkinter -from Tkinter import * -import Tkconstants -import tkFileDialog -from scrolltextwidget import ScrolledText -from activitybar import ActivityBar -if sys.platform.startswith("win"): - from askfolder_ed import AskFolder -import re -import simpleprefs -import traceback - -from Queue import Full -from Queue import Empty -from multiprocessing import Process, Queue - -from scriptinterface import decryptepub, decryptpdb, decryptpdf, decryptk4mobi - - -# Wrap a stream so that output gets flushed immediately -# and appended to shared queue -class QueuedUTF8Stream: - def __init__(self, stream, q): - self.stream = stream - self.encoding = 'utf-8' - self.q = q - def write(self, data): - if isinstance(data,unicode): - data = data.encode('utf-8',"replace") - self.q.put(data) - def __getattr__(self, attr): - return getattr(self.stream, attr) - -class DrmException(Exception): - pass - -class MainApp(Tk): - def __init__(self, apphome, dnd=False, filenames=[]): - Tk.__init__(self) - self.withdraw() - self.dnd = dnd - self.apphome = apphome - - # preference settings - # [dictionary key, file in preferences directory where info is stored] - description = [ ['pids' , 'pidlist.txt' ], - ['serials', 'seriallist.txt'], - ['sdrms' , 'sdrmlist.txt' ], - ['outdir' , 'outdir.txt' ]] - self.po = simpleprefs.SimplePrefs("DeDRM",description) - if self.dnd: - self.cd = ConvDialog(self) - prefs = self.getPreferences() - self.cd.doit(prefs, filenames) - else: - prefs = self.getPreferences() - self.pd = PrefsDialog(self, prefs) - self.cd = ConvDialog(self) - self.pd.show() - - def getPreferences(self): - prefs = self.po.getPreferences() - prefdir = prefs['dir'] - adeptkeyfile = os.path.join(prefdir,'adeptkey.der') - if not os.path.exists(adeptkeyfile): - import adobekey - try: - adobekey.getkey(adeptkeyfile) - except: - pass - kindlekeyfile = os.path.join(prefdir,'kindlekey.k4i') - if not os.path.exists(kindlekeyfile): - import kindlekey - try: - kindlekey.getkey(kindlekeyfile) - except: - traceback.print_exc() - pass - bnepubkeyfile = os.path.join(prefdir,'bnepubkey.b64') - if not os.path.exists(bnepubkeyfile): - import ignoblekey - try: - ignoblekey.getkey(bnepubkeyfile) - except: - traceback.print_exc() - pass - return prefs - - def setPreferences(self, newprefs): - prefdir = self.po.prefdir - if 'adkfile' in newprefs: - dfile = newprefs['adkfile'] - fname = os.path.basename(dfile) - nfile = os.path.join(prefdir,fname) - if os.path.isfile(dfile): - shutil.copyfile(dfile,nfile) - if 'bnkfile' in newprefs: - dfile = newprefs['bnkfile'] - fname = os.path.basename(dfile) - nfile = os.path.join(prefdir,fname) - if os.path.isfile(dfile): - shutil.copyfile(dfile,nfile) - if 'kindlefile' in newprefs: - dfile = newprefs['kindlefile'] - fname = os.path.basename(dfile) - nfile = os.path.join(prefdir,fname) - if os.path.isfile(dfile): - shutil.copyfile(dfile,nfile) - if 'androidfile' in newprefs: - dfile = newprefs['androidfile'] - fname = os.path.basename(dfile) - nfile = os.path.join(prefdir,fname) - if os.path.isfile(dfile): - shutil.copyfile(dfile,nfile) - self.po.setPreferences(newprefs) - return - - def alldone(self): - if not self.dnd: - self.pd.enablebuttons() - else: - self.destroy() - -class PrefsDialog(Toplevel): - def __init__(self, mainapp, prefs_array): - Toplevel.__init__(self, mainapp) - self.withdraw() - self.protocol("WM_DELETE_WINDOW", self.withdraw) - self.title("DeDRM " + __version__) - self.prefs_array = prefs_array - self.status = Tkinter.Label(self, text='Setting Preferences') - self.status.pack(fill=Tkconstants.X, expand=1) - body = Tkinter.Frame(self) - self.body = body - body.pack(fill=Tkconstants.X, expand=1) - sticky = Tkconstants.E + Tkconstants.W - body.grid_columnconfigure(1, weight=2) - - cur_row = 0 - Tkinter.Label(body, text='Adobe Key file (adeptkey.der)').grid(row=cur_row, sticky=Tkconstants.E) - self.adkpath = Tkinter.Entry(body, width=50) - self.adkpath.grid(row=cur_row, column=1, sticky=sticky) - prefdir = self.prefs_array['dir'] - keyfile = os.path.join(prefdir,'adeptkey.der') - if os.path.isfile(keyfile): - path = keyfile - self.adkpath.insert(cur_row, path) - button = Tkinter.Button(body, text="...", command=self.get_adkpath) - button.grid(row=cur_row, column=2) - - cur_row = cur_row + 1 - Tkinter.Label(body, text='Kindle Key file (kindlekey.k4i)').grid(row=cur_row, sticky=Tkconstants.E) - self.kkpath = Tkinter.Entry(body, width=50) - self.kkpath.grid(row=cur_row, column=1, sticky=sticky) - prefdir = self.prefs_array['dir'] - keyfile = os.path.join(prefdir,'kindlekey.k4i') - if os.path.isfile(keyfile): - path = keyfile - self.kkpath.insert(0, path) - button = Tkinter.Button(body, text="...", command=self.get_kkpath) - button.grid(row=cur_row, column=2) - - cur_row = cur_row + 1 - Tkinter.Label(body, text='Android Kindle backup file (backup.ab)').grid(row=cur_row, sticky=Tkconstants.E) - self.akkpath = Tkinter.Entry(body, width=50) - self.akkpath.grid(row=cur_row, column=1, sticky=sticky) - prefdir = self.prefs_array['dir'] - keyfile = os.path.join(prefdir,'backup.ab') - if os.path.isfile(keyfile): - path = keyfile - self.akkpath.insert(0, path) - button = Tkinter.Button(body, text="...", command=self.get_akkpath) - button.grid(row=cur_row, column=2) - - cur_row = cur_row + 1 - Tkinter.Label(body, text='Barnes and Noble Key file (bnepubkey.b64)').grid(row=cur_row, sticky=Tkconstants.E) - self.bnkpath = Tkinter.Entry(body, width=50) - self.bnkpath.grid(row=cur_row, column=1, sticky=sticky) - prefdir = self.prefs_array['dir'] - keyfile = os.path.join(prefdir,'bnepubkey.b64') - if os.path.isfile(keyfile): - path = keyfile - self.bnkpath.insert(0, path) - button = Tkinter.Button(body, text="...", command=self.get_bnkpath) - button.grid(row=cur_row, column=2) - - cur_row = cur_row + 1 - Tkinter.Label(body, text='Mobipocket PID list\n(8 or 10 characters, comma separated)').grid(row=cur_row, sticky=Tkconstants.E) - self.pidnums = Tkinter.StringVar() - self.pidinfo = Tkinter.Entry(body, width=50, textvariable=self.pidnums) - if 'pids' in self.prefs_array: - self.pidnums.set(self.prefs_array['pids']) - self.pidinfo.grid(row=cur_row, column=1, sticky=sticky) - - cur_row = cur_row + 1 - Tkinter.Label(body, text='eInk Kindle Serial Number list\n(16 characters, comma separated)').grid(row=cur_row, sticky=Tkconstants.E) - self.sernums = Tkinter.StringVar() - self.serinfo = Tkinter.Entry(body, width=50, textvariable=self.sernums) - if 'serials' in self.prefs_array: - self.sernums.set(self.prefs_array['serials']) - self.serinfo.grid(row=cur_row, column=1, sticky=sticky) - - cur_row = cur_row + 1 - Tkinter.Label(body, text='eReader data list\n(name:last 8 digits on credit card, comma separated)').grid(row=cur_row, sticky=Tkconstants.E) - self.sdrmnums = Tkinter.StringVar() - self.sdrminfo = Tkinter.Entry(body, width=50, textvariable=self.sdrmnums) - if 'sdrms' in self.prefs_array: - self.sdrmnums.set(self.prefs_array['sdrms']) - self.sdrminfo.grid(row=cur_row, column=1, sticky=sticky) - - cur_row = cur_row + 1 - Tkinter.Label(body, text="Output Folder (if blank, use input ebook's folder)").grid(row=cur_row, sticky=Tkconstants.E) - self.outpath = Tkinter.Entry(body, width=50) - self.outpath.grid(row=cur_row, column=1, sticky=sticky) - if 'outdir' in self.prefs_array: - dpath = self.prefs_array['outdir'] - self.outpath.insert(0, dpath) - button = Tkinter.Button(body, text="...", command=self.get_outpath) - button.grid(row=cur_row, column=2) - - cur_row = cur_row + 1 - Tkinter.Label(body, text='').grid(row=cur_row, column=0, columnspan=2, sticky=Tkconstants.N) - - cur_row = cur_row + 1 - Tkinter.Label(body, text='Alternatively Process an eBook').grid(row=cur_row, column=0, columnspan=2, sticky=Tkconstants.N) - - cur_row = cur_row + 1 - Tkinter.Label(body, text='Select an eBook to Process*').grid(row=cur_row, sticky=Tkconstants.E) - self.bookpath = Tkinter.Entry(body, width=50) - self.bookpath.grid(row=cur_row, column=1, sticky=sticky) - button = Tkinter.Button(body, text="...", command=self.get_bookpath) - button.grid(row=cur_row, column=2) - - cur_row = cur_row + 1 - Tkinter.Label(body, font=("Helvetica", "10", "italic"), text='*To DeDRM multiple ebooks simultaneously, set your preferences and quit.\nThen drag and drop ebooks or folders onto the DeDRM_Drop_Target').grid(row=cur_row, column=1, sticky=Tkconstants.E) - - cur_row = cur_row + 1 - Tkinter.Label(body, text='').grid(row=cur_row, column=0, columnspan=2, sticky=Tkconstants.E) - - buttons = Tkinter.Frame(self) - buttons.pack() - self.sbotton = Tkinter.Button(buttons, text="Set Prefs", width=14, command=self.setprefs) - self.sbotton.pack(side=Tkconstants.LEFT) - - buttons.pack() - self.pbotton = Tkinter.Button(buttons, text="Process eBook", width=14, command=self.doit) - self.pbotton.pack(side=Tkconstants.LEFT) - buttons.pack() - self.qbotton = Tkinter.Button(buttons, text="Quit", width=14, command=self.quitting) - self.qbotton.pack(side=Tkconstants.RIGHT) - buttons.pack() - - def disablebuttons(self): - self.sbotton.configure(state='disabled') - self.pbotton.configure(state='disabled') - self.qbotton.configure(state='disabled') - - def enablebuttons(self): - self.sbotton.configure(state='normal') - self.pbotton.configure(state='normal') - self.qbotton.configure(state='normal') - - def show(self): - self.deiconify() - self.tkraise() - - def hide(self): - self.withdraw() - - def get_outpath(self): - cpath = self.outpath.get() - if sys.platform.startswith("win"): - # tk_chooseDirectory is horribly broken for unicode paths - # on windows - bug has been reported but not fixed for years - # workaround by using our own unicode aware version - outpath = AskFolder(message="Choose the folder for DRM-free ebooks", - defaultLocation=cpath) - else: - outpath = tkFileDialog.askdirectory( - parent=None, title='Choose the folder for DRM-free ebooks', - initialdir=cpath, initialfile=None) - if outpath: - outpath = os.path.normpath(outpath) - self.outpath.delete(0, Tkconstants.END) - self.outpath.insert(0, outpath) - return - - def get_adkpath(self): - cpath = self.adkpath.get() - adkpath = tkFileDialog.askopenfilename(initialdir = cpath, parent=None, title='Select Adept Key file', - defaultextension='.der', filetypes=[('Adept Key file', '.der'), ('All Files', '.*')]) - if adkpath: - adkpath = os.path.normpath(adkpath) - self.adkpath.delete(0, Tkconstants.END) - self.adkpath.insert(0, adkpath) - return - - def get_kkpath(self): - cpath = self.kkpath.get() - kkpath = tkFileDialog.askopenfilename(initialdir = cpath, parent=None, title='Select Kindle Key file', - defaultextension='.k4i', filetypes=[('Kindle Key file', '.k4i'), ('All Files', '.*')]) - if kkpath: - kkpath = os.path.normpath(kkpath) - self.kkpath.delete(0, Tkconstants.END) - self.kkpath.insert(0, kkpath) - return - - def get_akkpath(self): - cpath = self.akkpath.get() - akkpath = tkFileDialog.askopenfilename(initialdir = cpath, parent=None, title='Select Android for Kindle backup file', - defaultextension='.ab', filetypes=[('Kindle for Android backup file', '.ab'), ('All Files', '.*')]) - if akkpath: - akkpath = os.path.normpath(akkpath) - self.akkpath.delete(0, Tkconstants.END) - self.akkpath.insert(0, akkpath) - return - - def get_bnkpath(self): - cpath = self.bnkpath.get() - bnkpath = tkFileDialog.askopenfilename(initialdir = cpath, parent=None, title='Select Barnes and Noble Key file', - defaultextension='.b64', filetypes=[('Barnes and Noble Key file', '.b64'), ('All Files', '.*')]) - if bnkpath: - bnkpath = os.path.normpath(bnkpath) - self.bnkpath.delete(0, Tkconstants.END) - self.bnkpath.insert(0, bnkpath) - return - - def get_bookpath(self): - cpath = self.bookpath.get() - bookpath = tkFileDialog.askopenfilename(parent=None, title='Select eBook for DRM Removal', - filetypes=[('All Files', '.*'), - ('ePub Files','.epub'), - ('Kindle','.azw'), - ('Kindle','.azw1'), - ('Kindle','.azw3'), - ('Kindle','.azw4'), - ('Kindle','.tpz'), - ('Kindle','.azw8'), - ('Kindle','.kfx'), - ('Kindle','.kfx-zip'), - ('Kindle','.mobi'), - ('Kindle','.prc'), - ('eReader','.pdb'), - ('PDF','.pdf')], - initialdir=cpath) - if bookpath: - bookpath = os.path.normpath(bookpath) - self.bookpath.delete(0, Tkconstants.END) - self.bookpath.insert(0, bookpath) - return - - def quitting(self): - self.master.destroy() - - def setprefs(self): - # setting new prefereces - new_prefs = {} - prefdir = self.prefs_array['dir'] - new_prefs['dir'] = prefdir - new_prefs['pids'] = self.pidinfo.get().replace(" ","") - new_prefs['serials'] = self.serinfo.get().replace(" ","") - new_prefs['sdrms'] = self.sdrminfo.get().strip().replace(", ",",") - new_prefs['outdir'] = self.outpath.get().strip() - adkpath = self.adkpath.get() - if os.path.dirname(adkpath) != prefdir: - new_prefs['adkfile'] = adkpath - bnkpath = self.bnkpath.get() - if os.path.dirname(bnkpath) != prefdir: - new_prefs['bnkfile'] = bnkpath - kkpath = self.kkpath.get() - if os.path.dirname(kkpath) != prefdir: - new_prefs['kindlefile'] = kkpath - akkpath = self.akkpath.get() - if os.path.dirname(akkpath) != prefdir: - new_prefs['androidfile'] = akkpath - self.master.setPreferences(new_prefs) - # and update internal copies - self.prefs_array['pids'] = new_prefs['pids'] - self.prefs_array['serials'] = new_prefs['serials'] - self.prefs_array['sdrms'] = new_prefs['sdrms'] - self.prefs_array['outdir'] = new_prefs['outdir'] - - def doit(self): - self.disablebuttons() - filenames=[] - bookpath = self.bookpath.get() - bookpath = os.path.abspath(bookpath) - filenames.append(bookpath) - self.master.cd.doit(self.prefs_array,filenames) - - - -class ConvDialog(Toplevel): - def __init__(self, master, prefs_array={}, filenames=[]): - Toplevel.__init__(self, master) - self.withdraw() - self.protocol("WM_DELETE_WINDOW", self.withdraw) - self.title("DeDRM Processing") - self.master = master - self.apphome = self.master.apphome - self.prefs_array = prefs_array - self.filenames = filenames - self.interval = 50 - self.p2 = None - self.q = Queue() - self.running = 'inactive' - self.numgood = 0 - self.numbad = 0 - self.status = Tkinter.Label(self, text='DeDRM processing...') - self.status.pack(fill=Tkconstants.X, expand=1) - body = Tkinter.Frame(self) - body.pack(fill=Tkconstants.X, expand=1) - sticky = Tkconstants.E + Tkconstants.W - body.grid_columnconfigure(1, weight=2) - - Tkinter.Label(body, text='Activity Bar').grid(row=0, sticky=Tkconstants.E) - self.bar = ActivityBar(body, length=80, height=15, barwidth=5) - self.bar.grid(row=0, column=1, sticky=sticky) - - msg1 = '' - self.stext = ScrolledText(body, bd=5, relief=Tkconstants.RIDGE, height=4, width=80, wrap=Tkconstants.WORD) - self.stext.grid(row=2, column=0, columnspan=2,sticky=sticky) - self.stext.insert(Tkconstants.END,msg1) - - buttons = Tkinter.Frame(self) - buttons.pack() - self.qbutton = Tkinter.Button(buttons, text="Quit", width=14, command=self.quitting) - self.qbutton.pack(side=Tkconstants.BOTTOM) - self.status['text'] = '' - - self.logfile = open(os.path.join(os.path.expanduser('~'),'DeDRM.log'),'w') - - def show(self): - self.deiconify() - self.tkraise() - - def hide(self): - self.withdraw() - - def doit(self, prefs, filenames): - self.running = 'inactive' - self.prefs_array = prefs - self.filenames = filenames - self.show() - self.processBooks() - - def conversion_done(self): - self.hide() - self.master.alldone() - - def processBooks(self): - while self.running == 'inactive': - rscpath = self.prefs_array['dir'] - filename = None - if len(self.filenames) > 0: - filename = self.filenames.pop(0) - if filename == None: - msg = 'Complete: ' - msg += 'Successes: %d, ' % self.numgood - msg += 'Failures: %d\n' % self.numbad - self.showCmdOutput(msg) - if self.numbad == 0: - self.after(2000,self.conversion_done()) - self.logfile.write("DeDRM v{0}: {1}".format(__version__,msg)) - self.logfile.close() - return - infile = filename - bname = os.path.basename(infile) - msg = 'Processing: ' + bname + '...' - self.logfile.write("DeDRM v{0}: {1}\n".format(__version__,msg)) - self.showCmdOutput(msg) - outdir = os.path.dirname(filename) - if 'outdir' in self.prefs_array: - dpath = self.prefs_array['outdir'] - if dpath.strip() != '': - outdir = dpath - rv = self.decrypt_ebook(infile, outdir, rscpath) - if rv == 0: - self.bar.start() - self.running = 'active' - self.processQueue() - else: - msg = 'Unknown File: ' + bname + '\n' - self.logfile.write("DeDRM v{0}: {1}".format(__version__,msg)) - self.showCmdOutput(msg) - self.numbad += 1 - - def quitting(self): - # kill any still running subprocess - self.running = 'stopped' - if self.p2 != None: - if (self.p2.exitcode == None): - self.p2.terminate() - self.conversion_done() - - # post output from subprocess in scrolled text widget - def showCmdOutput(self, msg): - if msg and msg !='': - if sys.platform.startswith('win'): - msg = msg.replace('\r\n','\n') - self.stext.insert(Tkconstants.END,msg) - self.stext.yview_pickplace(Tkconstants.END) - return - - # read from subprocess pipe without blocking - # invoked every interval via the widget "after" - # option being used, so need to reset it for the next time - def processQueue(self): - if self.p2 == None: - # nothing to wait for so just return - return - poll = self.p2.exitcode - #print "processing", poll - done = False - text = '' - while not done: - try: - data = self.q.get_nowait() - text += data - except Empty: - done = True - if text != '': - self.logfile.write(text) - if poll != None: - self.bar.stop() - if poll == 0: - msg = 'Success\n' - self.numgood += 1 - else: - msg = 'Failed\n' - self.numbad += 1 - self.p2.join() - self.logfile.write("DeDRM v{0}: {1}\n".format(__version__,msg)) - self.showCmdOutput(msg) - self.p2 = None - self.running = 'inactive' - self.after(50,self.processBooks) - return - # make sure we get invoked again by event loop after interval - self.stext.after(self.interval,self.processQueue) - return - - def decrypt_ebook(self, infile, outdir, rscpath): - q = self.q - rv = 1 - name, ext = os.path.splitext(os.path.basename(infile)) - ext = ext.lower() - if ext == '.epub': - self.p2 = Process(target=processEPUB, args=(q, infile, outdir, rscpath)) - self.p2.start() - return 0 - if ext == '.pdb': - self.p2 = Process(target=processPDB, args=(q, infile, outdir, rscpath)) - self.p2.start() - return 0 - if ext in ['.azw', '.azw1', '.azw3', '.azw4', '.prc', '.mobi', '.pobi', '.tpz', '.azw8', '.kfx', '.kfx-zip']: - self.p2 = Process(target=processK4MOBI,args=(q, infile, outdir, rscpath)) - self.p2.start() - return 0 - if ext == '.pdf': - self.p2 = Process(target=processPDF, args=(q, infile, outdir, rscpath)) - self.p2.start() - return 0 - return rv - - -# child process starts here -def processK4MOBI(q, infile, outdir, rscpath): - add_cp65001_codec() - set_utf8_default_encoding() - sys.stdout = QueuedUTF8Stream(sys.stdout, q) - sys.stderr = QueuedUTF8Stream(sys.stderr, q) - rv = decryptk4mobi(infile, outdir, rscpath) - sys.exit(rv) - -# child process starts here -def processPDF(q, infile, outdir, rscpath): - add_cp65001_codec() - set_utf8_default_encoding() - sys.stdout = QueuedUTF8Stream(sys.stdout, q) - sys.stderr = QueuedUTF8Stream(sys.stderr, q) - rv = decryptpdf(infile, outdir, rscpath) - sys.exit(rv) - -# child process starts here -def processEPUB(q, infile, outdir, rscpath): - add_cp65001_codec() - set_utf8_default_encoding() - sys.stdout = QueuedUTF8Stream(sys.stdout, q) - sys.stderr = QueuedUTF8Stream(sys.stderr, q) - rv = decryptepub(infile, outdir, rscpath) - sys.exit(rv) - -# child process starts here -def processPDB(q, infile, outdir, rscpath): - add_cp65001_codec() - set_utf8_default_encoding() - sys.stdout = QueuedUTF8Stream(sys.stdout, q) - sys.stderr = QueuedUTF8Stream(sys.stderr, q) - rv = decryptpdb(infile, outdir, rscpath) - sys.exit(rv) - - -def main(): - argv=unicode_argv() - apphome = os.path.dirname(argv[0]) - apphome = os.path.abspath(apphome) - - # windows may pass a spurious quoted null string as argv[1] from bat file - # simply work around this until we can figure out a better way to handle things - if sys.platform.startswith('win') and len(argv) == 2: - temp = argv[1] - temp = temp.strip('"') - temp = temp.strip() - if temp == '': - argv.pop() - - if len(argv) == 1: - filenames = [] - dnd = False - - else : # processing books via drag and drop - dnd = True - # build a list of the files to be processed - # note all filenames and paths have been utf-8 encoded - infilelst = argv[1:] - filenames = [] - for infile in infilelst: - infile = infile.replace('"','') - infile = os.path.abspath(infile) - if os.path.isdir(infile): - bpath = infile - filelst = os.listdir(infile) - for afile in filelst: - if not afile.startswith('.'): - filepath = os.path.join(bpath,afile) - if os.path.isfile(filepath): - filenames.append(filepath) - else : - afile = os.path.basename(infile) - if not afile.startswith('.'): - if os.path.isfile(infile): - filenames.append(infile) - - # start up gui app - app = MainApp(apphome, dnd, filenames) - app.mainloop() - return 0 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/contrib/DeDRM_Windows_Application/DeDRM_App_ReadMe.txt b/contrib/DeDRM_Windows_Application/DeDRM_App_ReadMe.txt deleted file mode 100644 index 772b946..0000000 --- a/contrib/DeDRM_Windows_Application/DeDRM_App_ReadMe.txt +++ /dev/null @@ -1,65 +0,0 @@ -DeDRM_App - DeDRM_App.pyw and DeDRM_Drop_Target.bat -=================================================== - -DeDRM_App.pyw is a python drag and drop application that allows users to drag and drop ebooks or folders of ebooks onto the DeDRM_Drop_Target.bat to have the DRM removed. It repackages all the tools (except obok) in one easy to use program that remembers preferences and settings. - -It will work without manual configuration for Kindle for PC ebooks, Adobe Digital Edition (2.0.1) epub and pdf ebooks and Barnes & Noble NOOK Study ePubs when Kindle for PC, Adobe Digital Editions and NOOK Study are installed on the same computer and user account. - -To remove the DRM from eInk Kindle ebooks, Mobipocket ebooks and Fictionwise eReader ebooks requires the user to double-click the DeDRM_Drop_Target.bat file and set some additional Preferences including: - -eInk Kindle: 16 digit Serial Number -MobiPocket: 10 digit PID -eReader Social DRM: Name:Last 8 digits of CC number - -Once these preferences have been set, the user can simply drag and drop ebooks onto the DeDRM_Drop_Target to remove the DRM. Note that after setting preferences it is necessary to click on "Set Prefs" button and then quit the application for the change in preferences to fully take effect. - -This program requires that Python 2.7 and PyCrypto 2.6 for Python 2.7 be installed on your computer before it will work. See below for how to get and install these programs for Windows. - - -Installation ------------- -0. If you don't already have a correct version of Python and PyCrypto installed, follow the "Installing Python on Windows" and "Installing PyCrypto on Windows" sections below before continuing. - -1. Drag the DeDRM_App folder from DeDRM_Application_Windows to your "My Documents" folder. - -2. Open the DeDRM_App folder you've just dragged, and make a short-cut of the DeDRM_Drop_Target.bat file (right-click/Create Shortcut). Drag the shortcut file onto your Desktop. - -3. To set the preferences simply double-click on the short-cut you've just created. - - -Credits -------- -The original inept and ignoble scripts were by i♥cabbages -The original mobidedrm and erdr2pml scripts were by The Dark Reverser -The original topaz DRM removal script was by CMBDTC -The original topaz format conversion scripts were by some_updates, clarknova and Bart Simpson - -The alfcrypto library is by some_updates -The ePub encryption detection script is by Apprentice Alf, adapted from a script by Paul Durrant -The ignoblekey script is by Apprentice Harper -The DeDRM python GUI was by some_updates and is maintained by Apprentice Alf and Apprentice Harper - -Many fixes, updates and enhancements to the scripts and applicatons have been made by many other people. For more details, see the commments in the individual scripts. - - -Installing Python on Windows ----------------------------- -I strongly recommend fully installing ActiveState’s Active Python, free Community Edition for Windows. This is a free, full version of the Python. It comes with some important additional modules that are not included in the bare-bones version from www.python.org unless you choose to install everything. - -1. Download ActivePython 2.7.8 for Windows (or later 2.7.x version for Windows, but NOT 3.x) from http://www.activestate.com/activepython/downloads. - -2. When it has finished downloading, run the installer. Accept the default options. - - -Installing PyCrypto on Windows ------------------------------- -PyCrypto is a set of encryption/decryption routines that work with Python. The sources are freely available, and compiled versions are available from several sources. You must install a version that is for Python 2.7. I recommend the installer linked from Michael Foord’s blog. - -1. Download PyCrypto 2.6 (or later) for Windows and Python 2.7 from http://www.voidspace.org.uk/python/modules.shtml#pycrypto - -2. When it has finished downloading, run the application. Accept the default options. - - -Linux Users -=========== -The DeDRM_app.pyw script, although not the .bat shortcut, should work under Linux. Drag & drop functionality is not available. Depending on your Linux installation, you may or may not need to install Python 2 and PyCrypto. diff --git a/contrib/DeDRM_calibre_plugin/DeDRM_plugin_ReadMe.txt b/contrib/DeDRM_calibre_plugin/DeDRM_plugin_ReadMe.txt deleted file mode 100644 index b08a2e6..0000000 --- a/contrib/DeDRM_calibre_plugin/DeDRM_plugin_ReadMe.txt +++ /dev/null @@ -1,117 +0,0 @@ -DeDRM_plugin.zip -================ - -This calibre plugin replaces many previously separate DRM removal plugins. Before you install this plugin, you should uninstall any older individual DRM removal plugins, e.g. K4MobiDeDRM. The exception is the obok plugin, which should not be removed. - -This plugin will remove the DRM from - - Kindle ebooks (files from Kindle for Mac/PC* and eInk Kindles**). - - Barnes and Noble ePubs - - Adobe Digital Editions (v2.0.1***) ePubs (including Kobo and Google ePubs downloaded to ADE) - - Adobe Digital Editions (v2.0.1) PDFs - - Mobipocket ebooks - - eReader PDB books - -These tools do NOT work with kepubs downloaded using Kobo's desktop app (see the separate obok plugin) nor Apple's iBooks FairPlay DRM (see details about Requiem at the end of this file.) - -* With Kindle for PC/Mac 1.19 and later, Amazon included support for their new KFX format. While the tools now include a first attempt at supporting drm removal for KFX format, we recommend using Kindle for PC/Mac 1.17 or earlier which prevents downloads of the new format, as conversions from the olde KF8 format are likely to be more successful. - -** Some later Kindles support Amazon's new KFX format. And some books download in a split azw3/azw6 format. For best results, instead of using files downloaded directly to your Kindle, download from Amazon's web site 'for transfer via USB'. This will give you an single file to import. See also the FAQ entry about this. - -*** With Adobe Digital Editions 3.0 and later, Adobe have introduced a new, optional, DRM scheme. To avoid this new scheme, you should use Adobe Digital Editions 2.0.1. Some books are required to use the new DRM scheme and so will not download with ADE 2.0.1. If you still want such a book, you will need to use ADE 3.0 or later to download it, but you should remember that no tools to remove Adobe's new DRM scheme exist as of October 2017. - - -Installation ------------- -Open calibre's Preferences dialog. Click on the "Plugins" button. Next, click on the button, "Load plugin from file". Navigate to the unzipped DeDRM_tools folder and, in the folder "DeDRM_calibre_plugin", find the file "DeDRM_plugin.zip". Click to select the file and select "Open". Click "Yes" in the "Are you sure?" dialog box. Click the "OK" button in the "Success" dialog box. - - -Customization -------------- -You MUST add some key information for the following kinds of ebooks: - - Kindle ebooks from an E-Ink based Kindle (e.g. Voyage). - - Barnes & Noble ePubs other than those downloaded using NOOK Study - - Mobipocket ebooks - - eReader PDB books - - You do not need to add any key information for eBooks - - downloaded using Kindle for Mac/PC - - downloaded using Adobe Digital Editions (v2.0.1) - - downloaded using NOOK Study - as the necessary keys are automatically retrieved from files on your computer. - - To add needed key information for other books, highlight the plugin (DeDRM under the "File type plugins" category) and click the "Customize Plugin" button. - -The buttons in the configuration dialog will open individual configuration dialogs that will allow you to enter the needed information, depending on the type and source of your DRMed eBooks. Additional help on the information required is available in each of the the dialogs vias the [?] help button. - -If you have used previous versions of the various DeDRM plugins on this machine, you may find that some of the configuration dialogs already contain the information you entered through those previous plugins. - -When you have finished entering your configuration information, you must click the OK button to save it. If you click the Cancel button, all your changes in all the configuration dialogs will be lost. - - -Troubleshooting ---------------- -If you find that the DeDRM plugin is not working for you (imported ebooks still have DRM - that is, they won't convert or open in the calibre ebook viewer), you should make a log of the import process by deleting the DRMed ebook from calibre and then adding the ebook to calibre when it's running in debug mode. This will generate a lot of helpful debugging info that can be copied into any online help requests. Here's how to do it: - - - Remove the DRMed book from calibre. - - Click the Preferences drop-down menu and choose 'Restart in debug mode'. - - Once calibre has re-started, import the problem ebook. - - Now close calibre. - -A log will appear that you can copy and paste into a comment at Apprentice Alf's blog, http://apprenticealf.wordpress.com/ or an issue at Apprentice Harper's repository, https://github.com/apprenticeharper/DeDRM_tools/issues . You should also give details of your computer, and how you obtained the ebook file. - - -Credits -------- -The original inept and ignoble scripts were by i♥cabbages -The original mobidedrm and erdr2pml scripts were by The Dark Reverser -The original topaz DRM removal script was by CMBDTC -The original topaz format conversion scripts were by some_updates, clarknova and Bart Simpson -The original obok script was by Physisticated -The original KFX format decryption was by lulzkabulz, converted to python by Apprentice Naomi and integrated into the tools by tomthumb1997 - -The alfcrypto library is by some_updates -The ePub encryption detection script is by Apprentice Alf, adapted from a script by Paul Durrant -The ignoblekey script is by Apprentice Harper -The DeDRM plugin was based on plugins by DiapDealer and is maintained by Apprentice Alf and Apprentice Harper - -Many fixes, updates and enhancements to the scripts and applicatons have been made by many other people. For more details, see the commments in the individual scripts. - - -Linux Systems Only -================== - -Instructions for installing Wine, Kindle for PC, Adobe Digital Editions, Python and PyCrypto --------------------------------------------------------------------------------------------- - -These instructions have been tested with Wine 1.4 on Ubuntu but some of them are now very out of date. Parts of the instructions (those relevant to Kindle for PC and Python, but not Adobe Digital Editions and PyCrypto) have been tested with Wine 3.0 on Ubuntu. - -If you only use Kindle for PC, version 1.17, then you won't need PyCrypto nor Adobe Digital Editions, so you can skip the pertinent steps. - - 1. First download the software you're going to to have to install. - a. Adobe Digital Editions 1.7.x from http://helpx.adobe.com/digital-editions/kb/cant-install-digital-editions.html - (Adobe Digital Editions 2.x doesn't work with Wine.) - b. Python 2.7.X for Windows (x86) from https://www.python.org/ftp/python/2.7.13/python-2.7.13.msi - c. PyCrypto 2.1 for 32bit Windows and Python 2.7 from http://www.voidspace.org.uk/python/modules.shtml#pycrypto - (PyCrypto downloads as a zip file. You will need to unzip it.) - 2. Install Wine for 32-bit x86. (e.g. on Ubuntu, Open the Ubuntu Software Center, search for Wine, and install "Wine Windows Program Loader".) - 2a. [update] Kindle for PC now requires Windows 7, so in the following setups, choose any option for Windows 7, not Windows XP. - 3. Run "Configure Wine", which will set up the default 'wineprefix'. - 4. Navigate to "Install an application" and install Kindle. Alternatively, run `winetricks kindle`. Note that using `winetricks kindle` will give you version 1.20, which might not be what you want. - 5. Install Adobe Digital Editions. Accept all defaults and register with your Adobe ID. - 6. Install Python 2.7.x using `msiexec /i python-2.7.8.msi ALLUSERS=1`. Accept all defaults. Alternatively, run `winetricks python26`. However, if you do that, the automatic retrieval of keys (described in the next section) will be impossible, as dedrm_src/wineutils.py currently hardcodes the path for Python27. For manual extraction, you will also need to change Python27 to Python26 in step 2, below. - 7. Install PyCrypto 2.1. Accept all defaults. - -Instructions for getting Kindle for PC and Adobe Digital Editions default decryption keys ------------------------------------------------------------------------------------------ - -If everything has been installed in wine as above, the keys should be retrieved automatically. - -If you have a more complex wine installation, or something goes wrong, you may enter the appropriate WINEPREFIX (by default ~/.wine) in the configuration dialogs for Kindle for PC and Adobe Digital Editions (Preferences > Advanced > Plugins > File type plugins > DeDRM > Customize plugin). You can also test that you have entered the WINEPREFIX correctly by trying to add the default keys to the preferences by clicking on the green plus button in the configuration dialogs. - -Alternatively, if that also doesn't work for some reason, you can extract the keys manually. - - 1. Unzip DeDRM_plugin.zip and move kindlekey.py to somewhere in drive_c, such as ~/.wine/drive_c/DeDRM/libraryfiles/kindlekey.py. - 2. Run `wine 'C:\Python27/python.exe' 'C:\DeDRM/libraryfiles/kindlekey.py'`, or wherever you copied kindlekey.py to. - 3. Import the resulting key file to the Calibre plugin through the Kindle for Mac/PC ebooks option. - - diff --git a/contrib/Obok_calibre_plugin/obok_plugin_ReadMe.txt b/contrib/Obok_calibre_plugin/obok_plugin_ReadMe.txt deleted file mode 100644 index a7b8f1b..0000000 --- a/contrib/Obok_calibre_plugin/obok_plugin_ReadMe.txt +++ /dev/null @@ -1,53 +0,0 @@ -obok_plugin.zip -================ - -This plugin will remove the DRM from Kobo ebooks download on Mac or Windows using the Kobo desktop application, or from Kobo ebooks on an attached E-Ink Kobo reader (but not a Kobo Arc or Kobo Vox). If both are available, ebooks will be read from the attached E-Ink Kobo reader. To import from the desktop application, unplug the Kobo reader. - - -Installation ------------- -Open calibre's Preferences dialog. Click on the "Plugins" button. Next, click on the button, "Load plugin from file". Navigate to the unzipped DeDRM_tools folder and, in the folder "obok_calibre_plugin", find the file "obok_plugin.zip". Click to select the file and select "Open". Click "Yes" in the "Are you sure?" dialog box. Click the "OK" button in the "Success" dialog box. - - -Customization -------------- -No customization is required, except choosing which menus will show the plugin. Although the ability to enter a device serial number is given, this should not need to be filled in, as the serial number should be picked up automatically from the attached Kobo reader. - - -Using the plugin ----------------- - -Select the plugin's menu or icon from whichever part of the calibre interface you have chosen to have it. Follow the instructions in the dialog that appears. - - -Troubleshooting ---------------- -If you find that it's not working for you (imported ebooks still have DRM - that is, they won't convert or open in the calibre ebook viewer), you should make a log of import process by deleting the DRMed ebook from calibre and then adding the ebook to calibre when it's running in debug mode. This will generate a lot of helpful debugging info that can be copied into any online help requests. Here's how to do it: - -On Windows, open a terminal/command window. (Start/Run… and then type 'cmd.exe' (without the 's) as the program to run). -On Macintosh, open the Terminal application (in your Utilities folder). -On Linux open a command window. Hopefully all Linux users know how to do this. - -You should now have a text-based command-line window open. - -Type in "calibre-debug -g" (without the "s but with the space before the -g) and press the return/enter key. Calibre will launch and run as normal, but with debugging information output to the terminal window. - -Import the DRMed eBook into calibre in any of the the normal ways. (I usually drag&drop onto the calibre window.) - -Debug information will be written to the terminal window. - -Copy the output from the terminal window. -On Windows, you must use the window menu (little icon at left of window bar) to select all the text and then to copy it. -On Macintosh and Linux, just use the normal text select and copy commands. - -Paste the information into a comment at my blog, http://apprenticealf.wordpress.com/ describing your problem. - - -Credits -------- -The original obok script was by Physisticated -The plugin conversion was done anonymously. -The Kobo reader support was added by norbusan - -Additional improvements to the script and the plugin adaption by numerous anonymous people. - diff --git a/contrib/ReadMe_First.txt b/contrib/ReadMe_First.txt deleted file mode 100644 index d9300bf..0000000 --- a/contrib/ReadMe_First.txt +++ /dev/null @@ -1,159 +0,0 @@ -Welcome to the tools! -===================== - -This ReadMe_First.txt is meant to give users a quick overview of what is available and how to get started. This document is part of the Tools v6.6.2 archive from Apprentice Harper's github repository: https://github.com/apprenticeharper/DeDRM_tools/ - -The is archive includes tools to remove DRM from: - - - Kindle ebooks (files from Kindle for Mac/PC* and eInk Kindles**). - - Adobe Digital Editions (v2.0.1***) ePubs (including Kobo and Google ePubs downloaded to ADE) - - Kobo kePubs from the Kobo Desktop application - - Barnes and Noble ePubs - - Adobe Digital Editions (v2.0.1) PDFs - - Scuolabooks (Link to solution by Hex) - - Mobipocket ebooks - - eReader PDB ebooks - - Rocket ebooks (source only) - -These tools do NOT work with Apple's iBooks FairPlay DRM (see end of this file.) - -* With Kindle for PC/Mac 1.19 and later, Amazon included support for their new KFX format. While the tools now include a first attempt at supporting drm removal for KFX format, we recommend using Kindle for PC/Mac 1.17 or earlier which prevents downloads of the new format, as conversions from the olde KF8 format are likely to be more successful. - -** Some later Kindles support Amazon's new KFX format. And some books download in a split azw3/azw6 format. For best results, instead of using files downloaded directly to your Kindle, download from Amazon's web site 'for transfer via USB'. This will give you an single file to import. See also the FAQ entry about this. - -*** With Adobe Digital Editions 3.0 and later, Adobe have introduced a new, optional, DRM scheme. To avoid this new scheme, you should use Adobe Digital Editions 2.0.1. Some books are required to use the new DRM scheme and so will not download with ADE 2.0.1. If you still want such a book, you will need to use ADE 3.0 or later to download it, but you should remember that no tools to remove Adobe's new DRM scheme exist as of June 2017. - -About the tools ---------------- -These tools are updated and maintained by Apprentice Harper and many others. You can find the latest updates at Apprentice Harper's github repository https://github.com/apprenticeharper/DeDRM_tools/ and get support by creating an issue at the repository (github account required) or by posting a comment at Apprentice Alf's blog: http://www.apprenticealf.wordpress.com/ - -If you re-post these tools, a link to the repository and/or the blog would be appreciated. - - -DeDRM plugin for calibre (Mac OS X, Windows, and Linux) -------------------------------------------------------- -Calibre is an open source freeware ebook library manager. It is the best tool around for keeping track of your ebooks. The DeDRM plugin for calibre provides the simplest way, especially on Windows, to remove DRM from your Kindle and Adobe DRM ebooks. Just install the DeDRM plugin from the DeDRM_calibre_plugin folder, following the instructions and configuration directions provided in the ReadMe file and the help links in the plugin's configuration dialogs. - -Once installed and configured, you can simply add a DRM book to calibre and the DRM-free version will be imported into the calibre database. Note that DRM removal only occurs on IMPORT not on CONVERSION or at any other time. If you have already imported DRM books you'll need to remove them from calibre and re-import them. - -For instructions, see the DeDRM_plugin_ReadMe.txt file in the DeDRM_calibre_plugin folder. - - -Obok plugin for calibre (Mac OS X and Windows) ----------------------------------------------- -To import ebooks from the Kobo Desktop app or from a Kobo ebook reader, install the Obok plugin. This works in a different way to the DeDRM plugin, in that it finds your ebooks downloaded using the Kobo Desktop app, or on an attached Kobo ebooks reader, and displays them in a list, so that you can choose the ones you want to import into calibre. - -For instructions, see the obok_plugin_ReadMe.txt file in the Obok_calibre_plugin folder. - - -DeDRM application for Mac OS X users: (Mac OS X 10.6 and above) ---------------------------------------------------------------- -This application is a stand-alone DRM removal application for Mac OS X users. It is only needed for people who cannot or will not use the calibre plugin. KFX support has not been tested yet. - -For instructions, see the "DeDRM ReadMe.rtf" file in the DeDRM_Macintosh_Application folder. - - -DeDRM application for Windows users: (Windows XP through Windows 10) ------------------------------------------------------------------- -***This program requires that Python and PyCrypto be properly installed.*** -***See below for details on recommended versions and how to install them.*** - -This application is a stand-alone application for Windows users. It is only needed for people who cannot or will not use the calibre plugin. KFX support has not been tested yet. - -For instructions, see the DeDRM_App_ReadMe.txt file in the DeDRM_Windows_Applications folder. - - -Other_Tools ------------ -This is a folder of other tools that may be useful for DRMed ebooks from certain sources or for Linux users. Most users won't need any of these tools. - -B_and_N_Download_Helper -A Javascript to enable a download button at the B&N website for ebooks that normally won't download to your PC. Only for the adventurous. - -DRM_Key_Scripts -This folder contains python scripts that create or extract or fetch encryption keyfiles for Barnes and Noble, Adobe Digital Editions, Kindle for Mac/PC and old versions of Kindle for Android. - -Kindle_for_Android_Patches -Definitely only for the adventurous, this folder contains information on how to modify the Kindle for Android app to b able to get a PID for use with the other Kindle tools (DeDRM apps and calibre plugin). - -Kobo -Contains the standalone obok python script for removing DRM from kePubs downloaded using the kobo desktop application. - -Rocket_ebooks -Information about the now-obsolete Rocket ebook format and DRM, along with source for a tool to remove the DRM. - -Scuolabook_DRM -A link to the tool for removing DRM from ScuolaBooks PDFs, created by "Hex". - - -Windows and Python ------------------- -We **strongly** recommend using calibre and the plugin. - -If you really want to use the Windows app or the individual scripts, you'll need to install python. -ActiveState's Active Python 2.7 Community Edition for Windowscan be downloaded for free from: - -http://www.activestate.com/activepython/downloads - -In addition, Windows Users need PyCrypto: - - There are many places to get PyCrypto installers for Windows. One such place is: - - http://www.voidspace.org.uk/python/modules.shtml - - Please get the latest (currently 2.6) PyCrypto meant for Windows Python version 2.7. Note that the PyCrypto binaries have two version numbers. The first is the PyCrypto version, and the second is the python version that they work with. This can be confusing. - -Once Windows users have installed Python 2.7, and the matching PyCrypto, they are ready to run the DeDRM application or individual scripts. - -For (experimental) KFX support, you also need LZMA support. LZMA is built-in -in Python 3.3+ but not present in Python 2. Choices are backports.lzma and -pylzma, both of which need compiling. Compiling Python extensions on Windows -requires Visual Studio and is a PITA. The recommended way is to install wheels -(binary) directly. - -Windows binary wheels for backports.lzma and pylzma could be found here: - -https://www.lfd.uci.edu/~gohlke/pythonlibs/ - - -Apple's iBooks FairPlay DRM ---------------------------- - -The only tool that removes Apple's iBooks Fairplay DRM is Requiem by Brahms version 3.3.6 and works with iTunes 10.5. Requiem 4.0 and later do not remove DRM from ebooks. - -Requiem is no longer developed as of 2012, with the last version 4.1. - -You can download it from these download links: - -Requiem 3.3.6 for Windows: http://www.datafilehost.com/download-f7916922.html -MD5: 10ab191f2d86c692d57f6a07b4622cf8 - -Requiem 3.3.6 for Mac OS X: http://www.datafilehost.com/download-47fce8b7.html -MD5: 6d4167d47e6982ddbb8528212198b520 - -Requiem 3.3.6 source code: http://www.datafilehost.com/download-172920e9.html -MD5: 1636862796d573c693d56bcc526b60bd - -No support for requiem is provided at Apprentice Alf's blog or Apprentice Harper's github repository. - - -Credits -------- -The original inept and ignoble scripts were by i♥cabbages -The original mobidedrm and erdr2pml scripts were by The Dark Reverser -The original topaz DRM removal script was by CMBDTC -The original topaz format conversion scripts were by some_updates, clarknova and Bart Simpson -The original KFX format decryption was by lulzkabulz, converted to python by Apprentice Naomi and integrated into the tools by tomthumb1997 - -The original obok script was by Physisticated - -The alfcrypto library is by some_updates -The ePub encryption detection script is by Apprentice Alf, adapted from a script by Paul Durrant -The ignoblekey script is by Apprentice Harper -The DeDRM plugin was based on plugins by DiapDealer and is maintained by Apprentice Alf and Apprentice Harper -The DeDRM AppleScript was by Paul Durrant and is maintained by Apprentice Alf and Apprentice Harper -The DeDRM python GUI was by some_updates and is maintained by Apprentice Alf and Apprentice Harper - -The Scuolabooks tool is by Hex - -Many fixes, updates and enhancements to the scripts and applicatons have been made by many other people. For more details, see the comments in the individual scripts. diff --git a/make_release.py b/make_release.py index 5c050c4..e88c3cb 100755 --- a/make_release.py +++ b/make_release.py @@ -13,15 +13,14 @@ import os import shutil -DEDRM_SRC_DIR = 'dedrm_src' -OBOK_SRC_DIR = 'obok_src' -SHELLS_BASE = 'contrib' +DEDRM_SRC_DIR = 'DeDRM_Plugin' +DEDRM_README= 'DeDRM_Plugin_ReadMe.txt' +OBOK_SRC_DIR = 'Obok_plugin' +OBOK_README = 'Obok_plugin_ReadMe.txt' +RELEASE_DIR = 'release' def make_calibre_plugin(): - calibre_plugin_dir = os.path.join(SHELLS_BASE, 'DeDRM_calibre_plugin') - core_dir = os.path.join(calibre_plugin_dir, 'DeDRM_plugin') - shutil.copytree(DEDRM_SRC_DIR, core_dir) shutil.make_archive(core_dir, 'zip', core_dir) shutil.rmtree(core_dir) @@ -31,49 +30,30 @@ def make_obok_plugin(): core_dir = os.path.join(obok_plugin_dir, 'obok_plugin') shutil.copytree(OBOK_SRC_DIR, core_dir) - shutil.make_archive(core_dir, 'zip', core_dir) + shutil.make_archive(core_dir, 'zip') shutil.rmtree(core_dir) - -def make_windows_app(): - windows_app_dir = os.path.join(SHELLS_BASE, 'DeDRM_Windows_Application') - core_dir = os.path.join(windows_app_dir, 'DeDRM_App', 'DeDRM_lib', 'lib') - - # delete any existing core_dir - try: - shutil.rmtree(core_dir) - except OSError: - pass - - shutil.copytree(DEDRM_SRC_DIR, core_dir) - - -def make_macos_app(): - macos_app_dir = os.path.join(SHELLS_BASE, 'DeDRM_Macintosh_Application') - core_dir = os.path.join(macos_app_dir, 'DeDRM.app', 'Contents', 'Resources') - - # Resources already exists - copy contents to contents. - _, dirs, files = next(os.walk(DEDRM_SRC_DIR)) - for name in dirs: - shutil.copyfile( - os.path.join(DEDRM_SRC_DIR, name), - os.path.join(core_dir, name) - ) - for name in files: - shutil.copy2( - os.path.join(DEDRM_SRC_DIR, name), - os.path.join(core_dir, name) - ) - - def make_release(version): - make_calibre_plugin() - make_windows_app() - make_macos_app() - make_obok_plugin() + try: + shutil.rmtree(RELEASE_DIR) + except: + pass + os.mkdir(RELEASE_DIR) + shutil.make_archive(DEDRM_SRC_DIR, 'zip', DEDRM_SRC_DIR) + shutil.make_archive(OBOK_SRC_DIR, 'zip', OBOK_SRC_DIR) + shutil.move(DEDRM_SRC_DIR+'.zip', RELEASE_DIR) + shutil.move(OBOK_SRC_DIR+'.zip', RELEASE_DIR) + shutil.copy(DEDRM_README, RELEASE_DIR) + shutil.copy(OBOK_README, RELEASE_DIR) + shutil.copy("ReadMe_Overview.txt", RELEASE_DIR) release_name = 'DeDRM_tools_{}'.format(version) - return shutil.make_archive(release_name, 'zip', SHELLS_BASE) + result = shutil.make_archive(release_name, 'zip', RELEASE_DIR) + try: + shutil.rmtree(RELEASE_DIR) + except: + pass + return result if __name__ == '__main__': diff --git a/obok_plugin_ReadMe.txt b/obok_plugin_ReadMe.txt new file mode 100644 index 0000000..2993e97 --- /dev/null +++ b/obok_plugin_ReadMe.txt @@ -0,0 +1,33 @@ +obok_plugin.zip +================ + +This plugin will remove the DRM from Kobo ebooks download on Mac or Windows using the Kobo desktop application, or from Kobo ebooks on an attached E-Ink Kobo reader (but not a Kobo Arc or Kobo Vox). If both are available, ebooks will be read from the attached E-Ink Kobo reader. To import from the desktop application, unplug the Kobo reader. + + +Installation +------------ +Open calibre's Preferences dialog. Click on the "Plugins" button. Next, click on the button, "Load plugin from file". Navigate to the unzipped DeDRM_tools folder, find the file "obok_plugin.zip". Click to select the file and select "Open". Click "Yes" in the "Are you sure?" dialog box. Click the "OK" button in the "Success" dialog box. + + +Customization +------------- +No customization is required, except choosing which menus will show the plugin. Although the ability to enter a device serial number is given, this should not need to be filled in, as the serial number should be picked up automatically from the attached Kobo reader. + + +Using the plugin +---------------- + +Select the plugin's menu or icon from whichever part of the calibre interface you have chosen to have it. Follow the instructions in the dialog that appears. + + +Troubleshooting +--------------- +If you find that the DeDRM plugin is not working for you (imported ebooks still have DRM - that is, they won't convert or open in the calibre ebook viewer), you should make a log of the import process by deleting the DRMed ebook from calibre and then adding the ebook to calibre when it's running in debug mode. This will generate a lot of helpful debugging info that can be copied into any online help requests. Here's how to do it: + + - Remove the DRMed book from calibre. + - Click the Preferences drop-down menu and choose 'Restart in debug mode'. + - Once calibre has re-started, import the problem ebook. + - Now close calibre. + +A log will appear that you can copy and paste into a comment at Apprentice Alf's blog, http://apprenticealf.wordpress.com/ or an issue at Apprentice Harper's repository, https://github.com/apprenticeharper/DeDRM_tools/issues . You should also give details of your computer, and how you obtained the ebook file. +