about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaweł Jastrzębski <pawelj@vulturis.eu>2014-05-29 18:44:17 +0200
committerPaweł Jastrzębski <pawelj@vulturis.eu>2014-05-29 18:54:38 +0200
commit90490149c72789dbbed9cd6acf601506e1f988b7 (patch)
tree62a9c4b8aaccfa036bd80849bf0e12f6f4fc3cd8
parentUse makeBook to create book from GUI (diff)
downloadkcc-90490149c72789dbbed9cd6acf601506e1f988b7.tar.gz
kcc-90490149c72789dbbed9cd6acf601506e1f988b7.tar.bz2
kcc-90490149c72789dbbed9cd6acf601506e1f988b7.zip
Merge branch 'theaquamarine-kindlegen'
-rwxr-xr-xkcc/comic2ebook.py31
1 files changed, 14 insertions, 17 deletions
diff --git a/kcc/comic2ebook.py b/kcc/comic2ebook.py
index 89ad0a2..7d554f6 100755
--- a/kcc/comic2ebook.py
+++ b/kcc/comic2ebook.py
@@ -889,13 +889,13 @@ def Usage():
 
 def makeParser():
     """Create and return an option parser set up with kcc's options."""
-    parser = OptionParser(usage="Usage: kcc-c2e [options] comic_file|comic_folder", add_help_option=False)
+    psr = OptionParser(usage="Usage: kcc-c2e [options] comic_file|comic_folder", add_help_option=False)
 
-    mainOptions = OptionGroup(parser, "MAIN")
-    processingOptions = OptionGroup(parser, "PROCESSING")
-    outputOptions = OptionGroup(parser, "OUTPUT SETTINGS")
-    customProfileOptions = OptionGroup(parser, "CUSTOM PROFILE")
-    otherOptions = OptionGroup(parser, "OTHER")
+    mainOptions = OptionGroup(psr, "MAIN")
+    processingOptions = OptionGroup(psr, "PROCESSING")
+    outputOptions = OptionGroup(psr, "OUTPUT SETTINGS")
+    customProfileOptions = OptionGroup(psr, "CUSTOM PROFILE")
+    otherOptions = OptionGroup(psr, "OTHER")
 
     mainOptions.add_option("-p", "--profile", action="store", dest="profile", default="KHD",
                            help="Device profile (Choose one among K1, K2, K345, KDX, KHD, KF, KFHD, KFHD8, KFHDX,"
@@ -947,18 +947,17 @@ def makeParser():
     otherOptions.add_option("-h", "--help", action="help",
                             help="Show this help message and exit")
 
-    parser.add_option_group(mainOptions)
-    parser.add_option_group(outputOptions)
-    parser.add_option_group(processingOptions)
-    parser.add_option_group(customProfileOptions)
-    parser.add_option_group(otherOptions)
+    psr.add_option_group(mainOptions)
+    psr.add_option_group(outputOptions)
+    psr.add_option_group(processingOptions)
+    psr.add_option_group(customProfileOptions)
+    psr.add_option_group(otherOptions)
 
-    return parser
+    return psr
 
 
 def main(argv=None, qtGUI=None):
     global parser, options, GUI
-
     parser = makeParser()
     options, args = parser.parse_args(argv)
     checkOptions()
@@ -970,9 +969,7 @@ def main(argv=None, qtGUI=None):
     if len(args) != 1:
         parser.print_help()
         return
-
-    source = args[0]
-    outputPath = makeBook(source, qtGUI=qtGUI)
+    outputPath = makeBook(args[0], qtGUI=qtGUI)
     return outputPath
 
 
@@ -1014,7 +1011,7 @@ def makeBook(source, qtGUI=None):
         if options.cbzoutput:
             GUI.progressBarTick.emit('Compressing CBZ files')
         else:
-            GUI.progressBarTick.emit('Compressing EPUgB files')
+            GUI.progressBarTick.emit('Compressing EPUB files')
         GUI.progressBarTick.emit(str(len(tomes) + 1))
         GUI.progressBarTick.emit('tick')