tools v1.3
This commit is contained in:
@@ -31,14 +31,18 @@ class MainDialog(Tkinter.Frame):
|
||||
Tkinter.Label(body, text='Topaz eBook input file').grid(row=0, sticky=Tkconstants.E)
|
||||
self.tpzpath = Tkinter.Entry(body, width=50)
|
||||
self.tpzpath.grid(row=0, column=1, sticky=sticky)
|
||||
self.tpzpath.insert(0, os.getcwd())
|
||||
cwd = os.getcwdu()
|
||||
cwd = cwd.encode('utf-8')
|
||||
self.tpzpath.insert(0, cwd)
|
||||
button = Tkinter.Button(body, text="...", command=self.get_tpzpath)
|
||||
button.grid(row=0, column=2)
|
||||
|
||||
Tkinter.Label(body, text='Output Directory').grid(row=1, sticky=Tkconstants.E)
|
||||
self.outpath = Tkinter.Entry(body, width=50)
|
||||
self.outpath.grid(row=1, column=1, sticky=sticky)
|
||||
self.outpath.insert(0, os.getcwd())
|
||||
cwd = os.getcwdu()
|
||||
cwd = cwd.encode('utf-8')
|
||||
self.outpath.insert(0, cwd)
|
||||
button = Tkinter.Button(body, text="...", command=self.get_outpath)
|
||||
button.grid(row=1, column=2)
|
||||
|
||||
@@ -88,6 +92,7 @@ class MainDialog(Tkinter.Frame):
|
||||
# post output from subprocess in scrolled text widget
|
||||
def showCmdOutput(self, msg):
|
||||
if msg and msg !='':
|
||||
msg = msg.encode('utf-8')
|
||||
self.stext.insert(Tkconstants.END,msg)
|
||||
self.stext.yview_pickplace(Tkconstants.END)
|
||||
return
|
||||
@@ -108,6 +113,7 @@ class MainDialog(Tkinter.Frame):
|
||||
else :
|
||||
cmdline = 'lib\cmbtc_dump.py -v -d ' + pidoption + outoption + '"' + infile + '"'
|
||||
|
||||
cmdline = cmdline.encode(sys.getfilesystemencoding())
|
||||
p2 = Process(cmdline, shell=True, bufsize=1, stdin=None, stdout=PIPE, stderr=PIPE, close_fds=False)
|
||||
return p2
|
||||
|
||||
@@ -124,9 +130,11 @@ class MainDialog(Tkinter.Frame):
|
||||
return
|
||||
|
||||
def get_outpath(self):
|
||||
cwd = os.getcwdu()
|
||||
cwd = cwd.encode('utf-8')
|
||||
outpath = tkFileDialog.askdirectory(
|
||||
parent=None, title='Directory to Extract Files into',
|
||||
initialdir=os.getcwd(), initialfile=None)
|
||||
initialdir=cwd, initialfile=None)
|
||||
if outpath:
|
||||
outpath = os.path.normpath(outpath)
|
||||
self.outpath.delete(0, Tkconstants.END)
|
||||
@@ -168,6 +176,7 @@ class MainDialog(Tkinter.Frame):
|
||||
log += 'First 8 chars of PID = "' + pidnum + '"\n'
|
||||
log += '\n\n'
|
||||
log += 'Please Wait ...\n'
|
||||
log = log.encode('utf-8')
|
||||
self.stext.insert(Tkconstants.END,log)
|
||||
self.p2 = self.topazrdr(tpzpath, outpath, pidnum)
|
||||
|
||||
|
||||
@@ -31,14 +31,18 @@ class MainDialog(Tkinter.Frame):
|
||||
Tkinter.Label(body, text='Topaz eBook input file').grid(row=0, sticky=Tkconstants.E)
|
||||
self.tpzpath = Tkinter.Entry(body, width=50)
|
||||
self.tpzpath.grid(row=0, column=1, sticky=sticky)
|
||||
self.tpzpath.insert(0, os.getcwd())
|
||||
cwd = os.getcwdu()
|
||||
cwd = cwd.encode('utf-8')
|
||||
self.tpzpath.insert(0, cwd)
|
||||
button = Tkinter.Button(body, text="...", command=self.get_tpzpath)
|
||||
button.grid(row=0, column=2)
|
||||
|
||||
Tkinter.Label(body, text='Output Directory').grid(row=1, sticky=Tkconstants.E)
|
||||
self.outpath = Tkinter.Entry(body, width=50)
|
||||
self.outpath.grid(row=1, column=1, sticky=sticky)
|
||||
self.outpath.insert(0, os.getcwd())
|
||||
cwd = os.getcwdu()
|
||||
cwd = cwd.encode('utf-8')
|
||||
self.outpath.insert(0, cwd)
|
||||
button = Tkinter.Button(body, text="...", command=self.get_outpath)
|
||||
button.grid(row=1, column=2)
|
||||
|
||||
@@ -88,6 +92,7 @@ class MainDialog(Tkinter.Frame):
|
||||
# post output from subprocess in scrolled text widget
|
||||
def showCmdOutput(self, msg):
|
||||
if msg and msg !='':
|
||||
msg = msg.encode('utf-8')
|
||||
self.stext.insert(Tkconstants.END,msg)
|
||||
self.stext.yview_pickplace(Tkconstants.END)
|
||||
return
|
||||
@@ -106,6 +111,7 @@ class MainDialog(Tkinter.Frame):
|
||||
else :
|
||||
cmdline = 'lib\cmbtc_dump_nonK4PC.py -v -d ' + pidoption + outoption + '"' + infile + '"'
|
||||
|
||||
cmdline = cmdline.encode(sys.getfilesystemencoding())
|
||||
p2 = Process(cmdline, shell=True, bufsize=1, stdin=None, stdout=PIPE, stderr=PIPE, close_fds=False)
|
||||
return p2
|
||||
|
||||
@@ -122,9 +128,11 @@ class MainDialog(Tkinter.Frame):
|
||||
return
|
||||
|
||||
def get_outpath(self):
|
||||
cwd = os.getcwdu()
|
||||
cwd = cwd.encode('utf-8')
|
||||
outpath = tkFileDialog.askdirectory(
|
||||
parent=None, title='Directory to Extract Files into',
|
||||
initialdir=os.getcwd(), initialfile=None)
|
||||
initialdir=cwd, initialfile=None)
|
||||
if outpath:
|
||||
outpath = os.path.normpath(outpath)
|
||||
self.outpath.delete(0, Tkconstants.END)
|
||||
@@ -166,6 +174,7 @@ class MainDialog(Tkinter.Frame):
|
||||
log += 'First 8 chars of PID = "' + pidnum + '"\n'
|
||||
log += '\n\n'
|
||||
log += 'Please Wait ...\n'
|
||||
log = log.encode('utf-8')
|
||||
self.stext.insert(Tkconstants.END,log)
|
||||
self.p2 = self.topazrdr(tpzpath, outpath, pidnum)
|
||||
|
||||
|
||||
@@ -31,7 +31,9 @@ class MainDialog(Tkinter.Frame):
|
||||
Tkinter.Label(body, text='Directory you Extracted Topaz Files into').grid(row=0, sticky=Tkconstants.E)
|
||||
self.bookdir = Tkinter.Entry(body, width=50)
|
||||
self.bookdir.grid(row=0, column=1, sticky=sticky)
|
||||
self.bookdir.insert(0, os.getcwd())
|
||||
cwd = os.getcwdu()
|
||||
cwd = cwd.encode('utf-8')
|
||||
self.bookdir.insert(0, cwd)
|
||||
button = Tkinter.Button(body, text="...", command=self.get_bookdir)
|
||||
button.grid(row=0, column=2)
|
||||
|
||||
@@ -76,6 +78,7 @@ class MainDialog(Tkinter.Frame):
|
||||
# post output from subprocess in scrolled text widget
|
||||
def showCmdOutput(self, msg):
|
||||
if msg and msg !='':
|
||||
msg = msg.encode('utf-8')
|
||||
self.stext.insert(Tkconstants.END,msg)
|
||||
self.stext.yview_pickplace(Tkconstants.END)
|
||||
return
|
||||
@@ -92,14 +95,17 @@ class MainDialog(Tkinter.Frame):
|
||||
else :
|
||||
cmdline = 'lib\genhtml.py "' + bookdir + '"'
|
||||
|
||||
cmdline = cmdline.encode(sys.getfilesystemencoding())
|
||||
p2 = Process(cmdline, shell=True, bufsize=1, stdin=None, stdout=PIPE, stderr=PIPE, close_fds=False)
|
||||
return p2
|
||||
|
||||
|
||||
def get_bookdir(self):
|
||||
cwd = os.getcwdu()
|
||||
cwd = cwd.encode('utf-8')
|
||||
bookdir = tkFileDialog.askdirectory(
|
||||
parent=None, title='Select the Directory you Extracted Topaz Files into',
|
||||
initialdir=os.getcwd(), initialfile=None)
|
||||
initialdir=cwd, initialfile=None)
|
||||
if bookdir:
|
||||
bookdir = os.path.normpath(bookdir)
|
||||
self.bookdir.delete(0, Tkconstants.END)
|
||||
@@ -127,6 +133,7 @@ class MainDialog(Tkinter.Frame):
|
||||
log += 'Book Directory = "' + bookdir + '"\n'
|
||||
log += '\n\n'
|
||||
log += 'Please Wait ...\n'
|
||||
log = log.encode('utf-8')
|
||||
self.stext.insert(Tkconstants.END,log)
|
||||
self.p2 = self.topazrdr(bookdir)
|
||||
|
||||
|
||||
@@ -31,7 +31,9 @@ class MainDialog(Tkinter.Frame):
|
||||
Tkinter.Label(body, text='Directory you Extracted Topaz Files into').grid(row=0, sticky=Tkconstants.E)
|
||||
self.bookdir = Tkinter.Entry(body, width=50)
|
||||
self.bookdir.grid(row=0, column=1, sticky=sticky)
|
||||
self.bookdir.insert(0, os.getcwd())
|
||||
cwd = os.getcwdu()
|
||||
cwd = cwd.encode('utf-8')
|
||||
self.bookdir.insert(0, cwd)
|
||||
button = Tkinter.Button(body, text="...", command=self.get_bookdir)
|
||||
button.grid(row=0, column=2)
|
||||
|
||||
@@ -76,6 +78,7 @@ class MainDialog(Tkinter.Frame):
|
||||
# post output from subprocess in scrolled text widget
|
||||
def showCmdOutput(self, msg):
|
||||
if msg and msg !='':
|
||||
msg = msg.encode('utf-8')
|
||||
self.stext.insert(Tkconstants.END,msg)
|
||||
self.stext.yview_pickplace(Tkconstants.END)
|
||||
return
|
||||
@@ -92,14 +95,17 @@ class MainDialog(Tkinter.Frame):
|
||||
else :
|
||||
cmdline = 'lib\gensvg.py "' + bookdir + '"'
|
||||
|
||||
cmdline = cmdline.encode(sys.getfilesystemencoding())
|
||||
p2 = Process(cmdline, shell=True, bufsize=1, stdin=None, stdout=PIPE, stderr=PIPE, close_fds=False)
|
||||
return p2
|
||||
|
||||
|
||||
def get_bookdir(self):
|
||||
cwd = os.getcwdu()
|
||||
cwd = cwd.encode('utf-8')
|
||||
bookdir = tkFileDialog.askdirectory(
|
||||
parent=None, title='Select the Directory you Extracted Topaz Files into',
|
||||
initialdir=os.getcwd(), initialfile=None)
|
||||
initialdir=cwd, initialfile=None)
|
||||
if bookdir:
|
||||
bookdir = os.path.normpath(bookdir)
|
||||
self.bookdir.delete(0, Tkconstants.END)
|
||||
@@ -127,6 +133,7 @@ class MainDialog(Tkinter.Frame):
|
||||
log += 'Book Directory = "' + bookdir + '"\n'
|
||||
log += '\n\n'
|
||||
log += 'Please Wait ...\n'
|
||||
log = log.encode('utf-8')
|
||||
self.stext.insert(Tkconstants.END,log)
|
||||
self.p2 = self.topazrdr(bookdir)
|
||||
|
||||
|
||||
@@ -31,7 +31,9 @@ class MainDialog(Tkinter.Frame):
|
||||
Tkinter.Label(body, text='Directory you Extracted Topaz Files into').grid(row=0, sticky=Tkconstants.E)
|
||||
self.bookdir = Tkinter.Entry(body, width=50)
|
||||
self.bookdir.grid(row=0, column=1, sticky=sticky)
|
||||
self.bookdir.insert(0, os.getcwd())
|
||||
cwd = os.getcwdu()
|
||||
cwd = cwd.encode('utf-8')
|
||||
self.bookdir.insert(0, cwd)
|
||||
button = Tkinter.Button(body, text="...", command=self.get_bookdir)
|
||||
button.grid(row=0, column=2)
|
||||
|
||||
@@ -76,6 +78,7 @@ class MainDialog(Tkinter.Frame):
|
||||
# post output from subprocess in scrolled text widget
|
||||
def showCmdOutput(self, msg):
|
||||
if msg and msg !='':
|
||||
msg = msg.encode('utf-8')
|
||||
self.stext.insert(Tkconstants.END,msg)
|
||||
self.stext.yview_pickplace(Tkconstants.END)
|
||||
return
|
||||
@@ -92,14 +95,17 @@ class MainDialog(Tkinter.Frame):
|
||||
else :
|
||||
cmdline = 'lib\genxml.py "' + bookdir + '"'
|
||||
|
||||
cmdline = cmdline.encode(sys.getfilesystemencoding())
|
||||
p2 = Process(cmdline, shell=True, bufsize=1, stdin=None, stdout=PIPE, stderr=PIPE, close_fds=False)
|
||||
return p2
|
||||
|
||||
|
||||
def get_bookdir(self):
|
||||
cwd = os.getcwdu()
|
||||
cwd = cwd.encode('utf-8')
|
||||
bookdir = tkFileDialog.askdirectory(
|
||||
parent=None, title='Select the Directory you Extracted Topaz Files into',
|
||||
initialdir=os.getcwd(), initialfile=None)
|
||||
initialdir=cwd, initialfile=None)
|
||||
if bookdir:
|
||||
bookdir = os.path.normpath(bookdir)
|
||||
self.bookdir.delete(0, Tkconstants.END)
|
||||
@@ -127,6 +133,7 @@ class MainDialog(Tkinter.Frame):
|
||||
log += 'Book Directory = "' + bookdir + '"\n'
|
||||
log += '\n\n'
|
||||
log += 'Please Wait ...\n'
|
||||
log = log.encode('utf-8')
|
||||
self.stext.insert(Tkconstants.END,log)
|
||||
self.p2 = self.topazrdr(bookdir)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/python
|
||||
# For use in Topaz Scripts version 2.2
|
||||
# For use in Topaz Scripts version 2.3
|
||||
|
||||
"""
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/python
|
||||
# For use with Topaz Scripts Version 2.2
|
||||
# For use with Topaz Scripts Version 2.3
|
||||
|
||||
class Unbuffered:
|
||||
def __init__(self, stream):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /usr/bin/python
|
||||
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
|
||||
# For use with Topaz Scripts Version 2.2
|
||||
# For use with Topaz Scripts Version 2.3
|
||||
|
||||
class Unbuffered:
|
||||
def __init__(self, stream):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /usr/bin/python
|
||||
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
|
||||
# For use with Topaz Scripts Version 2.2
|
||||
# For use with Topaz Scripts Version 2.3
|
||||
|
||||
import csv
|
||||
import sys
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /usr/bin/python
|
||||
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
|
||||
# For use with Topaz Scripts Version 2.2
|
||||
# For use with Topaz Scripts Version 2.3
|
||||
|
||||
import sys
|
||||
import csv
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /usr/bin/python
|
||||
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
|
||||
# For use with Topaz Scripts Version 2.2
|
||||
# For use with Topaz Scripts Version 2.3
|
||||
|
||||
class Unbuffered:
|
||||
def __init__(self, stream):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /usr/bin/python
|
||||
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
|
||||
# For use with Topaz Scripts Version 2.2
|
||||
# For use with Topaz Scripts Version 2.3
|
||||
|
||||
class Unbuffered:
|
||||
def __init__(self, stream):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /usr/bin/python
|
||||
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
|
||||
# For use with Topaz Scripts Version 2.2
|
||||
# For use with Topaz Scripts Version 2.3
|
||||
|
||||
class Unbuffered:
|
||||
def __init__(self, stream):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /usr/bin/python
|
||||
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
|
||||
# For use with Topaz Scripts Version 2.2
|
||||
# For use with Topaz Scripts Version 2.3
|
||||
|
||||
import csv
|
||||
import sys
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /usr/bin/python
|
||||
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
|
||||
# For use with Topaz Scripts Version 2.2
|
||||
# For use with Topaz Scripts Version 2.3
|
||||
|
||||
import csv
|
||||
import sys
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Canges in 2.3
|
||||
- fix for use with non-latin1 based systems (thank you Tedd)
|
||||
- fixes for out of order tokens in xml
|
||||
|
||||
Changes in 2.2
|
||||
- fix for minor bug in encode_Number from clark nova
|
||||
- more fixes to handle paths with spaces in them
|
||||
|
||||
Reference in New Issue
Block a user