# Include an html helpfile in the plugin's zipfile with the following name.
RESOURCE_NAME=PLUGIN_NAME+'_Help.htm'
@ -289,8 +294,8 @@ class DeDRM(FileTypePlugin):
exceptException,e:
pass
printu"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds.\nRead 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)
raiseDeDRMError(u"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds.".format(PLUGIN_NAME,PLUGIN_VERSION,time.time()-self.starttime))
printu"{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)
raiseDeDRMError(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
importcalibre_plugins.dedrm.ineptepubasineptepub
@ -380,17 +385,19 @@ class DeDRM(FileTypePlugin):
except:
printu"{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()
printu"{0} v{1}: Decrypted with new default key after {3:.1f} seconds".format(PLUGIN_NAME,PLUGIN_VERSION,time.time()-self.starttime)
printu"{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.
returnof.name
printu"{0} v{1}: Failed to decrypt with new default key after {2:.1f} seconds".format(PLUGIN_NAME,PLUGIN_VERSION,time.time()-self.starttime)
exceptException,e:
printu"{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.
printu"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds.\nRead 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)
raiseDeDRMError(u"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds.".format(PLUGIN_NAME,PLUGIN_VERSION,time.time()-self.starttime))
printu"{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)
raiseDeDRMError(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.
@ -489,8 +496,8 @@ class DeDRM(FileTypePlugin):
pass
# Something went wrong with decryption.
printu"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds.\nRead 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)
raiseDeDRMError(u"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds.".format(PLUGIN_NAME,PLUGIN_VERSION,time.time()-self.starttime))
printu"{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)
raiseDeDRMError(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))
defKindleMobiDecrypt(self,path_to_ebook):
@ -557,8 +564,8 @@ class DeDRM(FileTypePlugin):
pass
ifnotdecoded:
#if you reached here then no luck raise and exception
printu"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds.\nRead 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)
raiseDeDRMError(u"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds".format(PLUGIN_NAME,PLUGIN_VERSION,time.time()-self.starttime))
printu"{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)
raiseDeDRMError(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())
book.getFile(of.name)
@ -592,8 +599,8 @@ class DeDRM(FileTypePlugin):
printu"{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)
printu"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds.\nRead 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)
raiseDeDRMError(u"{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds.".format(PLUGIN_NAME,PLUGIN_VERSION,time.time()-self.starttime))
printu"{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)
raiseDeDRMError(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))