Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2170b4260 | ||
|
|
054ddc894b |
@@ -24,7 +24,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>droplet</string>
|
<string>droplet</string>
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
<string>DeDRM AppleScript 6.4.0 Written 2010–2016 by Apprentice Alf et al.</string>
|
<string>DeDRM AppleScript 6.4.1 Written 2010–2016 by Apprentice Alf et al.</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>DeDRM</string>
|
<string>DeDRM</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>6.4.0</string>
|
<string>6.4.1</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>dplt</string>
|
<string>dplt</string>
|
||||||
<key>LSRequiresCarbon</key>
|
<key>LSRequiresCarbon</key>
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ __docformat__ = 'restructuredtext en'
|
|||||||
# Released under the terms of the GNU General Public Licence, version 3
|
# Released under the terms of the GNU General Public Licence, version 3
|
||||||
# <http://www.gnu.org/licenses/>
|
# <http://www.gnu.org/licenses/>
|
||||||
#
|
#
|
||||||
# Requires Calibre version 0.7.55 or higher.
|
|
||||||
#
|
|
||||||
# All credit given to i♥cabbages and The Dark Reverser for the original standalone scripts.
|
# All credit given to i♥cabbages and The Dark Reverser for the original standalone scripts.
|
||||||
# We had the much easier job of converting them to a calibre plugin.
|
# We had the much easier job of converting them to a calibre plugin.
|
||||||
#
|
#
|
||||||
@@ -49,6 +47,7 @@ __docformat__ = 'restructuredtext en'
|
|||||||
# 6.3.5 - Fixes for Linux, and Kobo 3.19 and more logging
|
# 6.3.5 - Fixes for Linux, and Kobo 3.19 and more logging
|
||||||
# 6.3.6 - Fixes for ADE ePub and PDF introduced in 6.3.5
|
# 6.3.6 - Fixes for ADE ePub and PDF introduced in 6.3.5
|
||||||
# 6.4.0 - Updated for new Kindle for PC encryption
|
# 6.4.0 - Updated for new Kindle for PC encryption
|
||||||
|
# 6.4.1 - Fix for some new tags in Topaz ebooks.
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@@ -56,7 +55,7 @@ Decrypt DRMed ebooks.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
PLUGIN_NAME = u"DeDRM"
|
PLUGIN_NAME = u"DeDRM"
|
||||||
PLUGIN_VERSION_TUPLE = (6, 4, 0)
|
PLUGIN_VERSION_TUPLE = (6, 4, 1)
|
||||||
PLUGIN_VERSION = u".".join([unicode(str(x)) for x in PLUGIN_VERSION_TUPLE])
|
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.
|
# Include an html helpfile in the plugin's zipfile with the following name.
|
||||||
RESOURCE_NAME = PLUGIN_NAME + '_Help.htm'
|
RESOURCE_NAME = PLUGIN_NAME + '_Help.htm'
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ class PageParser(object):
|
|||||||
self.id = os.path.basename(filename).replace('.dat','')
|
self.id = os.path.basename(filename).replace('.dat','')
|
||||||
self.dict = dict
|
self.dict = dict
|
||||||
self.debug = debug
|
self.debug = debug
|
||||||
|
self.first_unknown = True
|
||||||
self.flat_xml = flat_xml
|
self.flat_xml = flat_xml
|
||||||
self.tagpath = []
|
self.tagpath = []
|
||||||
self.doc = []
|
self.doc = []
|
||||||
@@ -262,6 +263,9 @@ class PageParser(object):
|
|||||||
'img.w' : (1, 'scalar_number', 0, 0),
|
'img.w' : (1, 'scalar_number', 0, 0),
|
||||||
'img.src' : (1, 'scalar_number', 0, 0),
|
'img.src' : (1, 'scalar_number', 0, 0),
|
||||||
'img.color_src' : (1, 'scalar_number', 0, 0),
|
'img.color_src' : (1, 'scalar_number', 0, 0),
|
||||||
|
'img.gridSize' : (1, 'scalar_number', 0, 0),
|
||||||
|
'img.gridBottomCenter' : (1, 'scalar_number', 0, 0),
|
||||||
|
'img.gridTopCenter' : (1, 'scalar_number', 0, 0),
|
||||||
'img.gridBeginCenter' : (1, 'scalar_number', 0, 0),
|
'img.gridBeginCenter' : (1, 'scalar_number', 0, 0),
|
||||||
'img.gridEndCenter' : (1, 'scalar_number', 0, 0),
|
'img.gridEndCenter' : (1, 'scalar_number', 0, 0),
|
||||||
'img.image_type' : (1, 'scalar_number', 0, 0),
|
'img.image_type' : (1, 'scalar_number', 0, 0),
|
||||||
@@ -506,8 +510,9 @@ class PageParser(object):
|
|||||||
# or an out of sync condition
|
# or an out of sync condition
|
||||||
else:
|
else:
|
||||||
result = []
|
result = []
|
||||||
if (self.debug):
|
if (self.debug or self.first_unknown):
|
||||||
print 'Unknown Token:', token
|
print 'Unknown Token:', token
|
||||||
|
self.first_unknown = False
|
||||||
self.tag_pop()
|
self.tag_pop()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,9 @@
|
|||||||
# 6.3.5 - Version bump to match plugin
|
# 6.3.5 - Version bump to match plugin
|
||||||
# 6.3.6 - 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.0 - Fix for Kindle for PC encryption change
|
||||||
|
# 6.4.1 - Fix for new tags in Topaz ebooks
|
||||||
|
|
||||||
__version__ = '6.4.0'
|
__version__ = '6.4.1'
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os, os.path
|
import os, os.path
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ __docformat__ = 'restructuredtext en'
|
|||||||
# Released under the terms of the GNU General Public Licence, version 3
|
# Released under the terms of the GNU General Public Licence, version 3
|
||||||
# <http://www.gnu.org/licenses/>
|
# <http://www.gnu.org/licenses/>
|
||||||
#
|
#
|
||||||
# Requires Calibre version 0.7.55 or higher.
|
|
||||||
#
|
|
||||||
# All credit given to i♥cabbages and The Dark Reverser for the original standalone scripts.
|
# All credit given to i♥cabbages and The Dark Reverser for the original standalone scripts.
|
||||||
# We had the much easier job of converting them to a calibre plugin.
|
# We had the much easier job of converting them to a calibre plugin.
|
||||||
#
|
#
|
||||||
@@ -49,6 +47,7 @@ __docformat__ = 'restructuredtext en'
|
|||||||
# 6.3.5 - Fixes for Linux, and Kobo 3.19 and more logging
|
# 6.3.5 - Fixes for Linux, and Kobo 3.19 and more logging
|
||||||
# 6.3.6 - Fixes for ADE ePub and PDF introduced in 6.3.5
|
# 6.3.6 - Fixes for ADE ePub and PDF introduced in 6.3.5
|
||||||
# 6.4.0 - Updated for new Kindle for PC encryption
|
# 6.4.0 - Updated for new Kindle for PC encryption
|
||||||
|
# 6.4.1 - Fix for some new tags in Topaz ebooks.
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@@ -56,7 +55,7 @@ Decrypt DRMed ebooks.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
PLUGIN_NAME = u"DeDRM"
|
PLUGIN_NAME = u"DeDRM"
|
||||||
PLUGIN_VERSION_TUPLE = (6, 4, 0)
|
PLUGIN_VERSION_TUPLE = (6, 4, 1)
|
||||||
PLUGIN_VERSION = u".".join([unicode(str(x)) for x in PLUGIN_VERSION_TUPLE])
|
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.
|
# Include an html helpfile in the plugin's zipfile with the following name.
|
||||||
RESOURCE_NAME = PLUGIN_NAME + '_Help.htm'
|
RESOURCE_NAME = PLUGIN_NAME + '_Help.htm'
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ class PageParser(object):
|
|||||||
self.id = os.path.basename(filename).replace('.dat','')
|
self.id = os.path.basename(filename).replace('.dat','')
|
||||||
self.dict = dict
|
self.dict = dict
|
||||||
self.debug = debug
|
self.debug = debug
|
||||||
|
self.first_unknown = True
|
||||||
self.flat_xml = flat_xml
|
self.flat_xml = flat_xml
|
||||||
self.tagpath = []
|
self.tagpath = []
|
||||||
self.doc = []
|
self.doc = []
|
||||||
@@ -262,6 +263,9 @@ class PageParser(object):
|
|||||||
'img.w' : (1, 'scalar_number', 0, 0),
|
'img.w' : (1, 'scalar_number', 0, 0),
|
||||||
'img.src' : (1, 'scalar_number', 0, 0),
|
'img.src' : (1, 'scalar_number', 0, 0),
|
||||||
'img.color_src' : (1, 'scalar_number', 0, 0),
|
'img.color_src' : (1, 'scalar_number', 0, 0),
|
||||||
|
'img.gridSize' : (1, 'scalar_number', 0, 0),
|
||||||
|
'img.gridBottomCenter' : (1, 'scalar_number', 0, 0),
|
||||||
|
'img.gridTopCenter' : (1, 'scalar_number', 0, 0),
|
||||||
'img.gridBeginCenter' : (1, 'scalar_number', 0, 0),
|
'img.gridBeginCenter' : (1, 'scalar_number', 0, 0),
|
||||||
'img.gridEndCenter' : (1, 'scalar_number', 0, 0),
|
'img.gridEndCenter' : (1, 'scalar_number', 0, 0),
|
||||||
'img.image_type' : (1, 'scalar_number', 0, 0),
|
'img.image_type' : (1, 'scalar_number', 0, 0),
|
||||||
@@ -506,8 +510,9 @@ class PageParser(object):
|
|||||||
# or an out of sync condition
|
# or an out of sync condition
|
||||||
else:
|
else:
|
||||||
result = []
|
result = []
|
||||||
if (self.debug):
|
if (self.debug or self.first_unknown):
|
||||||
print 'Unknown Token:', token
|
print 'Unknown Token:', token
|
||||||
|
self.first_unknown = False
|
||||||
self.tag_pop()
|
self.tag_pop()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -9,8 +9,6 @@ __docformat__ = 'restructuredtext en'
|
|||||||
# Released under the terms of the GNU General Public Licence, version 3
|
# Released under the terms of the GNU General Public Licence, version 3
|
||||||
# <http://www.gnu.org/licenses/>
|
# <http://www.gnu.org/licenses/>
|
||||||
#
|
#
|
||||||
# Requires Calibre version 0.7.55 or higher.
|
|
||||||
#
|
|
||||||
# All credit given to i♥cabbages and The Dark Reverser for the original standalone scripts.
|
# All credit given to i♥cabbages and The Dark Reverser for the original standalone scripts.
|
||||||
# We had the much easier job of converting them to a calibre plugin.
|
# We had the much easier job of converting them to a calibre plugin.
|
||||||
#
|
#
|
||||||
@@ -49,6 +47,7 @@ __docformat__ = 'restructuredtext en'
|
|||||||
# 6.3.5 - Fixes for Linux, and Kobo 3.19 and more logging
|
# 6.3.5 - Fixes for Linux, and Kobo 3.19 and more logging
|
||||||
# 6.3.6 - Fixes for ADE ePub and PDF introduced in 6.3.5
|
# 6.3.6 - Fixes for ADE ePub and PDF introduced in 6.3.5
|
||||||
# 6.4.0 - Updated for new Kindle for PC encryption
|
# 6.4.0 - Updated for new Kindle for PC encryption
|
||||||
|
# 6.4.1 - Fix for some new tags in Topaz ebooks.
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@@ -56,7 +55,7 @@ Decrypt DRMed ebooks.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
PLUGIN_NAME = u"DeDRM"
|
PLUGIN_NAME = u"DeDRM"
|
||||||
PLUGIN_VERSION_TUPLE = (6, 4, 0)
|
PLUGIN_VERSION_TUPLE = (6, 4, 1)
|
||||||
PLUGIN_VERSION = u".".join([unicode(str(x)) for x in PLUGIN_VERSION_TUPLE])
|
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.
|
# Include an html helpfile in the plugin's zipfile with the following name.
|
||||||
RESOURCE_NAME = PLUGIN_NAME + '_Help.htm'
|
RESOURCE_NAME = PLUGIN_NAME + '_Help.htm'
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ class PageParser(object):
|
|||||||
self.id = os.path.basename(filename).replace('.dat','')
|
self.id = os.path.basename(filename).replace('.dat','')
|
||||||
self.dict = dict
|
self.dict = dict
|
||||||
self.debug = debug
|
self.debug = debug
|
||||||
|
self.first_unknown = True
|
||||||
self.flat_xml = flat_xml
|
self.flat_xml = flat_xml
|
||||||
self.tagpath = []
|
self.tagpath = []
|
||||||
self.doc = []
|
self.doc = []
|
||||||
@@ -262,6 +263,9 @@ class PageParser(object):
|
|||||||
'img.w' : (1, 'scalar_number', 0, 0),
|
'img.w' : (1, 'scalar_number', 0, 0),
|
||||||
'img.src' : (1, 'scalar_number', 0, 0),
|
'img.src' : (1, 'scalar_number', 0, 0),
|
||||||
'img.color_src' : (1, 'scalar_number', 0, 0),
|
'img.color_src' : (1, 'scalar_number', 0, 0),
|
||||||
|
'img.gridSize' : (1, 'scalar_number', 0, 0),
|
||||||
|
'img.gridBottomCenter' : (1, 'scalar_number', 0, 0),
|
||||||
|
'img.gridTopCenter' : (1, 'scalar_number', 0, 0),
|
||||||
'img.gridBeginCenter' : (1, 'scalar_number', 0, 0),
|
'img.gridBeginCenter' : (1, 'scalar_number', 0, 0),
|
||||||
'img.gridEndCenter' : (1, 'scalar_number', 0, 0),
|
'img.gridEndCenter' : (1, 'scalar_number', 0, 0),
|
||||||
'img.image_type' : (1, 'scalar_number', 0, 0),
|
'img.image_type' : (1, 'scalar_number', 0, 0),
|
||||||
@@ -506,8 +510,9 @@ class PageParser(object):
|
|||||||
# or an out of sync condition
|
# or an out of sync condition
|
||||||
else:
|
else:
|
||||||
result = []
|
result = []
|
||||||
if (self.debug):
|
if (self.debug or self.first_unknown):
|
||||||
print 'Unknown Token:', token
|
print 'Unknown Token:', token
|
||||||
|
self.first_unknown = False
|
||||||
self.tag_pop()
|
self.tag_pop()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user