tools v6.0.7
This commit is contained in:
@@ -38,7 +38,7 @@ Decrypt DRMed ebooks.
|
||||
"""
|
||||
|
||||
PLUGIN_NAME = u"DeDRM"
|
||||
PLUGIN_VERSION_TUPLE = (6, 0, 6)
|
||||
PLUGIN_VERSION_TUPLE = (6, 0, 7)
|
||||
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'
|
||||
@@ -220,7 +220,7 @@ class DeDRM(FileTypePlugin):
|
||||
scriptpath = os.path.join(self.alfdir,u"adobekey.py")
|
||||
defaultkeys = WineGetKeys(scriptpath, u".der",dedrmprefs['adobewineprefix'])
|
||||
|
||||
self.default_key = default_keys[0]
|
||||
self.default_key = defaultkeys[0]
|
||||
except:
|
||||
traceback.print_exc()
|
||||
self.default_key = u""
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
from __future__ import with_statement
|
||||
|
||||
# ineptepub.pyw, version 5.9
|
||||
# ineptepub.pyw, version 6.1
|
||||
# Copyright © 2009-2010 by i♥cabbages
|
||||
|
||||
# Released under the terms of the GNU General Public Licence, version 3
|
||||
|
||||
@@ -51,14 +51,15 @@ from __future__ import with_statement
|
||||
# 7.12 - Revised to allow use in calibre plugins to eliminate need for duplicate code
|
||||
# 7.13 - Fixed erroneous mentions of ineptepub
|
||||
# 7.14 - moved unicode_argv call inside main for Windows DeDRM compatibility
|
||||
# 8.0 - Work if TkInter is missing
|
||||
# 8.0 - Work if TkInter is missing
|
||||
# 8.0.1 - Broken Metadata fix.
|
||||
|
||||
"""
|
||||
Decrypts Adobe ADEPT-encrypted PDF files.
|
||||
"""
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__version__ = "8.0"
|
||||
__version__ = "8.0.1"
|
||||
|
||||
import sys
|
||||
import os
|
||||
@@ -949,8 +950,11 @@ class PSStackParser(PSBaseParser):
|
||||
try:
|
||||
(pos, objs) = self.end_type('d')
|
||||
if len(objs) % 2 != 0:
|
||||
raise PSSyntaxError(
|
||||
'Invalid dictionary construct: %r' % objs)
|
||||
print "Incomplete dictionary construct"
|
||||
objs.append("") # this isn't necessary.
|
||||
# temporary fix. is this due to rental books?
|
||||
# raise PSSyntaxError(
|
||||
# 'Invalid dictionary construct: %r' % objs)
|
||||
d = dict((literal_name(k), v) \
|
||||
for (k,v) in choplist(2, objs))
|
||||
self.push((pos, d))
|
||||
|
||||
@@ -188,7 +188,7 @@ def unescape(text):
|
||||
def GetDecryptedBook(infile, kDatabases, serials, pids, starttime = time.time()):
|
||||
# handle the obvious cases at the beginning
|
||||
if not os.path.isfile(infile):
|
||||
raise DRMException (u"Input file does not exist.")
|
||||
raise DrmException(u"Input file does not exist.")
|
||||
|
||||
mobi = True
|
||||
magic3 = open(infile,'rb').read(3)
|
||||
|
||||
@@ -24,7 +24,7 @@ def WineGetKeys(scriptpath, extension, wineprefix=""):
|
||||
|
||||
outdirpath = os.path.join(basepath, u"winekeysdir")
|
||||
if not os.path.exists(outdirpath):
|
||||
os.mkdir(outdirpath)
|
||||
os.makedirs(outdirpath)
|
||||
|
||||
if wineprefix != "" and os.path.exists(wineprefix):
|
||||
cmdline = u"WINEPREFIX=\"{2}\" wine python.exe \"{0}\" \"{1}\"".format(scriptpath,outdirpath,wineprefix)
|
||||
|
||||
Reference in New Issue
Block a user