mirror of
https://github.com/ciromattia/kcc
synced 2025-12-13 09:46:25 +00:00
Code cleanup
This commit is contained in:
@@ -15,7 +15,7 @@ before_install:
|
||||
|
||||
install:
|
||||
- pip3 install -r requirements.txt
|
||||
- pip3 install certifi https://github.com/bjones1/pyinstaller/archive/pyqt5_fix.zip
|
||||
- pip3 install certifi https://github.com/pyinstaller/pyinstaller/archive/develop.zip
|
||||
- npm install -g appdmg
|
||||
|
||||
script: python3 setup.py build_binary
|
||||
|
||||
@@ -63,9 +63,9 @@ sudo pip3 install --upgrade pillow python-slugify psutil pyqt5 raven
|
||||
## INPUT FORMATS
|
||||
**KCC** can understand and convert, at the moment, the following input types:
|
||||
- Folders containing: PNG, JPG or GIF files
|
||||
- CBZ, ZIP
|
||||
- CBR, RAR *(With `unrar` executable)*
|
||||
- CB7, 7Z *(With `7za` executable)*
|
||||
- CBZ, ZIP *(With `7z` executable)*
|
||||
- CBR, RAR *(With `7z` executable)*
|
||||
- CB7, 7Z *(With `7z` executable)*
|
||||
- PDF *(Only extracting JPG images)*
|
||||
|
||||
## USAGE
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
environment:
|
||||
PYTHON: "C:\\Python36-x64"
|
||||
PYTHON: "C:\\Python37-x64"
|
||||
|
||||
install:
|
||||
- set PATH="%PYTHON%\\Scripts";"C:\\Program Files (x86)\\Inno Setup 5";%PATH%
|
||||
- "%PYTHON%\\python.exe -m pip install --upgrade pip setuptools wheel"
|
||||
- "%PYTHON%\\python.exe -m pip install -r requirements.txt"
|
||||
- "%PYTHON%\\python.exe -m pip install certifi https://github.com/bjones1/pyinstaller/archive/pyqt5_fix.zip"
|
||||
- "%PYTHON%\\python.exe -m pip install certifi https://github.com/pyinstaller/pyinstaller/archive/develop.zip"
|
||||
- nuget install secure-file -ExcludeVersion
|
||||
- secure-file\tools\secure-file -decrypt other\windows\sentry.py.enc -out kindlecomicconverter\sentry.py -secret %ENCRYPTION%
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ import shutil
|
||||
class DualMetaFixException(Exception):
|
||||
pass
|
||||
|
||||
|
||||
# palm database offset constants
|
||||
number_of_pdb_records = 76
|
||||
first_pdb_record = 78
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
import os
|
||||
from xml.dom.minidom import parse, Document
|
||||
from re import compile
|
||||
from subprocess import STDOUT, PIPE
|
||||
from psutil import Popen
|
||||
from tempfile import mkdtemp
|
||||
from shutil import rmtree
|
||||
from . import comicarchive
|
||||
|
||||
@@ -22,8 +22,6 @@ import os
|
||||
from hashlib import md5
|
||||
from html.parser import HTMLParser
|
||||
from distutils.version import StrictVersion
|
||||
from shutil import rmtree, copy
|
||||
from tempfile import mkdtemp
|
||||
from re import split
|
||||
from traceback import format_tb
|
||||
|
||||
@@ -49,8 +47,7 @@ class HTMLStripper(HTMLParser):
|
||||
def getImageFileName(imgfile):
|
||||
name, ext = os.path.splitext(imgfile)
|
||||
ext = ext.lower()
|
||||
if name.startswith('.') or (ext != '.png' and ext != '.jpg' and ext != '.jpeg' and ext != '.gif' and
|
||||
ext != '.webp'):
|
||||
if name.startswith('.') or ext not in ['.png', '.jpg', '.jpeg', '.gif', '.webp']:
|
||||
return None
|
||||
return [name, ext]
|
||||
|
||||
@@ -88,16 +85,17 @@ def md5Checksum(fpath):
|
||||
|
||||
def sanitizeTrace(traceback):
|
||||
return ''.join(format_tb(traceback))\
|
||||
.replace('C:/projects/kcc/', '') \
|
||||
.replace('c:/projects/kcc/', '') \
|
||||
.replace('C:/python36-x64/', '')\
|
||||
.replace('c:/python36-x64/', '')\
|
||||
.replace('C:\\projects\\kcc\\', '') \
|
||||
.replace('c:\\projects\\kcc\\', '') \
|
||||
.replace('C:\\python36-x64\\', '')\
|
||||
.replace('c:\\python36-x64\\', '')
|
||||
.replace('C:/projects/kcc/', '')\
|
||||
.replace('c:/projects/kcc/', '')\
|
||||
.replace('C:/python37-x64/', '')\
|
||||
.replace('c:/python37-x64/', '')\
|
||||
.replace('C:\\projects\\kcc\\', '')\
|
||||
.replace('c:\\projects\\kcc\\', '')\
|
||||
.replace('C:\\python37-x64\\', '')\
|
||||
.replace('c:\\python37-x64\\', '')
|
||||
|
||||
|
||||
# noinspection PyUnresolvedReferences
|
||||
def dependencyCheck(level):
|
||||
missing = []
|
||||
if level > 2:
|
||||
|
||||
Reference in New Issue
Block a user