diff options
| author | Paweł Jastrzębski <[email protected]> | 2016-11-26 08:35:16 +0100 |
|---|---|---|
| committer | Paweł Jastrzębski <[email protected]> | 2016-11-26 09:23:39 +0100 |
| commit | bdb459cfaba9f885c78498692e617f4693af361d (patch) | |
| tree | 340270a3cbbb208dae7bba86a0bce5381bbffccc | |
| parent | GUI update (diff) | |
| download | kcc-bdb459cfaba9f885c78498692e617f4693af361d.tar.gz kcc-bdb459cfaba9f885c78498692e617f4693af361d.tar.bz2 kcc-bdb459cfaba9f885c78498692e617f4693af361d.zip | |
Code cleanup
| -rw-r--r-- | kcc/KCC_gui.py | 10 | ||||
| -rwxr-xr-x | kcc/comic2ebook.py | 6 | ||||
| -rw-r--r-- | kcc/pdfjpgextract.py | 1 |
3 files changed, 5 insertions, 12 deletions
diff --git a/kcc/KCC_gui.py b/kcc/KCC_gui.py index 133d31a..4a5608a 100644 --- a/kcc/KCC_gui.py +++ b/kcc/KCC_gui.py @@ -21,17 +21,15 @@ import os import sys from urllib.parse import unquote from urllib.request import urlopen, urlretrieve, Request -from time import sleep, time -from datetime import datetime +from time import sleep from shutil import move from subprocess import STDOUT, PIPE from PyQt5 import QtGui, QtCore, QtWidgets, QtNetwork -from xml.dom.minidom import parse, Document +from xml.dom.minidom import parse from psutil import Popen, Process from copy import copy from distutils.version import StrictVersion from xml.sax.saxutils import escape -from platform import platform from raven import Client from .shared import md5Checksum, HTMLStripper, sanitizeTrace, saferRemove from . import __version__ @@ -528,7 +526,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow): def clearJobs(self): GUI.jobList.clear() - # noinspection PyCallByClass,PyTypeChecker,PyArgumentList + # noinspection PyCallByClass,PyTypeChecker def openWiki(self): QtGui.QDesktopServices.openUrl(QtCore.QUrl('https://github.com/ciromattia/kcc/wiki')) @@ -705,7 +703,6 @@ class KCCGUI(KCC_ui.Ui_mainWindow): self.conversionAlive = False self.worker.sync() else: - # noinspection PyArgumentList if QtWidgets.QApplication.keyboardModifiers() == QtCore.Qt.ShiftModifier: dname = QtWidgets.QFileDialog.getExistingDirectory(MW, 'Select output directory', self.lastPath) if dname != '': @@ -853,7 +850,6 @@ class KCCGUI(KCC_ui.Ui_mainWindow): else: self.addMessage('Download it and place executable in /usr/local/bin directory.', 'error') - # noinspection PyArgumentList def __init__(self, KCCAplication, KCCWindow): global APP, MW, GUI APP = KCCAplication diff --git a/kcc/comic2ebook.py b/kcc/comic2ebook.py index 5ed178e..3321e12 100755 --- a/kcc/comic2ebook.py +++ b/kcc/comic2ebook.py @@ -93,7 +93,6 @@ def buildHTML(path, imgfile, imgfilepath): additionalStyle = 'background-color:#000000;' else: additionalStyle = 'background-color:#FFFFFF;' - htmlpath = '' postfix = '' backref = 1 head = path @@ -1014,7 +1013,6 @@ def checkPre(source): raise UserWarning("Target directory is not writable.") -# noinspection PyTypeChecker def makeBook(source, qtGUI=None): global GUI GUI = qtGUI @@ -1029,8 +1027,8 @@ def makeBook(source, qtGUI=None): getComicInfo(os.path.join(path, "OEBPS", "Images"), source) detectCorruption(os.path.join(path, "OEBPS", "Images"), source) if options.webtoon: - if image.ProfileData.Profiles[options.profile][1][1] > 1000: - y = 1000 + if image.ProfileData.Profiles[options.profile][1][1] > 1024: + y = 1024 else: y = image.ProfileData.Profiles[options.profile][1][1] comic2panel.main(['-y ' + str(y), '-i', '-m', path], qtGUI) diff --git a/kcc/pdfjpgextract.py b/kcc/pdfjpgextract.py index f4d5813..06403ad 100644 --- a/kcc/pdfjpgextract.py +++ b/kcc/pdfjpgextract.py @@ -61,7 +61,6 @@ class PdfJpgExtract: iend += endfix jpg = pdf[istart:iend] jpgfile = open(self.path + "/jpg%d.jpg" % njpg, "wb") - # noinspection PyTypeChecker jpgfile.write(jpg) jpgfile.close() njpg += 1 |