mirror of
https://github.com/noDRM/DeDRM_tools.git
synced 2024-11-04 21:16:10 +06:00
tools v5.5.2
This commit is contained in:
parent
0c03820db7
commit
c010e3f77a
|
@ -20,13 +20,14 @@ __docformat__ = 'restructuredtext en'
|
||||||
# 0.4.9 - typo fix
|
# 0.4.9 - typo fix
|
||||||
# 0.4.10 - Another Topaz Fix (class added to page and group and region)
|
# 0.4.10 - Another Topaz Fix (class added to page and group and region)
|
||||||
# 0.4.11 - Fixed Linux support of K4PC
|
# 0.4.11 - Fixed Linux support of K4PC
|
||||||
|
# 0.4.12 - More Linux Wine fixes
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Decrypt Amazon Kindle and Mobipocket encrypted ebooks.
|
Decrypt Amazon Kindle and Mobipocket encrypted ebooks.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
PLUGIN_NAME = u"Kindle and Mobipocket DeDRM"
|
PLUGIN_NAME = u"Kindle and Mobipocket DeDRM"
|
||||||
PLUGIN_VERSION_TUPLE = (0, 4, 11)
|
PLUGIN_VERSION_TUPLE = (0, 4, 12)
|
||||||
PLUGIN_VERSION = '.'.join([str(x) for x in PLUGIN_VERSION_TUPLE])
|
PLUGIN_VERSION = '.'.join([str(x) for x in PLUGIN_VERSION_TUPLE])
|
||||||
|
|
||||||
import sys, os, re
|
import sys, os, re
|
||||||
|
|
|
@ -11,15 +11,21 @@ __version__ = '1.01'
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
class Unbuffered:
|
class SafeUnbuffered:
|
||||||
def __init__(self, stream):
|
def __init__(self, stream):
|
||||||
self.stream = stream
|
self.stream = stream
|
||||||
|
self.encoding = stream.encoding
|
||||||
|
if self.encoding == None:
|
||||||
|
self.encoding = "utf-8"
|
||||||
def write(self, data):
|
def write(self, data):
|
||||||
|
if isinstance(data,unicode):
|
||||||
|
data = data.encode(self.encoding,"replace")
|
||||||
self.stream.write(data)
|
self.stream.write(data)
|
||||||
self.stream.flush()
|
self.stream.flush()
|
||||||
def __getattr__(self, attr):
|
def __getattr__(self, attr):
|
||||||
return getattr(self.stream, attr)
|
return getattr(self.stream, attr)
|
||||||
sys.stdout=Unbuffered(sys.stdout)
|
sys.stdout=SafeUnbuffered(sys.stdout)
|
||||||
|
sys.stderr=SafeUnbuffered(sys.stderr)
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import struct
|
import struct
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user