1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-15 10:46:40 +00:00

Merge pull request #191 from ciromattia/dev

5.1
This commit is contained in:
Paweł Jastrzębski
2016-04-30 16:39:35 +02:00
43 changed files with 7924 additions and 10125 deletions

1
.gitignore vendored
View File

@@ -13,3 +13,4 @@ kindlegen*
*.spec *.spec
setup.bat setup.bat
setup.sh setup.sh
kcc/sentry.py

View File

@@ -1,26 +0,0 @@
# Recipe used to build DEB package
FROM acidweb/kcc-base
MAINTAINER Paweł Jastrzębski <pawelj@iosphe.re>
ENV KCCVER 5.0.1
ADD . /app
RUN pip3 install pillow python-slugify psutil scandir pyinstaller
RUN gem install fpm
RUN useradd -ms /bin/bash kcc && chown -R kcc:kcc /app
USER kcc
WORKDIR /app
RUN pyinstaller -F -s --noupx kcc.py
RUN mkdir -p dist/usr/bin dist/usr/share/applications dist/usr/share/doc/kindlecomicconverter dist/usr/share/kindlecomicconverter dist/usr/share/lintian/overrides
RUN mv dist/kcc dist/usr/bin
RUN cp icons/comic2ebook.png dist/usr/share/kindlecomicconverter
RUN cp LICENSE.txt dist/usr/share/doc/kindlecomicconverter/copyright
RUN cp other/linux/kindlecomicconverter.desktop dist/usr/share/applications
RUN cp other/linux/kindlecomicconverter dist/usr/share/lintian/overrides
WORKDIR /app/dist
RUN fpm -f -s dir -t deb -n kindlecomicconverter -v $KCCVER -m "Paweł Jastrzębski <pawelj@iosphe.re>" --license "ISC" --description "Comic and Manga converter for e-book readers.\nThis app allows you to transform your PNG, JPG, GIF, CBZ, CBR and CB7 files\ninto EPUB or MOBI format e-books." --url "https://kcc.iosphe.re/" --deb-priority "optional" --vendor "" --category "graphics" -d "unrar | unrar-free" -d "p7zip-full" usr
CMD mkdir -p /out/dist && cp kindlecomicconverter_${KCCVER}_amd64.deb /out/dist

View File

@@ -1,7 +1,7 @@
ISC LICENSE ISC LICENSE
Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com> Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com>
Copyright (c) 2013-2015 Paweł Jastrzębski <pawelj@iosphe.re> Copyright (c) 2013-2016 Paweł Jastrzębski <pawelj@iosphe.re>
Permission to use, copy, modify, and/or distribute this software for Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the any purpose with or without fee is hereby granted, provided that the

View File

@@ -32,16 +32,17 @@ You can find the latest released binary at the following links:
## DEPENDENCIES ## DEPENDENCIES
Following software is required to run Linux version of **KCC** and/or bare sources: Following software is required to run Linux version of **KCC** and/or bare sources:
- Python 3.3+ - Python 3.3+
- [PyQt](http://www.riverbankcomputing.co.uk/software/pyqt/download5) 5.2.1+ _(5.5+ is recommended)_ - [PyQt](https://pypi.python.org/pypi/PyQt5) 5.6.0+
- [Pillow](http://pypi.python.org/pypi/Pillow/) 3.0.0+ - [Pillow](https://pypi.python.org/pypi/Pillow/) 3.2.0+
- [psutil](https://pypi.python.org/pypi/psutil) 3.2.1+ - [psutil](https://pypi.python.org/pypi/psutil) 4.1.0+
- [python-slugify](http://pypi.python.org/pypi/python-slugify) 1.1.4+ - [python-slugify](https://pypi.python.org/pypi/python-slugify) 1.2.0+
- [scandir](https://pypi.python.org/pypi/scandir) 1.1.0+ _(needed only when using Python 3.3 or 3.4)_ - [raven](https://pypi.python.org/pypi/raven) 5.13.0+
- [scandir](https://pypi.python.org/pypi/scandir) 1.2.0+ _(needed only when using Python 3.3 or 3.4)_
On Debian based distributions these two commands should install all needed dependencies: On Debian based distributions these two commands should install all needed dependencies:
``` ```
sudo apt-get install python3 python3-dev python3-pip python3-pyqt5 libpng-dev libjpeg-dev p7zip-full unrar sudo apt-get install python3 python3-dev python3-pip libpng-dev libjpeg-dev p7zip-full unrar
sudo pip3 install --upgrade pillow python-slugify psutil scandir sudo pip3 install --upgrade pillow python-slugify psutil scandir raven pyqt5
``` ```
### Optional dependencies ### Optional dependencies
@@ -143,7 +144,7 @@ The app relies and includes the following scripts:
- Icon is by **Nikolay Verin** ([http://ncrow.deviantart.com/](http://ncrow.deviantart.com/)) and released under [CC BY-NC-SA 3.0](http://creativecommons.org/licenses/by-nc-sa/3.0/) License. - Icon is by **Nikolay Verin** ([http://ncrow.deviantart.com/](http://ncrow.deviantart.com/)) and released under [CC BY-NC-SA 3.0](http://creativecommons.org/licenses/by-nc-sa/3.0/) License.
## SAMPLE FILES CREATED BY KCC ## SAMPLE FILES CREATED BY KCC
* [Kindle Paperwhite 3 / Voyage](http://kcc.iosphe.re/Samples/Ubunchu!-KV.mobi) * [Kindle Paperwhite 3 / Voyage / Oasis](http://kcc.iosphe.re/Samples/Ubunchu!-KV.mobi)
* [Kindle Paperwhite 1 / 2](http://kcc.iosphe.re/Samples/Ubunchu!-KPW.mobi) * [Kindle Paperwhite 1 / 2](http://kcc.iosphe.re/Samples/Ubunchu!-KPW.mobi)
* [Kindle](http://kcc.iosphe.re/Samples/Ubunchu!-K345.mobi) * [Kindle](http://kcc.iosphe.re/Samples/Ubunchu!-K345.mobi)
* [Kindle DX/DXG](http://kcc.iosphe.re/Samples/Ubunchu!-KDX.cbz) * [Kindle DX/DXG](http://kcc.iosphe.re/Samples/Ubunchu!-KDX.cbz)
@@ -155,6 +156,14 @@ The app relies and includes the following scripts:
* [Kobo Aura H2O](http://kcc.iosphe.re/Samples/Ubunchu-KoAH2O.kepub.epub) * [Kobo Aura H2O](http://kcc.iosphe.re/Samples/Ubunchu-KoAH2O.kepub.epub)
## CHANGELOG ## CHANGELOG
####5.1:
* GUI now can be resized and high DPI support was somewhat improved
* Added profile for Kindle Oasis
* Implemented new error reporting mechanism
* CLI version now support additional cropping options
* Fixed permission issues on Windows
* Fixed multiple smaller issues
####5.0.1: ####5.0.1:
* Fixed Panel View placement issues * Fixed Panel View placement issues
* Decreased application startup time * Decreased application startup time
@@ -454,11 +463,9 @@ The app relies and includes the following scripts:
* When MCD metadata are used - Cover download * When MCD metadata are used - Cover download
* When error occurs - Automatic reporting * When error occurs - Automatic reporting
Error report include **KCC** version, OS version and content of error message.
## KNOWN ISSUES ## KNOWN ISSUES
Please check [wiki page](https://github.com/ciromattia/kcc/wiki/Known-issues). Please check [wiki page](https://github.com/ciromattia/kcc/wiki/Known-issues).
## COPYRIGHT ## COPYRIGHT
Copyright (c) 2012-2015 Ciro Mattia Gonano and Paweł Jastrzębski. Copyright (c) 2012-2016 Ciro Mattia Gonano and Paweł Jastrzębski.
**KCC** is released under ISC LICENSE; see LICENSE.txt for further details. **KCC** is released under ISC LICENSE; see LICENSE.txt for further details.

View File

@@ -1,676 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>KCC</class>
<widget class="QMainWindow" name="KCC">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>420</width>
<height>390</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>420</width>
<height>390</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>420</width>
<height>390</height>
</size>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="windowTitle">
<string>Kindle Comic Converter</string>
</property>
<property name="windowIcon">
<iconset resource="KCC.qrc">
<normaloff>:/Icon/icons/comic2ebook.png</normaloff>:/Icon/icons/comic2ebook.png</iconset>
</property>
<property name="locale">
<locale language="C" country="AnyCountry"/>
</property>
<widget class="QWidget" name="Form">
<widget class="QComboBox" name="DeviceBox">
<property name="geometry">
<rect>
<x>10</x>
<y>200</y>
<width>141</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>8</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Target device.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
<widget class="QComboBox" name="FormatBox">
<property name="geometry">
<rect>
<x>260</x>
<y>200</y>
<width>151</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>8</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Output format.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
<widget class="QPushButton" name="ConvertButton">
<property name="geometry">
<rect>
<x>160</x>
<y>200</y>
<width>91</width>
<height>32</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Shift+Click to select the output directory.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Convert</string>
</property>
<property name="icon">
<iconset resource="KCC.qrc">
<normaloff>:/Other/icons/convert.png</normaloff>:/Other/icons/convert.png</iconset>
</property>
</widget>
<widget class="QPushButton" name="DirectoryButton">
<property name="geometry">
<rect>
<x>10</x>
<y>160</y>
<width>141</width>
<height>32</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>8</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Add directory containing JPG, PNG or GIF files to queue.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;CBR, CBZ and CB7 files inside will not be processed!&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Add directory</string>
</property>
<property name="icon">
<iconset resource="KCC.qrc">
<normaloff>:/Other/icons/folder_new.png</normaloff>:/Other/icons/folder_new.png</iconset>
</property>
</widget>
<widget class="QPushButton" name="FileButton">
<property name="geometry">
<rect>
<x>260</x>
<y>160</y>
<width>151</width>
<height>32</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>8</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Add CBR, CBZ, CB7 or PDF file to queue.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Add file</string>
</property>
<property name="icon">
<iconset resource="KCC.qrc">
<normaloff>:/Other/icons/document_new.png</normaloff>:/Other/icons/document_new.png</iconset>
</property>
</widget>
<widget class="QPushButton" name="ClearButton">
<property name="geometry">
<rect>
<x>160</x>
<y>160</y>
<width>91</width>
<height>32</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>8</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Clear list</string>
</property>
<property name="icon">
<iconset resource="KCC.qrc">
<normaloff>:/Other/icons/clear.png</normaloff>:/Other/icons/clear.png</iconset>
</property>
</widget>
<widget class="QFrame" name="Options">
<property name="geometry">
<rect>
<x>10</x>
<y>237</y>
<width>401</width>
<height>70</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="horizontalSpacing">
<number>25</number>
</property>
<property name="verticalSpacing">
<number>4</number>
</property>
<item row="2" column="0">
<widget class="QCheckBox" name="MangaBox">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Enable right-to-left reading.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Manga mode</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="RotateBox">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Unchecked - Split&lt;br/&gt;&lt;/span&gt;Double page spreads will be cut into two separate pages.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Indeterminate - Rotate and split&lt;br/&gt;&lt;/span&gt;Double page spreads will be displayed twice. First rotated and then split. &lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Checked - Rotate&lt;br/&gt;&lt;/span&gt;Double page spreads will be rotated.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Spread splitter</string>
</property>
<property name="tristate">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QCheckBox" name="QualityBox">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;High quality Panel View.&lt;br/&gt;Require source files with bigger resolution than target device.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Highly impact size of output file!&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>HQ zoom</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QCheckBox" name="GammaBox">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Disable automatic gamma correction.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Custom gamma</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="NoDitheringBox">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Create PNG files instead JPEG.&lt;br/&gt;Quality increase is not noticeable on most of devices.&lt;br/&gt;Output files &lt;span style=&quot; font-weight:600;&quot;&gt;might&lt;/span&gt; be smaller.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;MOBI conversion will be much slower.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>PNG output</string>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QCheckBox" name="ColorBox">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Disable conversion to grayscale.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Color mode</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="UpscaleBox">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Unchecked - Nothing&lt;br/&gt;&lt;/span&gt;Images smaller than device resolution will not be resized.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Indeterminate - Stretching&lt;br/&gt;&lt;/span&gt;Images smaller than device resolution will be resized. Aspect ratio will be not preserved.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Checked - Upscaling&lt;br/&gt;&lt;/span&gt;Images smaller than device resolution will be resized. Aspect ratio will be preserved.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Stretch/Upscale</string>
</property>
<property name="tristate">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="WebtoonBox">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Enable special parsing mode for Korean Webtoons.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Webtoon mode</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="BorderBox">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Unchecked - Autodetection&lt;br/&gt;&lt;/span&gt;Color of margins fill will be detected automatically.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Indeterminate - White&lt;br/&gt;&lt;/span&gt;Margins will be filled with white color.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Checked - Black&lt;br/&gt;&lt;/span&gt;Margins will be filled with black color.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>W/B margins</string>
</property>
<property name="tristate">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QListWidget" name="JobList">
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<width>401</width>
<height>101</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="styleSheet">
<string notr="true">QListWidget#JobList {background:#ffffff;background-image:url(:/Other/icons/list_background.png);background-position:center center;background-repeat:no-repeat;}QScrollBar:vertical{border:1px solid #999;background:#FFF;width:5px;margin:0}QScrollBar::handle:vertical{background:DarkGray;min-height:0}QScrollBar::add-line:vertical{height:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:vertical{height:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}QScrollBar:horizontal{border:1px solid #999;background:#FFF;height:5px;margin:0}QScrollBar::handle:horizontal{background:DarkGray;min-width:0}QScrollBar::add-line:horizontal{width:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:horizontal{width:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}</string>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::NoSelection</enum>
</property>
<property name="iconSize">
<size>
<width>18</width>
<height>18</height>
</size>
</property>
</widget>
<widget class="QFrame" name="OptionsGamma">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>305</y>
<width>401</width>
<height>35</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>15</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="GammaLabel">
<property name="text">
<string>Gamma: Auto</string>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="GammaSlider">
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="maximum">
<number>500</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QProgressBar" name="ProgressBar">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>401</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="value">
<number>0</number>
</property>
<property name="alignment">
<set>Qt::AlignJustify|Qt::AlignVCenter</set>
</property>
<property name="format">
<string/>
</property>
</widget>
<widget class="QFrame" name="OptionsCustom">
<property name="geometry">
<rect>
<x>10</x>
<y>336</y>
<width>401</width>
<height>25</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>10</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="wLabel">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Resolution of target device.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Custom width: </string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="customWidth">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Resolution of target device.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="inputMask">
<string>0000</string>
</property>
<property name="maxLength">
<number>4</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="hLabel">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Resolution of target device.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Custom height: </string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="customHeight">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Resolution of target device.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="inputMask">
<string>0000</string>
</property>
<property name="maxLength">
<number>4</number>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QPushButton" name="EditorButton">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>200</width>
<height>32</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Editor</string>
</property>
<property name="icon">
<iconset resource="KCC.qrc">
<normaloff>:/Other/icons/editor.png</normaloff>:/Other/icons/editor.png</iconset>
</property>
</widget>
<widget class="QPushButton" name="WikiButton">
<property name="geometry">
<rect>
<x>211</x>
<y>10</y>
<width>200</width>
<height>32</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Wiki</string>
</property>
<property name="icon">
<iconset resource="KCC.qrc">
<normaloff>:/Other/icons/wiki.png</normaloff>:/Other/icons/wiki.png</iconset>
</property>
</widget>
<zorder>DeviceBox</zorder>
<zorder>FormatBox</zorder>
<zorder>ConvertButton</zorder>
<zorder>DirectoryButton</zorder>
<zorder>FileButton</zorder>
<zorder>ClearButton</zorder>
<zorder>Options</zorder>
<zorder>JobList</zorder>
<zorder>OptionsGamma</zorder>
<zorder>OptionsCustom</zorder>
<zorder>EditorButton</zorder>
<zorder>WikiButton</zorder>
<zorder>ProgressBar</zorder>
</widget>
<widget class="QStatusBar" name="statusBar">
<property name="font">
<font>
<pointsize>8</pointsize>
</font>
</property>
<property name="sizeGripEnabled">
<bool>false</bool>
</property>
</widget>
<action name="ActionBasic">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="text">
<string>Basic</string>
</property>
<property name="font">
<font/>
</property>
</action>
<action name="ActionAdvanced">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Advanced</string>
</property>
</action>
</widget>
<tabstops>
<tabstop>DirectoryButton</tabstop>
<tabstop>FileButton</tabstop>
<tabstop>ConvertButton</tabstop>
<tabstop>ClearButton</tabstop>
</tabstops>
<resources>
<include location="KCC.qrc"/>
</resources>
<connections/>
</ui>

View File

@@ -1,689 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>KCC</class>
<widget class="QMainWindow" name="KCC">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>420</width>
<height>390</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>420</width>
<height>390</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>420</width>
<height>390</height>
</size>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="windowTitle">
<string>Kindle Comic Converter</string>
</property>
<property name="windowIcon">
<iconset resource="KCC.qrc">
<normaloff>:/Icon/icons/comic2ebook.png</normaloff>:/Icon/icons/comic2ebook.png</iconset>
</property>
<property name="locale">
<locale language="C" country="AnyCountry"/>
</property>
<widget class="QWidget" name="Form">
<widget class="QComboBox" name="DeviceBox">
<property name="geometry">
<rect>
<x>8</x>
<y>204</y>
<width>151</width>
<height>26</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Target device.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
<widget class="QComboBox" name="FormatBox">
<property name="geometry">
<rect>
<x>264</x>
<y>204</y>
<width>150</width>
<height>26</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Output format.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
<widget class="QPushButton" name="ConvertButton">
<property name="geometry">
<rect>
<x>159</x>
<y>200</y>
<width>104</width>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Shift+Click to select the output directory.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Convert</string>
</property>
<property name="icon">
<iconset resource="KCC.qrc">
<normaloff>:/Other/icons/convert.png</normaloff>:/Other/icons/convert.png</iconset>
</property>
</widget>
<widget class="QPushButton" name="DirectoryButton">
<property name="geometry">
<rect>
<x>4</x>
<y>160</y>
<width>158</width>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Add directory containing JPG, PNG or GIF files to queue.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;CBR, CBZ and CB7 files inside will not be processed!&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Add directory</string>
</property>
<property name="icon">
<iconset resource="KCC.qrc">
<normaloff>:/Other/icons/folder_new.png</normaloff>:/Other/icons/folder_new.png</iconset>
</property>
</widget>
<widget class="QPushButton" name="FileButton">
<property name="geometry">
<rect>
<x>260</x>
<y>160</y>
<width>157</width>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Add CBR, CBZ, CB7 or PDF file to queue.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Add file</string>
</property>
<property name="icon">
<iconset resource="KCC.qrc">
<normaloff>:/Other/icons/document_new.png</normaloff>:/Other/icons/document_new.png</iconset>
</property>
</widget>
<widget class="QPushButton" name="ClearButton">
<property name="geometry">
<rect>
<x>159</x>
<y>160</y>
<width>104</width>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Clear list</string>
</property>
<property name="icon">
<iconset resource="KCC.qrc">
<normaloff>:/Other/icons/clear.png</normaloff>:/Other/icons/clear.png</iconset>
</property>
</widget>
<widget class="QFrame" name="Options">
<property name="geometry">
<rect>
<x>10</x>
<y>237</y>
<width>401</width>
<height>70</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="horizontalSpacing">
<number>31</number>
</property>
<property name="verticalSpacing">
<number>5</number>
</property>
<item row="2" column="0">
<widget class="QCheckBox" name="MangaBox">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Enable right-to-left reading.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Manga mode</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="RotateBox">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Unchecked - Split&lt;br/&gt;&lt;/span&gt;Double page spreads will be cut into two separate pages.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Indeterminate - Rotate and split&lt;br/&gt;&lt;/span&gt;Double page spreads will be displayed twice. First rotated and then split. &lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Checked - Rotate&lt;br/&gt;&lt;/span&gt;Double page spreads will be rotated.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Spread splitter</string>
</property>
<property name="tristate">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QCheckBox" name="QualityBox">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;High quality Panel View.&lt;br/&gt;Require source files with bigger resolution than target device.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Highly impact size of output file!&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>HQ zoom</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QCheckBox" name="GammaBox">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Disable automatic gamma correction.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Custom gamma</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="NoDitheringBox">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Create PNG files instead JPEG.&lt;br/&gt;Quality increase is not noticeable on most of devices.&lt;br/&gt;Output files &lt;span style=&quot; font-weight:600;&quot;&gt;might&lt;/span&gt; be smaller.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;MOBI conversion will be much slower.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>PNG output</string>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QCheckBox" name="ColorBox">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Disable conversion to grayscale.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Color mode</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="UpscaleBox">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Unchecked - Nothing&lt;br/&gt;&lt;/span&gt;Images smaller than device resolution will not be resized.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Indeterminate - Stretching&lt;br/&gt;&lt;/span&gt;Images smaller than device resolution will be resized. Aspect ratio will be not preserved.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Checked - Upscaling&lt;br/&gt;&lt;/span&gt;Images smaller than device resolution will be resized. Aspect ratio will be preserved.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Stretch/Upscale</string>
</property>
<property name="tristate">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="WebtoonBox">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Enable special parsing mode for Korean Webtoons.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Webtoon mode</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="BorderBox">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Unchecked - Autodetection&lt;br/&gt;&lt;/span&gt;Color of margins fill will be detected automatically.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Indeterminate - White&lt;br/&gt;&lt;/span&gt;Margins will be filled with white color.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Checked - Black&lt;br/&gt;&lt;/span&gt;Margins will be filled with black color.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>W/B margins</string>
</property>
<property name="tristate">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QListWidget" name="JobList">
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<width>401</width>
<height>101</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="styleSheet">
<string notr="true">QListWidget#JobList {background:#ffffff;background-image:url(:/Other/icons/list_background.png);background-position:center center;background-repeat:no-repeat;}QScrollBar:vertical{border:1px solid #999;background:#FFF;width:5px;margin:0}QScrollBar::handle:vertical{background:DarkGray;min-height:0}QScrollBar::add-line:vertical{height:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:vertical{height:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}QScrollBar:horizontal{border:1px solid #999;background:#FFF;height:5px;margin:0}QScrollBar::handle:horizontal{background:DarkGray;min-width:0}QScrollBar::add-line:horizontal{width:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:horizontal{width:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}</string>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::NoSelection</enum>
</property>
<property name="iconSize">
<size>
<width>15</width>
<height>15</height>
</size>
</property>
<property name="verticalScrollMode">
<enum>QAbstractItemView::ScrollPerPixel</enum>
</property>
<property name="horizontalScrollMode">
<enum>QAbstractItemView::ScrollPerPixel</enum>
</property>
</widget>
<widget class="QFrame" name="OptionsGamma">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>305</y>
<width>401</width>
<height>35</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>15</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="GammaLabel">
<property name="text">
<string>Gamma: Auto</string>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="GammaSlider">
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="maximum">
<number>500</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QProgressBar" name="ProgressBar">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>401</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="value">
<number>0</number>
</property>
<property name="alignment">
<set>Qt::AlignJustify|Qt::AlignVCenter</set>
</property>
<property name="format">
<string/>
</property>
</widget>
<widget class="QFrame" name="OptionsCustom">
<property name="geometry">
<rect>
<x>10</x>
<y>337</y>
<width>401</width>
<height>25</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>5</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="wLabel">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Resolution of target device.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Custom width: </string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="customWidth">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Resolution of target device.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="inputMask">
<string>0000</string>
</property>
<property name="maxLength">
<number>4</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="hLabel">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Resolution of target device.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Custom height: </string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="customHeight">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Resolution of target device.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="inputMask">
<string>0000</string>
</property>
<property name="maxLength">
<number>4</number>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QPushButton" name="EditorButton">
<property name="geometry">
<rect>
<x>4</x>
<y>10</y>
<width>210</width>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Editor</string>
</property>
<property name="icon">
<iconset resource="KCC.qrc">
<normaloff>:/Other/icons/editor.png</normaloff>:/Other/icons/editor.png</iconset>
</property>
</widget>
<widget class="QPushButton" name="WikiButton">
<property name="geometry">
<rect>
<x>207</x>
<y>10</y>
<width>210</width>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Wiki</string>
</property>
<property name="icon">
<iconset resource="KCC.qrc">
<normaloff>:/Other/icons/wiki.png</normaloff>:/Other/icons/wiki.png</iconset>
</property>
</widget>
<zorder>DeviceBox</zorder>
<zorder>FormatBox</zorder>
<zorder>ConvertButton</zorder>
<zorder>DirectoryButton</zorder>
<zorder>FileButton</zorder>
<zorder>ClearButton</zorder>
<zorder>Options</zorder>
<zorder>JobList</zorder>
<zorder>OptionsGamma</zorder>
<zorder>OptionsCustom</zorder>
<zorder>EditorButton</zorder>
<zorder>WikiButton</zorder>
<zorder>ProgressBar</zorder>
</widget>
<widget class="QStatusBar" name="statusBar">
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="sizeGripEnabled">
<bool>false</bool>
</property>
</widget>
<action name="ActionBasic">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="text">
<string>Basic</string>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
</action>
<action name="ActionAdvanced">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Advanced</string>
</property>
</action>
</widget>
<tabstops>
<tabstop>DirectoryButton</tabstop>
<tabstop>FileButton</tabstop>
<tabstop>ConvertButton</tabstop>
<tabstop>ClearButton</tabstop>
</tabstops>
<resources>
<include location="KCC.qrc"/>
</resources>
<connections/>
</ui>

1049
gui/KCC.ui

File diff suppressed because it is too large Load Diff

View File

@@ -1,225 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MetaEditorDialog</class>
<widget class="QDialog" name="MetaEditorDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>290</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>400</width>
<height>290</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>400</width>
<height>290</height>
</size>
</property>
<property name="windowTitle">
<string>Metadata editor</string>
</property>
<property name="windowIcon">
<iconset resource="KCC.qrc">
<normaloff>:/Icon/icons/comic2ebook.png</normaloff>:/Icon/icons/comic2ebook.png</iconset>
</property>
<widget class="QWidget" name="horizontalLayoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>250</y>
<width>381</width>
<height>31</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="StatusLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 0, 0);</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="OKButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Save</string>
</property>
<property name="icon">
<iconset resource="KCC.qrc">
<normaloff>:/Other/icons/convert.png</normaloff>:/Other/icons/convert.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="CancelButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Cancel</string>
</property>
<property name="icon">
<iconset resource="KCC.qrc">
<normaloff>:/Other/icons/clear.png</normaloff>:/Other/icons/clear.png</iconset>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QFrame" name="EditorFrame">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>381</width>
<height>241</height>
</rect>
</property>
<widget class="QWidget" name="formLayoutWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>381</width>
<height>266</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Series:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="SeriesLine"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Volume:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="VolumeLine"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Number:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="NumberLine"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Writer:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="WriterLine"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Penciller:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="PencillerLine"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Inker:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLineEdit" name="InkerLine"/>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Colorist:</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLineEdit" name="ColoristLine"/>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/ciromattia/kcc/wiki/Manga-Cover-Database-support&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;MUid:&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QLineEdit" name="MUidLine"/>
</item>
</layout>
</widget>
<zorder>formLayoutWidget</zorder>
<zorder>horizontalLayoutWidget</zorder>
</widget>
</widget>
<resources>
<include location="KCC.qrc"/>
</resources>
<connections/>
</ui>

View File

@@ -1,226 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MetaEditorDialog</class>
<widget class="QDialog" name="MetaEditorDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>295</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>400</width>
<height>295</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>400</width>
<height>295</height>
</size>
</property>
<property name="windowTitle">
<string>Metadata editor</string>
</property>
<property name="windowIcon">
<iconset resource="KCC.qrc">
<normaloff>:/Icon/icons/comic2ebook.png</normaloff>:/Icon/icons/comic2ebook.png</iconset>
</property>
<widget class="QWidget" name="horizontalLayoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>260</y>
<width>381</width>
<height>32</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="StatusLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 0, 0);</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="OKButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Save</string>
</property>
<property name="icon">
<iconset resource="KCC.qrc">
<normaloff>:/Other/icons/convert.png</normaloff>:/Other/icons/convert.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="CancelButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Cancel</string>
</property>
<property name="icon">
<iconset resource="KCC.qrc">
<normaloff>:/Other/icons/clear.png</normaloff>:/Other/icons/clear.png</iconset>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QFrame" name="EditorFrame">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>381</width>
<height>251</height>
</rect>
</property>
<widget class="QWidget" name="formLayoutWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>381</width>
<height>250</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Series:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="SeriesLine"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Volume:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="VolumeLine"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Number:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="NumberLine"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Writer:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="WriterLine"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Penciller:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="PencillerLine"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Inker:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLineEdit" name="InkerLine"/>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Colorist:</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLineEdit" name="ColoristLine"/>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/ciromattia/kcc/wiki/Manga-Cover-Database-support&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;MUid:&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QLineEdit" name="MUidLine"/>
</item>
</layout>
</widget>
</widget>
</widget>
<resources>
<include location="KCC.qrc"/>
</resources>
<connections/>
</ui>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>MetaEditorDialog</class> <class>editorDialog</class>
<widget class="QDialog" name="MetaEditorDialog"> <widget class="QDialog" name="editorDialog">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
@@ -16,12 +16,6 @@
<height>260</height> <height>260</height>
</size> </size>
</property> </property>
<property name="maximumSize">
<size>
<width>400</width>
<height>260</height>
</size>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Metadata editor</string> <string>Metadata editor</string>
</property> </property>
@@ -29,191 +23,177 @@
<iconset resource="KCC.qrc"> <iconset resource="KCC.qrc">
<normaloff>:/Icon/icons/comic2ebook.png</normaloff>:/Icon/icons/comic2ebook.png</iconset> <normaloff>:/Icon/icons/comic2ebook.png</normaloff>:/Icon/icons/comic2ebook.png</iconset>
</property> </property>
<widget class="QWidget" name="horizontalLayoutWidget"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="geometry"> <property name="bottomMargin">
<rect> <number>5</number>
<x>10</x>
<y>220</y>
<width>381</width>
<height>31</height>
</rect>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <item>
<item> <widget class="QWidget" name="editorWidget" native="true">
<widget class="QLabel" name="StatusLabel"> <layout class="QGridLayout" name="gridLayout">
<property name="sizePolicy"> <property name="leftMargin">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> <number>0</number>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="font"> <property name="topMargin">
<font> <number>0</number>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="styleSheet"> <property name="rightMargin">
<string notr="true">color: rgb(255, 0, 0);</string> <number>0</number>
</property> </property>
</widget> <property name="bottomMargin">
</item> <number>0</number>
<item>
<widget class="QPushButton" name="OKButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="font"> <item row="0" column="0">
<font> <widget class="QLabel" name="label_1">
<weight>75</weight> <property name="text">
<bold>true</bold> <string>Series:</string>
</font> </property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="seriesLine"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Volume:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="volumeLine"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Number:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="numberLine"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Writer:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="writerLine"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Penciller:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="pencillerLine"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Inker:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="inkerLine"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Colorist:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLineEdit" name="coloristLine"/>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/ciromattia/kcc/wiki/Manga-Cover-Database-support&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;MUid:&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLineEdit" name="muidLine"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="optionWidget" native="true">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>0</number>
</property> </property>
<property name="text"> <property name="topMargin">
<string>Save</string> <number>0</number>
</property> </property>
<property name="icon"> <property name="rightMargin">
<iconset resource="KCC.qrc"> <number>0</number>
<normaloff>:/Other/icons/convert.png</normaloff>:/Other/icons/convert.png</iconset>
</property> </property>
</widget> <property name="bottomMargin">
</item> <number>0</number>
<item>
<widget class="QPushButton" name="CancelButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="font"> <item>
<font> <widget class="QLabel" name="statusLabel">
<weight>75</weight> <property name="sizePolicy">
<bold>true</bold> <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
</font> <horstretch>0</horstretch>
</property> <verstretch>0</verstretch>
<property name="text"> </sizepolicy>
<string>Cancel</string> </property>
</property> <property name="text">
<property name="icon"> <string/>
<iconset resource="KCC.qrc"> </property>
<normaloff>:/Other/icons/clear.png</normaloff>:/Other/icons/clear.png</iconset> </widget>
</property> </item>
</widget> <item>
</item> <widget class="QPushButton" name="okButton">
</layout> <property name="minimumSize">
</widget> <size>
<widget class="QFrame" name="EditorFrame"> <width>0</width>
<property name="geometry"> <height>30</height>
<rect> </size>
<x>10</x> </property>
<y>10</y> <property name="text">
<width>381</width> <string>Save</string>
<height>211</height> </property>
</rect> <property name="icon">
</property> <iconset resource="KCC.qrc">
<widget class="QWidget" name="formLayoutWidget"> <normaloff>:/Other/icons/convert.png</normaloff>:/Other/icons/convert.png</iconset>
<property name="geometry"> </property>
<rect> </widget>
<x>0</x> </item>
<y>0</y> <item>
<width>381</width> <widget class="QPushButton" name="cancelButton">
<height>211</height> <property name="minimumSize">
</rect> <size>
</property> <width>0</width>
<layout class="QFormLayout" name="formLayout"> <height>30</height>
<item row="1" column="0"> </size>
<widget class="QLabel" name="label"> </property>
<property name="text"> <property name="text">
<string>Series:</string> <string>Cancel</string>
</property> </property>
</widget> <property name="icon">
</item> <iconset resource="KCC.qrc">
<item row="1" column="1"> <normaloff>:/Other/icons/clear.png</normaloff>:/Other/icons/clear.png</iconset>
<widget class="QLineEdit" name="SeriesLine"/> </property>
</item> </widget>
<item row="2" column="0"> </item>
<widget class="QLabel" name="label_2"> </layout>
<property name="text"> </widget>
<string>Volume:</string> </item>
</property> </layout>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="VolumeLine"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Number:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="NumberLine"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Writer:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="WriterLine"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Penciller:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="PencillerLine"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Inker:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLineEdit" name="InkerLine"/>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Colorist:</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLineEdit" name="ColoristLine"/>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/ciromattia/kcc/wiki/Manga-Cover-Database-support&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;MUid:&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QLineEdit" name="MUidLine"/>
</item>
</layout>
</widget>
</widget>
</widget> </widget>
<resources> <resources>
<include location="KCC.qrc"/> <include location="KCC.qrc"/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

View File

@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com> # Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com>
# Copyright (c) 2013-2015 Pawel Jastrzebski <pawelj@iosphe.re> # Copyright (c) 2013-2016 Pawel Jastrzebski <pawelj@iosphe.re>
# #
# Permission to use, copy, modify, and/or distribute this software for # Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the # any purpose with or without fee is hereby granted, provided that the

View File

@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com> # Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com>
# Copyright (c) 2013-2015 Pawel Jastrzebski <pawelj@iosphe.re> # Copyright (c) 2013-2016 Pawel Jastrzebski <pawelj@iosphe.re>
# #
# Permission to use, copy, modify, and/or distribute this software for # Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the # any purpose with or without fee is hereby granted, provided that the

View File

@@ -1,5 +1,5 @@
#define MyAppName "Kindle Comic Converter" #define MyAppName "Kindle Comic Converter"
#define MyAppVersion "5.0.1" #define MyAppVersion "5.1"
#define MyAppPublisher "Ciro Mattia Gonano, Paweł Jastrzębski" #define MyAppPublisher "Ciro Mattia Gonano, Paweł Jastrzębski"
#define MyAppURL "http://kcc.iosphe.re/" #define MyAppURL "http://kcc.iosphe.re/"
#define MyAppExeName "KCC.exe" #define MyAppExeName "KCC.exe"
@@ -12,7 +12,7 @@ AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL} AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL} AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL} AppUpdatesURL={#MyAppURL}
AppCopyright=Copyright (C) 2012-2015 Ciro Mattia Gonano and Paweł Jastrzębski AppCopyright=Copyright (C) 2012-2016 Ciro Mattia Gonano and Paweł Jastrzębski
ArchitecturesAllowed=x64 ArchitecturesAllowed=x64
DefaultDirName={pf}\{#MyAppName} DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName} DefaultGroupName={#MyAppName}
@@ -49,6 +49,7 @@ Source: "LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion solidbreak
Source: "other\windows\Additional-LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion Source: "other\windows\Additional-LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "other\windows\UnRAR.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "other\windows\UnRAR.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "other\windows\7za.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "other\windows\7za.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "other\windows\vc_redist.x64.exe"; DestDir: "{tmp}"; Flags: ignoreversion deleteafterinstall
[Icons] [Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
@@ -56,6 +57,7 @@ Name: "{group}\Readme"; Filename: "https://github.com/ciromattia/kcc#kcc"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run] [Run]
Filename: "{tmp}\vc_redist.x64.exe"; Parameters: "/install /passive /norestart"; StatusMsg: "Installing Microsoft Visual C++ 2015 Redistributable Package..."
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall
[Messages] [Messages]

9
kcc.py
View File

@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com> # Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com>
# Copyright (c) 2013-2015 Pawel Jastrzebski <pawelj@iosphe.re> # Copyright (c) 2013-2016 Pawel Jastrzebski <pawelj@iosphe.re>
# #
# Permission to use, copy, modify, and/or distribute this software for # Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the # any purpose with or without fee is hereby granted, provided that the
@@ -56,6 +56,12 @@ elif sys.platform.startswith('win'):
else: else:
os.environ['PATH'] = os.path.dirname(os.path.abspath(__file__)) + '/other/windows/;' + os.environ['PATH'] os.environ['PATH'] = os.path.dirname(os.path.abspath(__file__)) + '/other/windows/;' + os.environ['PATH']
os.chdir(os.path.dirname(os.path.abspath(__file__))) os.chdir(os.path.dirname(os.path.abspath(__file__)))
# Load additional Sentry configuration
if getattr(sys, 'frozen', False):
try:
import kcc.sentry
except:
pass
from kcc.shared import dependencyCheck from kcc.shared import dependencyCheck
dependencyCheck(3) dependencyCheck(3)
@@ -65,6 +71,7 @@ from kcc import KCC_gui
if __name__ == "__main__": if __name__ == "__main__":
freeze_support() freeze_support()
os.environ['QT_AUTO_SCREEN_SCALE_FACTOR'] = "1"
KCCAplication = KCC_gui.QApplicationMessaging(sys.argv) KCCAplication = KCC_gui.QApplicationMessaging(sys.argv)
if KCCAplication.isRunning(): if KCCAplication.isRunning():
if len(sys.argv) > 1: if len(sys.argv) > 1:

View File

@@ -1,147 +0,0 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'MetaEditor.ui'
#
# Created: Sun Feb 8 11:52:00 2015
# by: PyQt5 UI code generator 5.4
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MetaEditorDialog(object):
def setupUi(self, MetaEditorDialog):
MetaEditorDialog.setObjectName("MetaEditorDialog")
MetaEditorDialog.resize(400, 260)
MetaEditorDialog.setMinimumSize(QtCore.QSize(400, 260))
MetaEditorDialog.setMaximumSize(QtCore.QSize(400, 260))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/Icon/icons/comic2ebook.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MetaEditorDialog.setWindowIcon(icon)
self.horizontalLayoutWidget = QtWidgets.QWidget(MetaEditorDialog)
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(10, 220, 381, 31))
self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.StatusLabel = QtWidgets.QLabel(self.horizontalLayoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.StatusLabel.sizePolicy().hasHeightForWidth())
self.StatusLabel.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.StatusLabel.setFont(font)
self.StatusLabel.setStyleSheet("color: rgb(255, 0, 0);")
self.StatusLabel.setObjectName("StatusLabel")
self.horizontalLayout.addWidget(self.StatusLabel)
self.OKButton = QtWidgets.QPushButton(self.horizontalLayoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.OKButton.sizePolicy().hasHeightForWidth())
self.OKButton.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.OKButton.setFont(font)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/Other/icons/convert.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.OKButton.setIcon(icon1)
self.OKButton.setObjectName("OKButton")
self.horizontalLayout.addWidget(self.OKButton)
self.CancelButton = QtWidgets.QPushButton(self.horizontalLayoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.CancelButton.sizePolicy().hasHeightForWidth())
self.CancelButton.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.CancelButton.setFont(font)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(":/Other/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.CancelButton.setIcon(icon2)
self.CancelButton.setObjectName("CancelButton")
self.horizontalLayout.addWidget(self.CancelButton)
self.EditorFrame = QtWidgets.QFrame(MetaEditorDialog)
self.EditorFrame.setGeometry(QtCore.QRect(10, 10, 381, 211))
self.EditorFrame.setObjectName("EditorFrame")
self.formLayoutWidget = QtWidgets.QWidget(self.EditorFrame)
self.formLayoutWidget.setGeometry(QtCore.QRect(0, 0, 381, 211))
self.formLayoutWidget.setObjectName("formLayoutWidget")
self.formLayout = QtWidgets.QFormLayout(self.formLayoutWidget)
self.formLayout.setContentsMargins(0, 0, 0, 0)
self.formLayout.setObjectName("formLayout")
self.label = QtWidgets.QLabel(self.formLayoutWidget)
self.label.setObjectName("label")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label)
self.SeriesLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.SeriesLine.setObjectName("SeriesLine")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.SeriesLine)
self.label_2 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_2.setObjectName("label_2")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_2)
self.VolumeLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.VolumeLine.setObjectName("VolumeLine")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.VolumeLine)
self.label_3 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_3.setObjectName("label_3")
self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_3)
self.NumberLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.NumberLine.setObjectName("NumberLine")
self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.NumberLine)
self.label_4 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_4.setObjectName("label_4")
self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_4)
self.WriterLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.WriterLine.setObjectName("WriterLine")
self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.WriterLine)
self.label_5 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_5.setObjectName("label_5")
self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.label_5)
self.PencillerLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.PencillerLine.setObjectName("PencillerLine")
self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.PencillerLine)
self.label_6 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_6.setObjectName("label_6")
self.formLayout.setWidget(6, QtWidgets.QFormLayout.LabelRole, self.label_6)
self.InkerLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.InkerLine.setObjectName("InkerLine")
self.formLayout.setWidget(6, QtWidgets.QFormLayout.FieldRole, self.InkerLine)
self.label_7 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_7.setObjectName("label_7")
self.formLayout.setWidget(7, QtWidgets.QFormLayout.LabelRole, self.label_7)
self.ColoristLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.ColoristLine.setObjectName("ColoristLine")
self.formLayout.setWidget(7, QtWidgets.QFormLayout.FieldRole, self.ColoristLine)
self.label_8 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_8.setTextFormat(QtCore.Qt.RichText)
self.label_8.setOpenExternalLinks(True)
self.label_8.setObjectName("label_8")
self.formLayout.setWidget(8, QtWidgets.QFormLayout.LabelRole, self.label_8)
self.MUidLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.MUidLine.setObjectName("MUidLine")
self.formLayout.setWidget(8, QtWidgets.QFormLayout.FieldRole, self.MUidLine)
self.retranslateUi(MetaEditorDialog)
QtCore.QMetaObject.connectSlotsByName(MetaEditorDialog)
def retranslateUi(self, MetaEditorDialog):
_translate = QtCore.QCoreApplication.translate
MetaEditorDialog.setWindowTitle(_translate("MetaEditorDialog", "Metadata editor"))
self.OKButton.setText(_translate("MetaEditorDialog", "Save"))
self.CancelButton.setText(_translate("MetaEditorDialog", "Cancel"))
self.label.setText(_translate("MetaEditorDialog", "Series:"))
self.label_2.setText(_translate("MetaEditorDialog", "Volume:"))
self.label_3.setText(_translate("MetaEditorDialog", "Number:"))
self.label_4.setText(_translate("MetaEditorDialog", "Writer:"))
self.label_5.setText(_translate("MetaEditorDialog", "Penciller:"))
self.label_6.setText(_translate("MetaEditorDialog", "Inker:"))
self.label_7.setText(_translate("MetaEditorDialog", "Colorist:"))
self.label_8.setText(_translate("MetaEditorDialog", "<html><head/><body><p><a href=\"https://github.com/ciromattia/kcc/wiki/Manga-Cover-Database-support\"><span style=\" text-decoration: underline; color:#0000ff;\">MUid:</span></a></p></body></html>"))
from . import KCC_rc

View File

@@ -1,148 +0,0 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'gui/MetaEditor-Linux.ui'
#
# Created: Wed Oct 28 08:59:02 2015
# by: PyQt5 UI code generator 5.2.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MetaEditorDialog(object):
def setupUi(self, MetaEditorDialog):
MetaEditorDialog.setObjectName("MetaEditorDialog")
MetaEditorDialog.resize(400, 290)
MetaEditorDialog.setMinimumSize(QtCore.QSize(400, 290))
MetaEditorDialog.setMaximumSize(QtCore.QSize(400, 290))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/Icon/icons/comic2ebook.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MetaEditorDialog.setWindowIcon(icon)
self.horizontalLayoutWidget = QtWidgets.QWidget(MetaEditorDialog)
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(10, 250, 381, 31))
self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.StatusLabel = QtWidgets.QLabel(self.horizontalLayoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.StatusLabel.sizePolicy().hasHeightForWidth())
self.StatusLabel.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(9)
font.setBold(True)
font.setWeight(75)
self.StatusLabel.setFont(font)
self.StatusLabel.setStyleSheet("color: rgb(255, 0, 0);")
self.StatusLabel.setObjectName("StatusLabel")
self.horizontalLayout.addWidget(self.StatusLabel)
self.OKButton = QtWidgets.QPushButton(self.horizontalLayoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.OKButton.sizePolicy().hasHeightForWidth())
self.OKButton.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.OKButton.setFont(font)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/Other/icons/convert.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.OKButton.setIcon(icon1)
self.OKButton.setObjectName("OKButton")
self.horizontalLayout.addWidget(self.OKButton)
self.CancelButton = QtWidgets.QPushButton(self.horizontalLayoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.CancelButton.sizePolicy().hasHeightForWidth())
self.CancelButton.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.CancelButton.setFont(font)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(":/Other/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.CancelButton.setIcon(icon2)
self.CancelButton.setObjectName("CancelButton")
self.horizontalLayout.addWidget(self.CancelButton)
self.EditorFrame = QtWidgets.QFrame(MetaEditorDialog)
self.EditorFrame.setGeometry(QtCore.QRect(10, 10, 381, 241))
self.EditorFrame.setObjectName("EditorFrame")
self.formLayoutWidget = QtWidgets.QWidget(self.EditorFrame)
self.formLayoutWidget.setGeometry(QtCore.QRect(0, 0, 381, 266))
self.formLayoutWidget.setObjectName("formLayoutWidget")
self.formLayout = QtWidgets.QFormLayout(self.formLayoutWidget)
self.formLayout.setContentsMargins(0, 0, 0, 0)
self.formLayout.setObjectName("formLayout")
self.label = QtWidgets.QLabel(self.formLayoutWidget)
self.label.setObjectName("label")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label)
self.SeriesLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.SeriesLine.setObjectName("SeriesLine")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.SeriesLine)
self.label_2 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_2.setObjectName("label_2")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_2)
self.VolumeLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.VolumeLine.setObjectName("VolumeLine")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.VolumeLine)
self.label_3 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_3.setObjectName("label_3")
self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_3)
self.NumberLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.NumberLine.setObjectName("NumberLine")
self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.NumberLine)
self.label_4 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_4.setObjectName("label_4")
self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_4)
self.WriterLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.WriterLine.setObjectName("WriterLine")
self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.WriterLine)
self.label_5 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_5.setObjectName("label_5")
self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.label_5)
self.PencillerLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.PencillerLine.setObjectName("PencillerLine")
self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.PencillerLine)
self.label_6 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_6.setObjectName("label_6")
self.formLayout.setWidget(6, QtWidgets.QFormLayout.LabelRole, self.label_6)
self.InkerLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.InkerLine.setObjectName("InkerLine")
self.formLayout.setWidget(6, QtWidgets.QFormLayout.FieldRole, self.InkerLine)
self.label_7 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_7.setObjectName("label_7")
self.formLayout.setWidget(7, QtWidgets.QFormLayout.LabelRole, self.label_7)
self.ColoristLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.ColoristLine.setObjectName("ColoristLine")
self.formLayout.setWidget(7, QtWidgets.QFormLayout.FieldRole, self.ColoristLine)
self.label_8 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_8.setTextFormat(QtCore.Qt.RichText)
self.label_8.setOpenExternalLinks(True)
self.label_8.setObjectName("label_8")
self.formLayout.setWidget(8, QtWidgets.QFormLayout.LabelRole, self.label_8)
self.MUidLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.MUidLine.setObjectName("MUidLine")
self.formLayout.setWidget(8, QtWidgets.QFormLayout.FieldRole, self.MUidLine)
self.retranslateUi(MetaEditorDialog)
QtCore.QMetaObject.connectSlotsByName(MetaEditorDialog)
def retranslateUi(self, MetaEditorDialog):
_translate = QtCore.QCoreApplication.translate
MetaEditorDialog.setWindowTitle(_translate("MetaEditorDialog", "Metadata editor"))
self.OKButton.setText(_translate("MetaEditorDialog", "Save"))
self.CancelButton.setText(_translate("MetaEditorDialog", "Cancel"))
self.label.setText(_translate("MetaEditorDialog", "Series:"))
self.label_2.setText(_translate("MetaEditorDialog", "Volume:"))
self.label_3.setText(_translate("MetaEditorDialog", "Number:"))
self.label_4.setText(_translate("MetaEditorDialog", "Writer:"))
self.label_5.setText(_translate("MetaEditorDialog", "Penciller:"))
self.label_6.setText(_translate("MetaEditorDialog", "Inker:"))
self.label_7.setText(_translate("MetaEditorDialog", "Colorist:"))
self.label_8.setText(_translate("MetaEditorDialog", "<html><head/><body><p><a href=\"https://github.com/ciromattia/kcc/wiki/Manga-Cover-Database-support\"><span style=\" text-decoration: underline; color:#0000ff;\">MUid:</span></a></p></body></html>"))
from . import KCC_rc

View File

@@ -1,149 +0,0 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/Users/pawelj/Documents/KCC/gui/MetaEditor.ui'
#
# Created: Sun Feb 8 12:47:09 2015
# by: PyQt5 UI code generator 5.4
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MetaEditorDialog(object):
def setupUi(self, MetaEditorDialog):
MetaEditorDialog.setObjectName("MetaEditorDialog")
MetaEditorDialog.resize(400, 295)
MetaEditorDialog.setMinimumSize(QtCore.QSize(400, 295))
MetaEditorDialog.setMaximumSize(QtCore.QSize(400, 295))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/Icon/icons/comic2ebook.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MetaEditorDialog.setWindowIcon(icon)
self.horizontalLayoutWidget = QtWidgets.QWidget(MetaEditorDialog)
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(10, 260, 381, 32))
self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.StatusLabel = QtWidgets.QLabel(self.horizontalLayoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.StatusLabel.sizePolicy().hasHeightForWidth())
self.StatusLabel.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(True)
font.setWeight(75)
self.StatusLabel.setFont(font)
self.StatusLabel.setStyleSheet("color: rgb(255, 0, 0);")
self.StatusLabel.setObjectName("StatusLabel")
self.horizontalLayout.addWidget(self.StatusLabel)
self.OKButton = QtWidgets.QPushButton(self.horizontalLayoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.OKButton.sizePolicy().hasHeightForWidth())
self.OKButton.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.OKButton.setFont(font)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/Other/icons/convert.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.OKButton.setIcon(icon1)
self.OKButton.setObjectName("OKButton")
self.horizontalLayout.addWidget(self.OKButton)
self.CancelButton = QtWidgets.QPushButton(self.horizontalLayoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.CancelButton.sizePolicy().hasHeightForWidth())
self.CancelButton.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.CancelButton.setFont(font)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(":/Other/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.CancelButton.setIcon(icon2)
self.CancelButton.setObjectName("CancelButton")
self.horizontalLayout.addWidget(self.CancelButton)
self.EditorFrame = QtWidgets.QFrame(MetaEditorDialog)
self.EditorFrame.setGeometry(QtCore.QRect(10, 10, 381, 251))
self.EditorFrame.setObjectName("EditorFrame")
self.formLayoutWidget = QtWidgets.QWidget(self.EditorFrame)
self.formLayoutWidget.setGeometry(QtCore.QRect(0, 0, 381, 250))
self.formLayoutWidget.setObjectName("formLayoutWidget")
self.formLayout = QtWidgets.QFormLayout(self.formLayoutWidget)
self.formLayout.setContentsMargins(0, 0, 0, 0)
self.formLayout.setFieldGrowthPolicy(QtWidgets.QFormLayout.ExpandingFieldsGrow)
self.formLayout.setObjectName("formLayout")
self.label = QtWidgets.QLabel(self.formLayoutWidget)
self.label.setObjectName("label")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label)
self.SeriesLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.SeriesLine.setObjectName("SeriesLine")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.SeriesLine)
self.label_2 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_2.setObjectName("label_2")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_2)
self.VolumeLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.VolumeLine.setObjectName("VolumeLine")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.VolumeLine)
self.label_3 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_3.setObjectName("label_3")
self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_3)
self.NumberLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.NumberLine.setObjectName("NumberLine")
self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.NumberLine)
self.label_4 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_4.setObjectName("label_4")
self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_4)
self.WriterLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.WriterLine.setObjectName("WriterLine")
self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.WriterLine)
self.label_5 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_5.setObjectName("label_5")
self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.label_5)
self.PencillerLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.PencillerLine.setObjectName("PencillerLine")
self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.PencillerLine)
self.label_6 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_6.setObjectName("label_6")
self.formLayout.setWidget(6, QtWidgets.QFormLayout.LabelRole, self.label_6)
self.InkerLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.InkerLine.setObjectName("InkerLine")
self.formLayout.setWidget(6, QtWidgets.QFormLayout.FieldRole, self.InkerLine)
self.label_7 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_7.setObjectName("label_7")
self.formLayout.setWidget(7, QtWidgets.QFormLayout.LabelRole, self.label_7)
self.ColoristLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.ColoristLine.setObjectName("ColoristLine")
self.formLayout.setWidget(7, QtWidgets.QFormLayout.FieldRole, self.ColoristLine)
self.label_8 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_8.setTextFormat(QtCore.Qt.RichText)
self.label_8.setOpenExternalLinks(True)
self.label_8.setObjectName("label_8")
self.formLayout.setWidget(8, QtWidgets.QFormLayout.LabelRole, self.label_8)
self.MUidLine = QtWidgets.QLineEdit(self.formLayoutWidget)
self.MUidLine.setObjectName("MUidLine")
self.formLayout.setWidget(8, QtWidgets.QFormLayout.FieldRole, self.MUidLine)
self.retranslateUi(MetaEditorDialog)
QtCore.QMetaObject.connectSlotsByName(MetaEditorDialog)
def retranslateUi(self, MetaEditorDialog):
_translate = QtCore.QCoreApplication.translate
MetaEditorDialog.setWindowTitle(_translate("MetaEditorDialog", "Metadata editor"))
self.OKButton.setText(_translate("MetaEditorDialog", "Save"))
self.CancelButton.setText(_translate("MetaEditorDialog", "Cancel"))
self.label.setText(_translate("MetaEditorDialog", "Series:"))
self.label_2.setText(_translate("MetaEditorDialog", "Volume:"))
self.label_3.setText(_translate("MetaEditorDialog", "Number:"))
self.label_4.setText(_translate("MetaEditorDialog", "Writer:"))
self.label_5.setText(_translate("MetaEditorDialog", "Penciller:"))
self.label_6.setText(_translate("MetaEditorDialog", "Inker:"))
self.label_7.setText(_translate("MetaEditorDialog", "Colorist:"))
self.label_8.setText(_translate("MetaEditorDialog", "<html><head/><body><p><a href=\"https://github.com/ciromattia/kcc/wiki/Manga-Cover-Database-support\"><span style=\" text-decoration: underline; color:#0000ff;\">MUid:</span></a></p></body></html>"))
from . import KCC_rc

View File

@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com> # Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com>
# Copyright (c) 2013-2015 Pawel Jastrzebski <pawelj@iosphe.re> # Copyright (c) 2013-2016 Pawel Jastrzebski <pawelj@iosphe.re>
# #
# Permission to use, copy, modify, and/or distribute this software for # Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the # any purpose with or without fee is hereby granted, provided that the
@@ -32,23 +32,14 @@ from copy import copy
from distutils.version import StrictVersion from distutils.version import StrictVersion
from xml.sax.saxutils import escape from xml.sax.saxutils import escape
from platform import platform from platform import platform
from raven import Client
from .shared import md5Checksum, HTMLStripper, sanitizeTrace from .shared import md5Checksum, HTMLStripper, sanitizeTrace
from . import __version__ from . import __version__
from . import comic2ebook from . import comic2ebook
from . import metadata from . import metadata
from . import kindle from . import kindle
if sys.platform.startswith('darwin'): from . import KCC_ui
from . import KCC_ui_osx as KCC_ui from . import KCC_ui_editor
elif sys.platform.startswith('linux'):
from . import KCC_ui_linux as KCC_ui
else:
from . import KCC_ui
if sys.platform.startswith('darwin'):
from . import KCC_MetaEditor_ui_osx as KCC_MetaEditor_ui
elif sys.platform.startswith('linux'):
from . import KCC_MetaEditor_ui_linux as KCC_MetaEditor_ui
else:
from . import KCC_MetaEditor_ui
class QApplicationMessaging(QtWidgets.QApplication): class QApplicationMessaging(QtWidgets.QApplication):
@@ -257,41 +248,41 @@ class WorkerThread(QtCore.QThread):
argv = '' argv = ''
currentJobs = [] currentJobs = []
options.profile = GUI.profiles[str(GUI.DeviceBox.currentText())]['Label'] options.profile = GUI.profiles[str(GUI.deviceBox.currentText())]['Label']
options.format = str(GUI.FormatBox.currentText()).replace('/AZW3', '') options.format = str(GUI.formatBox.currentText()).replace('/AZW3', '')
if GUI.MangaBox.isChecked(): if GUI.mangaBox.isChecked():
options.righttoleft = True options.righttoleft = True
if GUI.RotateBox.checkState() == 1: if GUI.rotateBox.checkState() == 1:
options.splitter = 2 options.splitter = 2
elif GUI.RotateBox.checkState() == 2: elif GUI.rotateBox.checkState() == 2:
options.splitter = 1 options.splitter = 1
if GUI.QualityBox.isChecked(): if GUI.qualityBox.isChecked():
options.hqmode = True options.hqmode = True
if GUI.WebtoonBox.isChecked(): if GUI.webtoonBox.isChecked():
options.webtoon = True options.webtoon = True
if GUI.UpscaleBox.checkState() == 1: if GUI.upscaleBox.checkState() == 1:
options.stretch = True options.stretch = True
elif GUI.UpscaleBox.checkState() == 2: elif GUI.upscaleBox.checkState() == 2:
options.upscale = True options.upscale = True
if GUI.GammaBox.isChecked() and float(GUI.GammaValue) > 0.09: if GUI.gammaBox.isChecked() and float(GUI.gammaValue) > 0.09:
options.gamma = float(GUI.GammaValue) options.gamma = float(GUI.gammaValue)
if GUI.BorderBox.checkState() == 1: if GUI.borderBox.checkState() == 1:
options.white_borders = True options.white_borders = True
elif GUI.BorderBox.checkState() == 2: elif GUI.borderBox.checkState() == 2:
options.black_borders = True options.black_borders = True
if GUI.NoDitheringBox.isChecked(): if GUI.noDitheringBox.isChecked():
options.forcepng = True options.forcepng = True
if GUI.ColorBox.isChecked(): if GUI.colorBox.isChecked():
options.forcecolor = True options.forcecolor = True
if GUI.currentMode > 2: if GUI.currentMode > 2:
options.customwidth = str(GUI.customWidth.text()) options.customwidth = str(GUI.widthBox.value())
options.customheight = str(GUI.customHeight.text()) options.customheight = str(GUI.heightBox.value())
for i in range(GUI.JobList.count()): for i in range(GUI.jobList.count()):
# Make sure that we don't consider any system message as job to do # Make sure that we don't consider any system message as job to do
if GUI.JobList.item(i).icon().isNull(): if GUI.jobList.item(i).icon().isNull():
currentJobs.append(str(GUI.JobList.item(i).text())) currentJobs.append(str(GUI.jobList.item(i).text()))
GUI.JobList.clear() GUI.jobList.clear()
for job in currentJobs: for job in currentJobs:
sleep(0.5) sleep(0.5)
if not self.conversionAlive: if not self.conversionAlive:
@@ -299,7 +290,7 @@ class WorkerThread(QtCore.QThread):
return return
self.errors = False self.errors = False
MW.addMessage.emit('<b>Source:</b> ' + job, 'info', False) MW.addMessage.emit('<b>Source:</b> ' + job, 'info', False)
if str(GUI.FormatBox.currentText()) == 'CBZ': if str(GUI.formatBox.currentText()) == 'CBZ':
MW.addMessage.emit('Creating CBZ files', 'info', False) MW.addMessage.emit('Creating CBZ files', 'info', False)
GUI.progress.content = 'Creating CBZ files' GUI.progress.content = 'Creating CBZ files'
else: else:
@@ -328,6 +319,8 @@ class WorkerThread(QtCore.QThread):
GUI.progress.content = '' GUI.progress.content = ''
self.errors = True self.errors = True
_, _, traceback = sys.exc_info() _, _, traceback = sys.exc_info()
if ' is corrupted.' not in str(err):
GUI.sentry.captureException()
MW.showDialog.emit("Error during conversion %s:\n\n%s\n\nTraceback:\n%s" MW.showDialog.emit("Error during conversion %s:\n\n%s\n\nTraceback:\n%s"
% (jobargv[-1], str(err), sanitizeTrace(traceback)), 'error') % (jobargv[-1], str(err), sanitizeTrace(traceback)), 'error')
MW.addMessage.emit('Error during conversion! Please consult ' MW.addMessage.emit('Error during conversion! Please consult '
@@ -342,11 +335,11 @@ class WorkerThread(QtCore.QThread):
return return
if not self.errors: if not self.errors:
GUI.progress.content = '' GUI.progress.content = ''
if str(GUI.FormatBox.currentText()) == 'CBZ': if str(GUI.formatBox.currentText()) == 'CBZ':
MW.addMessage.emit('Creating CBZ files... <b>Done!</b>', 'info', True) MW.addMessage.emit('Creating CBZ files... <b>Done!</b>', 'info', True)
else: else:
MW.addMessage.emit('Creating EPUB files... <b>Done!</b>', 'info', True) MW.addMessage.emit('Creating EPUB files... <b>Done!</b>', 'info', True)
if str(GUI.FormatBox.currentText()) == 'MOBI/AZW3': if str(GUI.formatBox.currentText()) == 'MOBI/AZW3':
MW.progressBarTick.emit('Creating MOBI files') MW.progressBarTick.emit('Creating MOBI files')
MW.progressBarTick.emit(str(len(outputPath) * 2 + 1)) MW.progressBarTick.emit(str(len(outputPath) * 2 + 1))
MW.progressBarTick.emit('tick') MW.progressBarTick.emit('tick')
@@ -461,23 +454,23 @@ class SystemTrayIcon(QtWidgets.QSystemTrayIcon):
self.showMessage('Kindle Comic Converter', message, icon) self.showMessage('Kindle Comic Converter', message, icon)
class KCCGUI(KCC_ui.Ui_KCC): class KCCGUI(KCC_ui.Ui_mainWindow):
def selectDir(self): def selectDir(self):
if self.needClean: if self.needClean:
self.needClean = False self.needClean = False
GUI.JobList.clear() GUI.jobList.clear()
dname = QtWidgets.QFileDialog.getExistingDirectory(MW, 'Select directory', self.lastPath) dname = QtWidgets.QFileDialog.getExistingDirectory(MW, 'Select directory', self.lastPath)
if dname != '': if dname != '':
if sys.platform.startswith('win'): if sys.platform.startswith('win'):
dname = dname.replace('/', '\\') dname = dname.replace('/', '\\')
self.lastPath = os.path.abspath(os.path.join(dname, os.pardir)) self.lastPath = os.path.abspath(os.path.join(dname, os.pardir))
GUI.JobList.addItem(dname) GUI.jobList.addItem(dname)
GUI.JobList.scrollToBottom() GUI.jobList.scrollToBottom()
def selectFile(self): def selectFile(self):
if self.needClean: if self.needClean:
self.needClean = False self.needClean = False
GUI.JobList.clear() GUI.jobList.clear()
if self.UnRAR: if self.UnRAR:
if self.sevenza: if self.sevenza:
fnames = QtWidgets.QFileDialog.getOpenFileNames(MW, 'Select file', self.lastPath, fnames = QtWidgets.QFileDialog.getOpenFileNames(MW, 'Select file', self.lastPath,
@@ -497,8 +490,8 @@ class KCCGUI(KCC_ui.Ui_KCC):
if sys.platform.startswith('win'): if sys.platform.startswith('win'):
fname = fname.replace('/', '\\') fname = fname.replace('/', '\\')
self.lastPath = os.path.abspath(os.path.join(fname, os.pardir)) self.lastPath = os.path.abspath(os.path.join(fname, os.pardir))
GUI.JobList.addItem(fname) GUI.jobList.addItem(fname)
GUI.JobList.scrollToBottom() GUI.jobList.scrollToBottom()
def selectFileMetaEditor(self): def selectFileMetaEditor(self):
if self.UnRAR: if self.UnRAR:
@@ -525,13 +518,14 @@ class KCCGUI(KCC_ui.Ui_KCC):
self.editor.loadData(fname) self.editor.loadData(fname)
except Exception as err: except Exception as err:
_, _, traceback = sys.exc_info() _, _, traceback = sys.exc_info()
GUI.sentry.captureException()
self.showDialog("Failed to parse metadata!\n\n%s\n\nTraceback:\n%s" self.showDialog("Failed to parse metadata!\n\n%s\n\nTraceback:\n%s"
% (str(err), sanitizeTrace(traceback)), 'error') % (str(err), sanitizeTrace(traceback)), 'error')
else: else:
self.editor.ui.exec_() self.editor.ui.exec_()
def clearJobs(self): def clearJobs(self):
GUI.JobList.clear() GUI.jobList.clear()
# noinspection PyCallByClass,PyTypeChecker,PyArgumentList # noinspection PyCallByClass,PyTypeChecker,PyArgumentList
def openWiki(self): def openWiki(self):
@@ -540,65 +534,56 @@ class KCCGUI(KCC_ui.Ui_KCC):
def modeChange(self, mode): def modeChange(self, mode):
if mode == 1: if mode == 1:
self.currentMode = 1 self.currentMode = 1
MW.setMaximumSize(QtCore.QSize(420, 335)) GUI.gammaWidget.setVisible(False)
MW.setMinimumSize(QtCore.QSize(420, 335)) GUI.customWidget.setVisible(False)
MW.resize(420, 335)
GUI.OptionsGamma.setVisible(False)
GUI.OptionsCustom.setVisible(False)
elif mode == 2: elif mode == 2:
self.currentMode = 2 self.currentMode = 2
MW.setMaximumSize(QtCore.QSize(420, 365)) GUI.gammaWidget.setVisible(True)
MW.setMinimumSize(QtCore.QSize(420, 365)) GUI.customWidget.setVisible(False)
MW.resize(420, 365)
GUI.OptionsGamma.setVisible(True)
GUI.OptionsCustom.setVisible(False)
elif mode == 3: elif mode == 3:
self.currentMode = 3 self.currentMode = 3
MW.setMaximumSize(QtCore.QSize(420, 390)) GUI.gammaWidget.setVisible(True)
MW.setMinimumSize(QtCore.QSize(420, 390)) GUI.customWidget.setVisible(True)
MW.resize(420, 390)
GUI.OptionsGamma.setVisible(True)
GUI.OptionsCustom.setVisible(True)
def modeConvert(self, enable): def modeConvert(self, enable):
if enable < 1: if enable < 1:
status = False status = False
else: else:
status = True status = True
GUI.EditorButton.setEnabled(status) GUI.editorButton.setEnabled(status)
GUI.WikiButton.setEnabled(status) GUI.wikiButton.setEnabled(status)
GUI.FormatBox.setEnabled(status) GUI.deviceBox.setEnabled(status)
GUI.DirectoryButton.setEnabled(status) GUI.directoryButton.setEnabled(status)
GUI.ClearButton.setEnabled(status) GUI.clearButton.setEnabled(status)
GUI.FileButton.setEnabled(status) GUI.fileButton.setEnabled(status)
GUI.DeviceBox.setEnabled(status) GUI.formatBox.setEnabled(status)
GUI.Options.setEnabled(status) GUI.optionWidget.setEnabled(status)
GUI.OptionsGamma.setEnabled(status) GUI.gammaWidget.setEnabled(status)
GUI.OptionsCustom.setEnabled(status) GUI.customWidget.setEnabled(status)
GUI.ConvertButton.setEnabled(True) GUI.convertButton.setEnabled(True)
if enable == 1: if enable == 1:
self.conversionAlive = False self.conversionAlive = False
self.worker.sync() self.worker.sync()
icon = QtGui.QIcon() icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/Other/icons/convert.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon.addPixmap(QtGui.QPixmap(":/Other/icons/convert.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
GUI.ConvertButton.setIcon(icon) GUI.convertButton.setIcon(icon)
GUI.ConvertButton.setText('Convert') GUI.convertButton.setText('Convert')
GUI.Form.setAcceptDrops(True) GUI.centralWidget.setAcceptDrops(True)
elif enable == 0: elif enable == 0:
self.conversionAlive = True self.conversionAlive = True
self.worker.sync() self.worker.sync()
icon = QtGui.QIcon() icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/Other/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon.addPixmap(QtGui.QPixmap(":/Other/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
GUI.ConvertButton.setIcon(icon) GUI.convertButton.setIcon(icon)
GUI.ConvertButton.setText('Abort') GUI.convertButton.setText('Abort')
GUI.Form.setAcceptDrops(False) GUI.centralWidget.setAcceptDrops(False)
elif enable == -1: elif enable == -1:
self.conversionAlive = True self.conversionAlive = True
self.worker.sync() self.worker.sync()
GUI.ConvertButton.setEnabled(False) GUI.convertButton.setEnabled(False)
GUI.Form.setAcceptDrops(False) GUI.centralWidget.setAcceptDrops(False)
def toggleGammaBox(self, value): def togglegammaBox(self, value):
if value: if value:
if self.currentMode != 3: if self.currentMode != 3:
self.modeChange(2) self.modeChange(2)
@@ -606,58 +591,58 @@ class KCCGUI(KCC_ui.Ui_KCC):
if self.currentMode != 3: if self.currentMode != 3:
self.modeChange(1) self.modeChange(1)
def toggleWebtoonBox(self, value): def togglewebtoonBox(self, value):
if value: if value:
GUI.QualityBox.setEnabled(False) GUI.qualityBox.setEnabled(False)
GUI.QualityBox.setChecked(False) GUI.qualityBox.setChecked(False)
GUI.MangaBox.setEnabled(False) GUI.mangaBox.setEnabled(False)
GUI.MangaBox.setChecked(False) GUI.mangaBox.setChecked(False)
GUI.RotateBox.setEnabled(False) GUI.rotateBox.setEnabled(False)
GUI.RotateBox.setChecked(False) GUI.rotateBox.setChecked(False)
GUI.UpscaleBox.setEnabled(False) GUI.upscaleBox.setEnabled(False)
GUI.UpscaleBox.setChecked(True) GUI.upscaleBox.setChecked(True)
else: else:
GUI.QualityBox.setEnabled(True) GUI.qualityBox.setEnabled(True)
GUI.MangaBox.setEnabled(True) GUI.mangaBox.setEnabled(True)
GUI.RotateBox.setEnabled(True) GUI.rotateBox.setEnabled(True)
GUI.UpscaleBox.setEnabled(True) GUI.upscaleBox.setEnabled(True)
def changeGamma(self, value): def changeGamma(self, value):
value = float(value) valueRaw = int(5 * round(float(value) / 5))
value = '%.2f' % (value / 100) value = '%.2f' % (float(valueRaw) / 100)
if float(value) <= 0.09: if float(value) <= 0.09:
GUI.GammaLabel.setText('Gamma: Auto') GUI.gammaLabel.setText('Gamma: Auto')
else: else:
GUI.GammaLabel.setText('Gamma: ' + str(value)) GUI.gammaLabel.setText('Gamma: ' + str(value))
self.GammaValue = value GUI.gammaSlider.setValue(valueRaw)
self.gammaValue = value
def changeDevice(self): def changeDevice(self):
profile = GUI.profiles[str(GUI.DeviceBox.currentText())] profile = GUI.profiles[str(GUI.deviceBox.currentText())]
if profile['ForceExpert']: if profile['ForceExpert']:
self.modeChange(3) self.modeChange(3)
elif GUI.GammaBox.isChecked(): elif GUI.gammaBox.isChecked():
self.modeChange(2) self.modeChange(2)
else: else:
self.modeChange(1) self.modeChange(1)
self.changeFormat() self.changeFormat()
GUI.GammaSlider.setValue(0) GUI.gammaSlider.setValue(0)
self.changeGamma(0) self.changeGamma(0)
GUI.QualityBox.setEnabled(profile['Quality']) GUI.qualityBox.setEnabled(profile['Quality'])
GUI.upscaleBox.setChecked(profile['DefaultUpscale'])
if not profile['Quality']: if not profile['Quality']:
GUI.QualityBox.setChecked(False) GUI.qualityBox.setChecked(False)
if profile['DefaultUpscale']: if str(GUI.deviceBox.currentText()) == 'Other':
GUI.UpscaleBox.setChecked(True)
if str(GUI.DeviceBox.currentText()) == 'Other':
self.addMessage('<a href="https://github.com/ciromattia/kcc/wiki/NonKindle-devices">' self.addMessage('<a href="https://github.com/ciromattia/kcc/wiki/NonKindle-devices">'
'List of supported Non-Kindle devices.</a>', 'info') 'List of supported Non-Kindle devices.</a>', 'info')
def changeFormat(self, outputFormat=None): def changeFormat(self, outputFormat=None):
profile = GUI.profiles[str(GUI.DeviceBox.currentText())] profile = GUI.profiles[str(GUI.deviceBox.currentText())]
if outputFormat is not None: if outputFormat is not None:
GUI.FormatBox.setCurrentIndex(outputFormat) GUI.formatBox.setCurrentIndex(outputFormat)
else: else:
GUI.FormatBox.setCurrentIndex(profile['DefaultFormat']) GUI.formatBox.setCurrentIndex(profile['DefaultFormat'])
GUI.QualityBox.setEnabled(profile['Quality']) GUI.qualityBox.setEnabled(profile['Quality'])
def stripTags(self, html): def stripTags(self, html):
s = HTMLStripper() s = HTMLStripper()
@@ -667,52 +652,24 @@ class KCCGUI(KCC_ui.Ui_KCC):
def addMessage(self, message, icon, replace=False): def addMessage(self, message, icon, replace=False):
if icon != '': if icon != '':
icon = eval('self.icons.' + icon) icon = eval('self.icons.' + icon)
item = QtWidgets.QListWidgetItem(icon, ' ' + self.stripTags(message)) item = QtWidgets.QListWidgetItem(icon, ' ' + self.stripTags(message))
else: else:
item = QtWidgets.QListWidgetItem(' ' + self.stripTags(message)) item = QtWidgets.QListWidgetItem(' ' + self.stripTags(message))
if replace: if replace:
GUI.JobList.takeItem(GUI.JobList.count() - 1) GUI.jobList.takeItem(GUI.jobList.count() - 1)
# Due to lack of HTML support in QListWidgetItem we overlay text field with QLabel # Due to lack of HTML support in QListWidgetItem we overlay text field with QLabel
# We still fill original text field with transparent content to trigger creation of horizontal scrollbar # We still fill original text field with transparent content to trigger creation of horizontal scrollbar
item.setForeground(QtGui.QColor('transparent')) item.setForeground(QtGui.QColor('transparent'))
label = QtWidgets.QLabel(message) label = QtWidgets.QLabel(message)
label.setStyleSheet('background-image:url('');background-color:rgba(0,0,0,0);') label.setStyleSheet('background-image:url('');background-color:rgba(0,0,0,0);')
label.setOpenExternalLinks(True) label.setOpenExternalLinks(True)
font = QtGui.QFont() GUI.jobList.addItem(item)
font.setPointSize(self.listFontSize) GUI.jobList.setItemWidget(item, label)
label.setFont(font) GUI.jobList.scrollToBottom()
GUI.JobList.addItem(item)
GUI.JobList.setItemWidget(item, label)
GUI.JobList.scrollToBottom()
def showDialog(self, message, kind): def showDialog(self, message, kind):
if kind == 'error': if kind == 'error':
QtWidgets.QMessageBox.critical(MW, 'KCC - Error', message, QtWidgets.QMessageBox.Ok) QtWidgets.QMessageBox.critical(MW, 'KCC - Error', message, QtWidgets.QMessageBox.Ok)
try:
doc = Document()
root = doc.createElement('KCCErrorReport')
doc.appendChild(root)
main = doc.createElement('Timestamp')
root.appendChild(main)
text = doc.createTextNode(datetime.fromtimestamp(time()).strftime('%Y-%m-%d %H:%M:%S'))
main.appendChild(text)
main = doc.createElement('OS')
root.appendChild(main)
text = doc.createTextNode(platform())
main.appendChild(text)
main = doc.createElement('Version')
root.appendChild(main)
text = doc.createTextNode(__version__)
main.appendChild(text)
main = doc.createElement('Error')
root.appendChild(main)
text = doc.createTextNode(message)
main.appendChild(text)
urlopen(Request(url='https://kcc.iosphe.re/ErrorHandle/', data=doc.toxml(encoding='utf-8'),
headers={'Content-Type': 'application/xml',
'User-Agent': 'KindleComicConverter/' + __version__}))
except:
pass
elif kind == 'question': elif kind == 'question':
GUI.versionCheck.setAnswer(QtWidgets.QMessageBox.question(MW, 'KCC - Question', message, GUI.versionCheck.setAnswer(QtWidgets.QMessageBox.question(MW, 'KCC - Question', message,
QtWidgets.QMessageBox.Yes, QtWidgets.QMessageBox.Yes,
@@ -720,19 +677,22 @@ class KCCGUI(KCC_ui.Ui_KCC):
def updateProgressbar(self, command): def updateProgressbar(self, command):
if command == 'tick': if command == 'tick':
GUI.ProgressBar.setValue(GUI.ProgressBar.value() + 1) GUI.progressBar.setValue(GUI.progressBar.value() + 1)
elif command.isdigit(): elif command.isdigit():
GUI.ProgressBar.setMaximum(int(command) - 1) GUI.progressBar.setMaximum(int(command) - 1)
GUI.EditorButton.hide() GUI.toolWidget.hide()
GUI.WikiButton.hide() GUI.progressBar.reset()
GUI.ProgressBar.reset() GUI.progressBar.show()
GUI.ProgressBar.show()
else: else:
GUI.ProgressBar.setFormat(command) GUI.progressBar.setFormat(command)
def hideProgressBar(self):
GUI.progressBar.hide()
GUI.toolWidget.show()
def convertStart(self): def convertStart(self):
if self.conversionAlive: if self.conversionAlive:
GUI.ConvertButton.setEnabled(False) GUI.convertButton.setEnabled(False)
self.addMessage('Process will be interrupted. Please wait.', 'warning') self.addMessage('Process will be interrupted. Please wait.', 'warning')
self.conversionAlive = False self.conversionAlive = False
self.worker.sync() self.worker.sync()
@@ -751,20 +711,20 @@ class KCCGUI(KCC_ui.Ui_KCC):
self.progress.start() self.progress.start()
if self.needClean: if self.needClean:
self.needClean = False self.needClean = False
GUI.JobList.clear() GUI.jobList.clear()
if GUI.JobList.count() == 0: if GUI.jobList.count() == 0:
self.addMessage('No files selected! Please choose files to convert.', 'error') self.addMessage('No files selected! Please choose files to convert.', 'error')
self.needClean = True self.needClean = True
return return
if self.currentMode > 2 and (str(GUI.customWidth.text()) == '' or str(GUI.customHeight.text()) == ''): if self.currentMode > 2 and (GUI.widthBox.value() == 0 or GUI.heightBox.value() == 0):
GUI.JobList.clear() GUI.jobList.clear()
self.addMessage('Target resolution is not set!', 'error') self.addMessage('Target resolution is not set!', 'error')
self.needClean = True self.needClean = True
return return
if str(GUI.FormatBox.currentText()) == 'MOBI/AZW3' and not self.kindleGen: if str(GUI.formatBox.currentText()) == 'MOBI/AZW3' and not self.kindleGen:
self.detectKindleGen() self.detectKindleGen()
if not self.kindleGen: if not self.kindleGen:
GUI.JobList.clear() GUI.jobList.clear()
self.addMessage('Cannot find <a href="http://www.amazon.com/gp/feature.html?ie=UTF8&docId=' self.addMessage('Cannot find <a href="http://www.amazon.com/gp/feature.html?ie=UTF8&docId='
'1000765211"><b>KindleGen</b></a>! MOBI conversion is unavailable!', 'error') '1000765211"><b>KindleGen</b></a>! MOBI conversion is unavailable!', 'error')
if sys.platform.startswith('win'): if sys.platform.startswith('win'):
@@ -777,37 +737,33 @@ class KCCGUI(KCC_ui.Ui_KCC):
return return
self.worker.start() self.worker.start()
def hideProgressBar(self):
GUI.ProgressBar.hide()
GUI.EditorButton.show()
GUI.WikiButton.show()
def saveSettings(self, event): def saveSettings(self, event):
if self.conversionAlive: if self.conversionAlive:
GUI.ConvertButton.setEnabled(False) GUI.convertButton.setEnabled(False)
self.addMessage('Process will be interrupted. Please wait.', 'warning') self.addMessage('Process will be interrupted. Please wait.', 'warning')
self.conversionAlive = False self.conversionAlive = False
self.worker.sync() self.worker.sync()
event.ignore() event.ignore()
if not GUI.ConvertButton.isEnabled(): if not GUI.convertButton.isEnabled():
event.ignore() event.ignore()
self.settings.setValue('settingsVersion', __version__) self.settings.setValue('settingsVersion', __version__)
self.settings.setValue('lastPath', self.lastPath) self.settings.setValue('lastPath', self.lastPath)
self.settings.setValue('lastDevice', GUI.DeviceBox.currentIndex()) self.settings.setValue('lastDevice', GUI.deviceBox.currentIndex())
self.settings.setValue('currentFormat', GUI.FormatBox.currentIndex()) self.settings.setValue('currentFormat', GUI.formatBox.currentIndex())
self.settings.setValue('startNumber', self.startNumber + 1) self.settings.setValue('startNumber', self.startNumber + 1)
self.settings.setValue('options', {'MangaBox': GUI.MangaBox.checkState(), self.settings.setValue('windowSize', str(MW.size().width()) + 'x' + str(MW.size().height()))
'RotateBox': GUI.RotateBox.checkState(), self.settings.setValue('options', {'mangaBox': GUI.mangaBox.checkState(),
'QualityBox': GUI.QualityBox.checkState(), 'rotateBox': GUI.rotateBox.checkState(),
'GammaBox': GUI.GammaBox.checkState(), 'qualityBox': GUI.qualityBox.checkState(),
'UpscaleBox': GUI.UpscaleBox.checkState(), 'gammaBox': GUI.gammaBox.checkState(),
'BorderBox': GUI.BorderBox.checkState(), 'upscaleBox': GUI.upscaleBox.checkState(),
'WebtoonBox': GUI.WebtoonBox.checkState(), 'borderBox': GUI.borderBox.checkState(),
'NoDitheringBox': GUI.NoDitheringBox.checkState(), 'webtoonBox': GUI.webtoonBox.checkState(),
'ColorBox': GUI.ColorBox.checkState(), 'noDitheringBox': GUI.noDitheringBox.checkState(),
'customWidth': GUI.customWidth.text(), 'colorBox': GUI.colorBox.checkState(),
'customHeight': GUI.customHeight.text(), 'widthBox': GUI.widthBox.value(),
'GammaSlider': float(self.GammaValue) * 100}) 'heightBox': GUI.heightBox.value(),
'gammaSlider': float(self.gammaValue) * 100})
self.settings.sync() self.settings.sync()
self.tray.hide() self.tray.hide()
@@ -819,7 +775,7 @@ class KCCGUI(KCC_ui.Ui_KCC):
if not self.conversionAlive and message != 'ARISE': if not self.conversionAlive and message != 'ARISE':
if self.needClean: if self.needClean:
self.needClean = False self.needClean = False
GUI.JobList.clear() GUI.jobList.clear()
if self.UnRAR: if self.UnRAR:
if self.sevenza: if self.sevenza:
formats = ['.cbz', '.cbr', '.cb7', '.zip', '.rar', '.7z', '.pdf'] formats = ['.cbz', '.cbr', '.cb7', '.zip', '.rar', '.7z', '.pdf']
@@ -831,13 +787,13 @@ class KCCGUI(KCC_ui.Ui_KCC):
else: else:
formats = ['.cbz', '.zip', '.pdf'] formats = ['.cbz', '.zip', '.pdf']
if os.path.isdir(message): if os.path.isdir(message):
GUI.JobList.addItem(message) GUI.jobList.addItem(message)
GUI.JobList.scrollToBottom() GUI.jobList.scrollToBottom()
elif os.path.isfile(message): elif os.path.isfile(message):
extension = os.path.splitext(message) extension = os.path.splitext(message)
if extension[1].lower() in formats: if extension[1].lower() in formats:
GUI.JobList.addItem(message) GUI.jobList.addItem(message)
GUI.JobList.scrollToBottom() GUI.jobList.scrollToBottom()
else: else:
self.addMessage('This file type is unsupported!', 'error') self.addMessage('This file type is unsupported!', 'error')
@@ -904,7 +860,8 @@ class KCCGUI(KCC_ui.Ui_KCC):
self.lastDevice = self.settings.value('lastDevice', 0, type=int) self.lastDevice = self.settings.value('lastDevice', 0, type=int)
self.currentFormat = self.settings.value('currentFormat', 0, type=int) self.currentFormat = self.settings.value('currentFormat', 0, type=int)
self.startNumber = self.settings.value('startNumber', 0, type=int) self.startNumber = self.settings.value('startNumber', 0, type=int)
self.options = self.settings.value('options', {'GammaSlider': 0}) self.windowSize = self.settings.value('windowSize', '0x0', type=str)
self.options = self.settings.value('options', {'gammaSlider': 0})
self.worker = WorkerThread() self.worker = WorkerThread()
self.versionCheck = VersionThread() self.versionCheck = VersionThread()
self.progress = ProgressThread() self.progress = ProgressThread()
@@ -912,39 +869,40 @@ class KCCGUI(KCC_ui.Ui_KCC):
self.conversionAlive = False self.conversionAlive = False
self.needClean = True self.needClean = True
self.kindleGen = False self.kindleGen = False
self.GammaValue = 1.0 self.gammaValue = 1.0
self.currentMode = 1 self.currentMode = 1
self.targetDirectory = '' self.targetDirectory = ''
if sys.platform.startswith('darwin'): self.sentry = Client(release=__version__)
self.listFontSize = 11 if sys.platform.startswith('win'):
self.statusBarFontSize = 10
self.statusBarStyle = 'QLabel{padding-top:2px;padding-bottom:3px;}'
self.ProgressBar.setStyleSheet('QProgressBar{font-size:13px;text-align:center;'
'border:2px solid grey;border-radius:5px;}'
'QProgressBar::chunk{background-color:steelblue;width:20px;}')
elif sys.platform.startswith('linux'):
self.listFontSize = 8
self.statusBarFontSize = 8
self.statusBarStyle = 'QLabel{padding-top:3px;padding-bottom:3px;}'
self.statusBar.setStyleSheet('QStatusBar::item{border:0px;border-top:2px solid #C2C7CB;}')
else:
self.listFontSize = 9
self.statusBarFontSize = 8
self.statusBarStyle = 'QLabel{padding-top:3px;padding-bottom:3px}'
self.statusBar.setStyleSheet('QStatusBar::item{border:0px;border-top:2px solid #C2C7CB;}')
# Decrease priority to increase system responsiveness during conversion
from psutil import BELOW_NORMAL_PRIORITY_CLASS from psutil import BELOW_NORMAL_PRIORITY_CLASS
self.p = Process(os.getpid()) self.p = Process(os.getpid())
self.p.nice(BELOW_NORMAL_PRIORITY_CLASS) self.p.nice(BELOW_NORMAL_PRIORITY_CLASS)
self.p.ionice(1) self.p.ionice(1)
elif sys.platform.startswith('linux'):
APP.setStyle('fusion')
if self.windowSize == '0x0':
MW.resize(500, 500)
elif sys.platform.startswith('darwin'):
GUI.deviceBox.setMinimumSize(QtCore.QSize(0, 0))
GUI.formatBox.setMinimumSize(QtCore.QSize(0, 0))
GUI.directoryButton.setMinimumSize(QtCore.QSize(190, 0))
GUI.fileButton.setMinimumSize(QtCore.QSize(190, 0))
GUI.gridLayout.setContentsMargins(-1, -1, -1, -1)
GUI.toolWidget.setMinimumSize(QtCore.QSize(0, 0))
if self.windowSize == '0x0':
MW.resize(500, 500)
self.profiles = { self.profiles = {
"K. PW 3/Voyage": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 0, "Kindle Oasis": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 0,
'DefaultUpscale': True, 'Label': 'KV'}, 'DefaultUpscale': True, 'Label': 'KV'},
"Kindle Voyage": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 0,
'DefaultUpscale': True, 'Label': 'KV'},
"Kindle PW 3": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 0,
'DefaultUpscale': True, 'Label': 'KV'},
"Kindle PW 1/2": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 0, "Kindle PW 1/2": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 0,
'DefaultUpscale': False, 'Label': 'KPW'}, 'DefaultUpscale': False, 'Label': 'KPW'},
"Kindle": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 0, "Kindle": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 0,
'DefaultUpscale': False, 'Label': 'K345'}, 'DefaultUpscale': False, 'Label': 'K45'},
"Kindle DX/DXG": {'Quality': False, 'ForceExpert': False, 'DefaultFormat': 2, "Kindle DX/DXG": {'Quality': False, 'ForceExpert': False, 'DefaultFormat': 2,
'DefaultUpscale': False, 'Label': 'KDX'}, 'DefaultUpscale': False, 'Label': 'KDX'},
"Kobo Mini/Touch": {'Quality': False, 'ForceExpert': False, 'DefaultFormat': 1, "Kobo Mini/Touch": {'Quality': False, 'ForceExpert': False, 'DefaultFormat': 1,
@@ -964,25 +922,30 @@ class KCCGUI(KCC_ui.Ui_KCC):
"Kindle 1": {'Quality': False, 'ForceExpert': False, 'DefaultFormat': 0, "Kindle 1": {'Quality': False, 'ForceExpert': False, 'DefaultFormat': 0,
'DefaultUpscale': False, 'Label': 'K1'}, 'DefaultUpscale': False, 'Label': 'K1'},
"Kindle 2": {'Quality': False, 'ForceExpert': False, 'DefaultFormat': 0, "Kindle 2": {'Quality': False, 'ForceExpert': False, 'DefaultFormat': 0,
'DefaultUpscale': False, 'Label': 'K2'} 'DefaultUpscale': False, 'Label': 'K2'},
"Kindle 3": {'Quality': False, 'ForceExpert': False, 'DefaultFormat': 0,
'DefaultUpscale': False, 'Label': 'K3'},
} }
profilesGUI = [ profilesGUI = [
"K. PW 3/Voyage", "Kindle Oasis",
"Kindle Voyage",
"Kindle PW 3",
"Kindle PW 1/2", "Kindle PW 1/2",
"Kindle", "Kindle",
"Separator", "Separator",
"Kobo Mini/Touch",
"Kobo Glo",
"Kobo Glo HD",
"Kobo Aura",
"Kobo Aura HD",
"Kobo Aura H2O", "Kobo Aura H2O",
"Kobo Aura HD",
"Kobo Aura",
"Kobo Glo HD",
"Kobo Glo",
"Kobo Mini/Touch",
"Separator", "Separator",
"Other", "Other",
"Separator", "Separator",
"Kindle 1",
"Kindle 2",
"Kindle DX/DXG", "Kindle DX/DXG",
"Kindle 3",
"Kindle 2",
"Kindle 1",
] ]
statusBarLabel = QtWidgets.QLabel('<b><a href="https://kcc.iosphe.re/">HOMEPAGE</a> - <a href="https://github.' statusBarLabel = QtWidgets.QLabel('<b><a href="https://kcc.iosphe.re/">HOMEPAGE</a> - <a href="https://github.'
@@ -990,11 +953,7 @@ class KCCGUI(KCC_ui.Ui_KCC):
'NATE</a> - <a href="http://www.mobileread.com/forums/showthread.php?t=207461' 'NATE</a> - <a href="http://www.mobileread.com/forums/showthread.php?t=207461'
'">FORUM</a></b>') '">FORUM</a></b>')
statusBarLabel.setAlignment(QtCore.Qt.AlignCenter) statusBarLabel.setAlignment(QtCore.Qt.AlignCenter)
statusBarLabel.setStyleSheet(self.statusBarStyle)
statusBarLabel.setOpenExternalLinks(True) statusBarLabel.setOpenExternalLinks(True)
statusBarLabelFont = QtGui.QFont()
statusBarLabelFont.setPointSize(self.statusBarFontSize)
statusBarLabel.setFont(statusBarLabelFont)
GUI.statusBar.addPermanentWidget(statusBarLabel, 1) GUI.statusBar.addPermanentWidget(statusBarLabel, 1)
self.addMessage('<b>Welcome!</b>', 'info') self.addMessage('<b>Welcome!</b>', 'info')
@@ -1022,17 +981,17 @@ class KCCGUI(KCC_ui.Ui_KCC):
self.detectKindleGen(True) self.detectKindleGen(True)
APP.messageFromOtherInstance.connect(self.handleMessage) APP.messageFromOtherInstance.connect(self.handleMessage)
GUI.DirectoryButton.clicked.connect(self.selectDir) GUI.directoryButton.clicked.connect(self.selectDir)
GUI.ClearButton.clicked.connect(self.clearJobs) GUI.clearButton.clicked.connect(self.clearJobs)
GUI.FileButton.clicked.connect(self.selectFile) GUI.fileButton.clicked.connect(self.selectFile)
GUI.EditorButton.clicked.connect(self.selectFileMetaEditor) GUI.editorButton.clicked.connect(self.selectFileMetaEditor)
GUI.WikiButton.clicked.connect(self.openWiki) GUI.wikiButton.clicked.connect(self.openWiki)
GUI.ConvertButton.clicked.connect(self.convertStart) GUI.convertButton.clicked.connect(self.convertStart)
GUI.GammaSlider.valueChanged.connect(self.changeGamma) GUI.gammaSlider.valueChanged.connect(self.changeGamma)
GUI.GammaBox.stateChanged.connect(self.toggleGammaBox) GUI.gammaBox.stateChanged.connect(self.togglegammaBox)
GUI.WebtoonBox.stateChanged.connect(self.toggleWebtoonBox) GUI.webtoonBox.stateChanged.connect(self.togglewebtoonBox)
GUI.DeviceBox.activated.connect(self.changeDevice) GUI.deviceBox.activated.connect(self.changeDevice)
GUI.FormatBox.activated.connect(self.changeFormat) GUI.formatBox.activated.connect(self.changeFormat)
MW.progressBarTick.connect(self.updateProgressbar) MW.progressBarTick.connect(self.updateProgressbar)
MW.modeConvert.connect(self.modeConvert) MW.modeConvert.connect(self.modeConvert)
MW.addMessage.connect(self.addMessage) MW.addMessage.connect(self.addMessage)
@@ -1042,40 +1001,40 @@ class KCCGUI(KCC_ui.Ui_KCC):
MW.closeEvent = self.saveSettings MW.closeEvent = self.saveSettings
MW.addTrayMessage.connect(self.tray.addTrayMessage) MW.addTrayMessage.connect(self.tray.addTrayMessage)
GUI.Form.setAcceptDrops(True) GUI.centralWidget.setAcceptDrops(True)
GUI.Form.dragEnterEvent = self.dragAndDrop GUI.centralWidget.dragEnterEvent = self.dragAndDrop
GUI.Form.dropEvent = self.dragAndDropAccepted GUI.centralWidget.dropEvent = self.dragAndDropAccepted
self.modeChange(1) self.modeChange(1)
for profile in profilesGUI: for profile in profilesGUI:
if profile == "Other": if profile == "Other":
GUI.DeviceBox.addItem(self.icons.deviceOther, profile) GUI.deviceBox.addItem(self.icons.deviceOther, profile)
elif profile == "Separator": elif profile == "Separator":
GUI.DeviceBox.insertSeparator(GUI.DeviceBox.count() + 1) GUI.deviceBox.insertSeparator(GUI.deviceBox.count() + 1)
elif 'Ko' in profile: elif 'Ko' in profile:
GUI.DeviceBox.addItem(self.icons.deviceKobo, profile) GUI.deviceBox.addItem(self.icons.deviceKobo, profile)
else: else:
GUI.DeviceBox.addItem(self.icons.deviceKindle, profile) GUI.deviceBox.addItem(self.icons.deviceKindle, profile)
for f in ['MOBI/AZW3', 'EPUB', 'CBZ']: for f in ['MOBI/AZW3', 'EPUB', 'CBZ']:
GUI.FormatBox.addItem(eval('self.icons.' + f.replace('/AZW3', '') + 'Format'), f) GUI.formatBox.addItem(eval('self.icons.' + f.replace('/AZW3', '') + 'Format'), f)
if self.lastDevice > GUI.DeviceBox.count(): if self.lastDevice > GUI.deviceBox.count():
self.lastDevice = 0 self.lastDevice = 0
if profilesGUI[self.lastDevice] == "Separator": if profilesGUI[self.lastDevice] == "Separator":
self.lastDevice = 0 self.lastDevice = 0
if self.currentFormat > GUI.FormatBox.count(): if self.currentFormat > GUI.formatBox.count():
self.currentFormat = 0 self.currentFormat = 0
GUI.DeviceBox.setCurrentIndex(self.lastDevice) GUI.deviceBox.setCurrentIndex(self.lastDevice)
self.changeDevice() self.changeDevice()
if self.currentFormat != self.profiles[str(GUI.DeviceBox.currentText())]['DefaultFormat']: if self.currentFormat != self.profiles[str(GUI.deviceBox.currentText())]['DefaultFormat']:
self.changeFormat(self.currentFormat) self.changeFormat(self.currentFormat)
for option in self.options: for option in self.options:
if str(option) == "customWidth": if str(option) == "widthBox":
GUI.customWidth.setText(str(self.options[option])) GUI.widthBox.setValue(int(self.options[option]))
elif str(option) == "customHeight": elif str(option) == "heightBox":
GUI.customHeight.setText(str(self.options[option])) GUI.heightBox.setValue(int(self.options[option]))
elif str(option) == "GammaSlider": elif str(option) == "gammaSlider":
if GUI.GammaSlider.isEnabled(): if GUI.gammaSlider.isEnabled():
GUI.GammaSlider.setValue(int(self.options[option])) GUI.gammaSlider.setValue(int(self.options[option]))
self.changeGamma(int(self.options[option])) self.changeGamma(int(self.options[option]))
else: else:
try: try:
@@ -1083,59 +1042,63 @@ class KCCGUI(KCC_ui.Ui_KCC):
eval('GUI.' + str(option)).setCheckState(self.options[option]) eval('GUI.' + str(option)).setCheckState(self.options[option])
except AttributeError: except AttributeError:
pass pass
self.hideProgressBar()
self.worker.sync() self.worker.sync()
self.versionCheck.start() self.versionCheck.start()
self.tray.show() self.tray.show()
# Linux hack as PyQt 5.5 not hit mainstream distributions yet if self.windowSize != '0x0':
if sys.platform.startswith('linux') and StrictVersion(QtCore.qVersion()) > StrictVersion('5.4.9'): x, y = self.windowSize.split('x')
self.JobList.setVerticalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel) MW.resize(int(x), int(y))
self.JobList.setHorizontalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel)
MW.setWindowTitle("Kindle Comic Converter " + __version__) MW.setWindowTitle("Kindle Comic Converter " + __version__)
MW.show() MW.show()
MW.raise_() MW.raise_()
class KCCGUI_MetaEditor(KCC_MetaEditor_ui.Ui_MetaEditorDialog): class KCCGUI_MetaEditor(KCC_ui_editor.Ui_editorDialog):
def loadData(self, file): def loadData(self, file):
self.parser = metadata.MetadataParser(file) self.parser = metadata.MetadataParser(file)
if self.parser.compressor == 'rar': if self.parser.compressor == 'rar':
self.EditorFrame.setEnabled(False) self.editorWidget.setEnabled(False)
self.OKButton.setEnabled(False) self.okButton.setEnabled(False)
self.StatusLabel.setText('CBR metadata are read-only.') self.statusLabel.setText('CBR metadata are read-only.')
else: else:
self.EditorFrame.setEnabled(True) self.editorWidget.setEnabled(True)
self.OKButton.setEnabled(True) self.okButton.setEnabled(True)
self.StatusLabel.setText('Separate authors with a comma.') self.statusLabel.setText('Separate authors with a comma.')
for field in (self.SeriesLine, self.VolumeLine, self.NumberLine, self.MUidLine): for field in (self.seriesLine, self.volumeLine, self.numberLine, self.muidLine):
field.setText(self.parser.data[field.objectName()[:-4]]) if field.objectName() == 'muidLine':
for field in (self.WriterLine, self.PencillerLine, self.InkerLine, self.ColoristLine): field.setText(self.parser.data['MUid'])
field.setText(', '.join(self.parser.data[field.objectName()[:-4] + 's'])) else:
if self.SeriesLine.text() == '': field.setText(self.parser.data[field.objectName().capitalize()[:-4]])
self.SeriesLine.setText(file.split('\\')[-1].split('/')[-1].split('.')[0]) for field in (self.writerLine, self.pencillerLine, self.inkerLine, self.coloristLine):
field.setText(', '.join(self.parser.data[field.objectName().capitalize()[:-4] + 's']))
if self.seriesLine.text() == '':
self.seriesLine.setText(file.split('\\')[-1].split('/')[-1].split('.')[0])
def saveData(self): def saveData(self):
for field in (self.VolumeLine, self.NumberLine, self.MUidLine): for field in (self.volumeLine, self.numberLine, self.muidLine):
if field.text().isnumeric() or self.cleanData(field.text()) == '': if field.text().isnumeric() or self.cleanData(field.text()) == '':
self.parser.data[field.objectName()[:-4]] = self.cleanData(field.text()) if field.objectName() == 'muidLine':
self.parser.data['MUid'] = self.cleanData(field.text())
else:
self.parser.data[field.objectName().capitalize()[:-4]] = self.cleanData(field.text())
else: else:
self.StatusLabel.setText(field.objectName()[:-4] + ' field must be a number.') self.statusLabel.setText(field.objectName().capitalize()[:-4] + ' field must be a number.')
break break
else: else:
self.parser.data['Series'] = self.cleanData(self.SeriesLine.text()) self.parser.data['Series'] = self.cleanData(self.seriesLine.text())
for field in (self.WriterLine, self.PencillerLine, self.InkerLine, self.ColoristLine): for field in (self.writerLine, self.pencillerLine, self.inkerLine, self.coloristLine):
values = self.cleanData(field.text()).split(',') values = self.cleanData(field.text()).split(',')
tmpData = [] tmpData = []
for value in values: for value in values:
if self.cleanData(value) != '': if self.cleanData(value) != '':
tmpData.append(self.cleanData(value)) tmpData.append(self.cleanData(value))
self.parser.data[field.objectName()[:-4] + 's'] = tmpData self.parser.data[field.objectName().capitalize()[:-4] + 's'] = tmpData
try: try:
self.parser.saveXML() self.parser.saveXML()
except Exception as err: except Exception as err:
_, _, traceback = sys.exc_info() _, _, traceback = sys.exc_info()
GUI.sentry.captureException()
GUI.showDialog("Failed to save metadata!\n\n%s\n\nTraceback:\n%s" GUI.showDialog("Failed to save metadata!\n\n%s\n\nTraceback:\n%s"
% (str(err), sanitizeTrace(traceback)), 'error') % (str(err), sanitizeTrace(traceback)), 'error')
self.ui.close() self.ui.close()
@@ -1148,5 +1111,11 @@ class KCCGUI_MetaEditor(KCC_MetaEditor_ui.Ui_MetaEditorDialog):
self.parser = None self.parser = None
self.setupUi(self.ui) self.setupUi(self.ui)
self.ui.setWindowFlags(self.ui.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint) self.ui.setWindowFlags(self.ui.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)
self.OKButton.clicked.connect(self.saveData) self.okButton.clicked.connect(self.saveData)
self.CancelButton.clicked.connect(self.ui.close) self.cancelButton.clicked.connect(self.ui.close)
if sys.platform.startswith('linux'):
self.ui.resize(450, 260)
self.ui.setMinimumSize(QtCore.QSize(450, 260))
elif sys.platform.startswith('darwin'):
self.ui.resize(450, 310)
self.ui.setMinimumSize(QtCore.QSize(450, 310))

File diff suppressed because it is too large Load Diff

View File

@@ -2,313 +2,228 @@
# Form implementation generated from reading ui file 'gui\KCC.ui' # Form implementation generated from reading ui file 'gui\KCC.ui'
# #
# Created by: PyQt5 UI code generator 5.5.1 # Created by: PyQt5 UI code generator 5.6
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_KCC(object): class Ui_mainWindow(object):
def setupUi(self, KCC): def setupUi(self, mainWindow):
KCC.setObjectName("KCC") mainWindow.setObjectName("mainWindow")
KCC.resize(420, 390) mainWindow.resize(450, 450)
KCC.setMinimumSize(QtCore.QSize(420, 390))
KCC.setMaximumSize(QtCore.QSize(420, 390))
font = QtGui.QFont()
font.setPointSize(9)
KCC.setFont(font)
icon = QtGui.QIcon() icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/Icon/icons/comic2ebook.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon.addPixmap(QtGui.QPixmap(":/Icon/icons/comic2ebook.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
KCC.setWindowIcon(icon) mainWindow.setWindowIcon(icon)
KCC.setLocale(QtCore.QLocale(QtCore.QLocale.C, QtCore.QLocale.AnyCountry)) self.centralWidget = QtWidgets.QWidget(mainWindow)
self.Form = QtWidgets.QWidget(KCC) self.centralWidget.setObjectName("centralWidget")
self.Form.setObjectName("Form") self.gridLayout = QtWidgets.QGridLayout(self.centralWidget)
self.DeviceBox = QtWidgets.QComboBox(self.Form) self.gridLayout.setContentsMargins(-1, -1, -1, 5)
self.DeviceBox.setGeometry(QtCore.QRect(10, 200, 141, 31)) self.gridLayout.setObjectName("gridLayout")
font = QtGui.QFont() self.directoryButton = QtWidgets.QPushButton(self.centralWidget)
font.setPointSize(8) self.directoryButton.setMinimumSize(QtCore.QSize(130, 30))
self.DeviceBox.setFont(font)
self.DeviceBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.DeviceBox.setObjectName("DeviceBox")
self.FormatBox = QtWidgets.QComboBox(self.Form)
self.FormatBox.setGeometry(QtCore.QRect(260, 200, 151, 31))
font = QtGui.QFont()
font.setPointSize(8)
self.FormatBox.setFont(font)
self.FormatBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.FormatBox.setObjectName("FormatBox")
self.ConvertButton = QtWidgets.QPushButton(self.Form)
self.ConvertButton.setGeometry(QtCore.QRect(160, 200, 91, 32))
font = QtGui.QFont()
font.setPointSize(9)
font.setBold(True)
font.setWeight(75)
self.ConvertButton.setFont(font)
self.ConvertButton.setFocusPolicy(QtCore.Qt.NoFocus)
icon1 = QtGui.QIcon() icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/Other/icons/convert.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon1.addPixmap(QtGui.QPixmap(":/Other/icons/folder_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.ConvertButton.setIcon(icon1) self.directoryButton.setIcon(icon1)
self.ConvertButton.setObjectName("ConvertButton") self.directoryButton.setObjectName("directoryButton")
self.DirectoryButton = QtWidgets.QPushButton(self.Form) self.gridLayout.addWidget(self.directoryButton, 3, 0, 1, 1)
self.DirectoryButton.setGeometry(QtCore.QRect(10, 160, 141, 32)) self.clearButton = QtWidgets.QPushButton(self.centralWidget)
font = QtGui.QFont() self.clearButton.setMinimumSize(QtCore.QSize(0, 30))
font.setPointSize(8)
self.DirectoryButton.setFont(font)
self.DirectoryButton.setFocusPolicy(QtCore.Qt.NoFocus)
icon2 = QtGui.QIcon() icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(":/Other/icons/folder_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon2.addPixmap(QtGui.QPixmap(":/Other/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.DirectoryButton.setIcon(icon2) self.clearButton.setIcon(icon2)
self.DirectoryButton.setObjectName("DirectoryButton") self.clearButton.setObjectName("clearButton")
self.FileButton = QtWidgets.QPushButton(self.Form) self.gridLayout.addWidget(self.clearButton, 3, 1, 1, 1)
self.FileButton.setGeometry(QtCore.QRect(260, 160, 151, 32)) self.fileButton = QtWidgets.QPushButton(self.centralWidget)
font = QtGui.QFont() self.fileButton.setMinimumSize(QtCore.QSize(130, 30))
font.setPointSize(8)
self.FileButton.setFont(font)
self.FileButton.setFocusPolicy(QtCore.Qt.NoFocus)
icon3 = QtGui.QIcon() icon3 = QtGui.QIcon()
icon3.addPixmap(QtGui.QPixmap(":/Other/icons/document_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon3.addPixmap(QtGui.QPixmap(":/Other/icons/document_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.FileButton.setIcon(icon3) self.fileButton.setIcon(icon3)
self.FileButton.setObjectName("FileButton") self.fileButton.setObjectName("fileButton")
self.ClearButton = QtWidgets.QPushButton(self.Form) self.gridLayout.addWidget(self.fileButton, 3, 2, 1, 1)
self.ClearButton.setGeometry(QtCore.QRect(160, 160, 91, 32)) self.progressBar = QtWidgets.QProgressBar(self.centralWidget)
self.progressBar.setMinimumSize(QtCore.QSize(0, 30))
font = QtGui.QFont() font = QtGui.QFont()
font.setPointSize(8)
self.ClearButton.setFont(font)
self.ClearButton.setFocusPolicy(QtCore.Qt.NoFocus)
icon4 = QtGui.QIcon()
icon4.addPixmap(QtGui.QPixmap(":/Other/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.ClearButton.setIcon(icon4)
self.ClearButton.setObjectName("ClearButton")
self.Options = QtWidgets.QFrame(self.Form)
self.Options.setGeometry(QtCore.QRect(10, 237, 401, 70))
font = QtGui.QFont()
font.setPointSize(9)
self.Options.setFont(font)
self.Options.setObjectName("Options")
self.gridLayout = QtWidgets.QGridLayout(self.Options)
self.gridLayout.setContentsMargins(0, 0, 0, 0)
self.gridLayout.setHorizontalSpacing(40)
self.gridLayout.setVerticalSpacing(5)
self.gridLayout.setObjectName("gridLayout")
self.MangaBox = QtWidgets.QCheckBox(self.Options)
self.MangaBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.MangaBox.setObjectName("MangaBox")
self.gridLayout.addWidget(self.MangaBox, 2, 0, 1, 1)
self.RotateBox = QtWidgets.QCheckBox(self.Options)
self.RotateBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.RotateBox.setTristate(True)
self.RotateBox.setObjectName("RotateBox")
self.gridLayout.addWidget(self.RotateBox, 2, 1, 1, 1)
self.QualityBox = QtWidgets.QCheckBox(self.Options)
self.QualityBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.QualityBox.setObjectName("QualityBox")
self.gridLayout.addWidget(self.QualityBox, 2, 2, 1, 1)
self.GammaBox = QtWidgets.QCheckBox(self.Options)
self.GammaBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.GammaBox.setObjectName("GammaBox")
self.gridLayout.addWidget(self.GammaBox, 4, 2, 1, 1)
self.NoDitheringBox = QtWidgets.QCheckBox(self.Options)
self.NoDitheringBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.NoDitheringBox.setObjectName("NoDitheringBox")
self.gridLayout.addWidget(self.NoDitheringBox, 5, 1, 1, 1)
self.ColorBox = QtWidgets.QCheckBox(self.Options)
self.ColorBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.ColorBox.setObjectName("ColorBox")
self.gridLayout.addWidget(self.ColorBox, 5, 2, 1, 1)
self.UpscaleBox = QtWidgets.QCheckBox(self.Options)
self.UpscaleBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.UpscaleBox.setTristate(True)
self.UpscaleBox.setObjectName("UpscaleBox")
self.gridLayout.addWidget(self.UpscaleBox, 4, 1, 1, 1)
self.WebtoonBox = QtWidgets.QCheckBox(self.Options)
self.WebtoonBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.WebtoonBox.setObjectName("WebtoonBox")
self.gridLayout.addWidget(self.WebtoonBox, 4, 0, 1, 1)
self.BorderBox = QtWidgets.QCheckBox(self.Options)
self.BorderBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.BorderBox.setTristate(True)
self.BorderBox.setObjectName("BorderBox")
self.gridLayout.addWidget(self.BorderBox, 5, 0, 1, 1)
self.JobList = QtWidgets.QListWidget(self.Form)
self.JobList.setGeometry(QtCore.QRect(10, 50, 401, 101))
self.JobList.setFocusPolicy(QtCore.Qt.NoFocus)
self.JobList.setStyleSheet("QListWidget#JobList {background:#ffffff;background-image:url(:/Other/icons/list_background.png);background-position:center center;background-repeat:no-repeat;}QScrollBar:vertical{border:1px solid #999;background:#FFF;width:5px;margin:0}QScrollBar::handle:vertical{background:DarkGray;min-height:0}QScrollBar::add-line:vertical{height:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:vertical{height:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}QScrollBar:horizontal{border:1px solid #999;background:#FFF;height:5px;margin:0}QScrollBar::handle:horizontal{background:DarkGray;min-width:0}QScrollBar::add-line:horizontal{width:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:horizontal{width:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}")
self.JobList.setProperty("showDropIndicator", False)
self.JobList.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection)
self.JobList.setVerticalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel)
self.JobList.setHorizontalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel)
self.JobList.setObjectName("JobList")
self.OptionsGamma = QtWidgets.QFrame(self.Form)
self.OptionsGamma.setEnabled(True)
self.OptionsGamma.setGeometry(QtCore.QRect(10, 305, 401, 35))
font = QtGui.QFont()
font.setPointSize(9)
self.OptionsGamma.setFont(font)
self.OptionsGamma.setObjectName("OptionsGamma")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.OptionsGamma)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setSpacing(15)
self.horizontalLayout.setObjectName("horizontalLayout")
self.GammaLabel = QtWidgets.QLabel(self.OptionsGamma)
self.GammaLabel.setObjectName("GammaLabel")
self.horizontalLayout.addWidget(self.GammaLabel)
self.GammaSlider = QtWidgets.QSlider(self.OptionsGamma)
self.GammaSlider.setFocusPolicy(QtCore.Qt.ClickFocus)
self.GammaSlider.setMaximum(500)
self.GammaSlider.setSingleStep(5)
self.GammaSlider.setOrientation(QtCore.Qt.Horizontal)
self.GammaSlider.setObjectName("GammaSlider")
self.horizontalLayout.addWidget(self.GammaSlider)
self.ProgressBar = QtWidgets.QProgressBar(self.Form)
self.ProgressBar.setGeometry(QtCore.QRect(10, 10, 401, 31))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(True) font.setBold(True)
font.setWeight(75) font.setWeight(75)
self.ProgressBar.setFont(font) self.progressBar.setFont(font)
self.ProgressBar.setProperty("value", 0) self.progressBar.setVisible(False)
self.ProgressBar.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter) self.progressBar.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter)
self.ProgressBar.setFormat("") self.progressBar.setObjectName("progressBar")
self.ProgressBar.setObjectName("ProgressBar") self.gridLayout.addWidget(self.progressBar, 1, 0, 1, 3)
self.OptionsCustom = QtWidgets.QFrame(self.Form) self.deviceBox = QtWidgets.QComboBox(self.centralWidget)
self.OptionsCustom.setGeometry(QtCore.QRect(10, 340, 401, 25)) self.deviceBox.setMinimumSize(QtCore.QSize(0, 28))
self.deviceBox.setObjectName("deviceBox")
self.gridLayout.addWidget(self.deviceBox, 4, 0, 1, 1)
self.convertButton = QtWidgets.QPushButton(self.centralWidget)
self.convertButton.setMinimumSize(QtCore.QSize(0, 30))
font = QtGui.QFont() font = QtGui.QFont()
font.setPointSize(9) font.setBold(True)
self.OptionsCustom.setFont(font) font.setWeight(75)
self.OptionsCustom.setObjectName("OptionsCustom") self.convertButton.setFont(font)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.OptionsCustom) icon4 = QtGui.QIcon()
self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0) icon4.addPixmap(QtGui.QPixmap(":/Other/icons/convert.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.horizontalLayout_2.setSpacing(15) self.convertButton.setIcon(icon4)
self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.convertButton.setObjectName("convertButton")
self.wLabel = QtWidgets.QLabel(self.OptionsCustom) self.gridLayout.addWidget(self.convertButton, 4, 1, 1, 1)
self.wLabel.setObjectName("wLabel") self.formatBox = QtWidgets.QComboBox(self.centralWidget)
self.horizontalLayout_2.addWidget(self.wLabel) self.formatBox.setMinimumSize(QtCore.QSize(0, 28))
self.customWidth = QtWidgets.QLineEdit(self.OptionsCustom) self.formatBox.setObjectName("formatBox")
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) self.gridLayout.addWidget(self.formatBox, 4, 2, 1, 1)
self.jobList = QtWidgets.QListWidget(self.centralWidget)
self.jobList.setStyleSheet("QListWidget#jobList {background:#ffffff;background-image:url(:/Other/icons/list_background.png);background-position:center center;background-repeat:no-repeat;}")
self.jobList.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection)
self.jobList.setVerticalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel)
self.jobList.setHorizontalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel)
self.jobList.setObjectName("jobList")
self.gridLayout.addWidget(self.jobList, 2, 0, 1, 3)
self.customWidget = QtWidgets.QWidget(self.centralWidget)
self.customWidget.setVisible(False)
self.customWidget.setObjectName("customWidget")
self.gridLayout_3 = QtWidgets.QGridLayout(self.customWidget)
self.gridLayout_3.setContentsMargins(0, 0, 0, 0)
self.gridLayout_3.setObjectName("gridLayout_3")
self.hLabel = QtWidgets.QLabel(self.customWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0) sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0) sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.customWidth.sizePolicy().hasHeightForWidth()) sizePolicy.setHeightForWidth(self.hLabel.sizePolicy().hasHeightForWidth())
self.customWidth.setSizePolicy(sizePolicy) self.hLabel.setSizePolicy(sizePolicy)
self.customWidth.setFocusPolicy(QtCore.Qt.ClickFocus)
self.customWidth.setAcceptDrops(False)
self.customWidth.setMaxLength(4)
self.customWidth.setObjectName("customWidth")
self.horizontalLayout_2.addWidget(self.customWidth)
self.hLabel = QtWidgets.QLabel(self.OptionsCustom)
self.hLabel.setObjectName("hLabel") self.hLabel.setObjectName("hLabel")
self.horizontalLayout_2.addWidget(self.hLabel) self.gridLayout_3.addWidget(self.hLabel, 0, 2, 1, 1)
self.customHeight = QtWidgets.QLineEdit(self.OptionsCustom) self.widthBox = QtWidgets.QSpinBox(self.customWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) self.widthBox.setMaximum(2160)
self.widthBox.setObjectName("widthBox")
self.gridLayout_3.addWidget(self.widthBox, 0, 1, 1, 1)
self.wLabel = QtWidgets.QLabel(self.customWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0) sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0) sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.customHeight.sizePolicy().hasHeightForWidth()) sizePolicy.setHeightForWidth(self.wLabel.sizePolicy().hasHeightForWidth())
self.customHeight.setSizePolicy(sizePolicy) self.wLabel.setSizePolicy(sizePolicy)
self.customHeight.setFocusPolicy(QtCore.Qt.ClickFocus) self.wLabel.setObjectName("wLabel")
self.customHeight.setAcceptDrops(False) self.gridLayout_3.addWidget(self.wLabel, 0, 0, 1, 1)
self.customHeight.setMaxLength(4) self.heightBox = QtWidgets.QSpinBox(self.customWidget)
self.customHeight.setObjectName("customHeight") self.heightBox.setMaximum(3840)
self.horizontalLayout_2.addWidget(self.customHeight) self.heightBox.setObjectName("heightBox")
self.EditorButton = QtWidgets.QPushButton(self.Form) self.gridLayout_3.addWidget(self.heightBox, 0, 3, 1, 1)
self.EditorButton.setGeometry(QtCore.QRect(10, 10, 200, 32)) self.gridLayout.addWidget(self.customWidget, 7, 0, 1, 3)
font = QtGui.QFont() self.optionWidget = QtWidgets.QWidget(self.centralWidget)
font.setPointSize(9) self.optionWidget.setObjectName("optionWidget")
self.EditorButton.setFont(font) self.gridLayout_2 = QtWidgets.QGridLayout(self.optionWidget)
self.EditorButton.setFocusPolicy(QtCore.Qt.NoFocus) self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
self.gridLayout_2.setObjectName("gridLayout_2")
self.mangaBox = QtWidgets.QCheckBox(self.optionWidget)
self.mangaBox.setObjectName("mangaBox")
self.gridLayout_2.addWidget(self.mangaBox, 0, 0, 1, 1)
self.rotateBox = QtWidgets.QCheckBox(self.optionWidget)
self.rotateBox.setObjectName("rotateBox")
self.gridLayout_2.addWidget(self.rotateBox, 0, 1, 1, 1)
self.qualityBox = QtWidgets.QCheckBox(self.optionWidget)
self.qualityBox.setObjectName("qualityBox")
self.gridLayout_2.addWidget(self.qualityBox, 0, 2, 1, 1)
self.webtoonBox = QtWidgets.QCheckBox(self.optionWidget)
self.webtoonBox.setObjectName("webtoonBox")
self.gridLayout_2.addWidget(self.webtoonBox, 1, 0, 1, 1)
self.upscaleBox = QtWidgets.QCheckBox(self.optionWidget)
self.upscaleBox.setObjectName("upscaleBox")
self.gridLayout_2.addWidget(self.upscaleBox, 1, 1, 1, 1)
self.gammaBox = QtWidgets.QCheckBox(self.optionWidget)
self.gammaBox.setObjectName("gammaBox")
self.gridLayout_2.addWidget(self.gammaBox, 1, 2, 1, 1)
self.borderBox = QtWidgets.QCheckBox(self.optionWidget)
self.borderBox.setObjectName("borderBox")
self.gridLayout_2.addWidget(self.borderBox, 2, 0, 1, 1)
self.noDitheringBox = QtWidgets.QCheckBox(self.optionWidget)
self.noDitheringBox.setObjectName("noDitheringBox")
self.gridLayout_2.addWidget(self.noDitheringBox, 2, 1, 1, 1)
self.colorBox = QtWidgets.QCheckBox(self.optionWidget)
self.colorBox.setObjectName("colorBox")
self.gridLayout_2.addWidget(self.colorBox, 2, 2, 1, 1)
self.gridLayout.addWidget(self.optionWidget, 5, 0, 1, 3)
self.gammaWidget = QtWidgets.QWidget(self.centralWidget)
self.gammaWidget.setVisible(False)
self.gammaWidget.setObjectName("gammaWidget")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.gammaWidget)
self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.gammaLabel = QtWidgets.QLabel(self.gammaWidget)
self.gammaLabel.setObjectName("gammaLabel")
self.horizontalLayout_2.addWidget(self.gammaLabel)
self.gammaSlider = QtWidgets.QSlider(self.gammaWidget)
self.gammaSlider.setMaximum(250)
self.gammaSlider.setSingleStep(5)
self.gammaSlider.setOrientation(QtCore.Qt.Horizontal)
self.gammaSlider.setObjectName("gammaSlider")
self.horizontalLayout_2.addWidget(self.gammaSlider)
self.gridLayout.addWidget(self.gammaWidget, 6, 0, 1, 3)
self.toolWidget = QtWidgets.QWidget(self.centralWidget)
self.toolWidget.setObjectName("toolWidget")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.toolWidget)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.editorButton = QtWidgets.QPushButton(self.toolWidget)
self.editorButton.setMinimumSize(QtCore.QSize(0, 30))
icon5 = QtGui.QIcon() icon5 = QtGui.QIcon()
icon5.addPixmap(QtGui.QPixmap(":/Other/icons/editor.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon5.addPixmap(QtGui.QPixmap(":/Other/icons/editor.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.EditorButton.setIcon(icon5) self.editorButton.setIcon(icon5)
self.EditorButton.setObjectName("EditorButton") self.editorButton.setObjectName("editorButton")
self.WikiButton = QtWidgets.QPushButton(self.Form) self.horizontalLayout.addWidget(self.editorButton)
self.WikiButton.setGeometry(QtCore.QRect(211, 10, 200, 32)) self.wikiButton = QtWidgets.QPushButton(self.toolWidget)
font = QtGui.QFont() self.wikiButton.setMinimumSize(QtCore.QSize(0, 30))
font.setPointSize(9)
self.WikiButton.setFont(font)
self.WikiButton.setFocusPolicy(QtCore.Qt.NoFocus)
icon6 = QtGui.QIcon() icon6 = QtGui.QIcon()
icon6.addPixmap(QtGui.QPixmap(":/Other/icons/wiki.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon6.addPixmap(QtGui.QPixmap(":/Other/icons/wiki.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.WikiButton.setIcon(icon6) self.wikiButton.setIcon(icon6)
self.WikiButton.setObjectName("WikiButton") self.wikiButton.setObjectName("wikiButton")
self.DeviceBox.raise_() self.horizontalLayout.addWidget(self.wikiButton)
self.FormatBox.raise_() self.gridLayout.addWidget(self.toolWidget, 0, 0, 1, 3)
self.ConvertButton.raise_() mainWindow.setCentralWidget(self.centralWidget)
self.DirectoryButton.raise_() self.statusBar = QtWidgets.QStatusBar(mainWindow)
self.FileButton.raise_()
self.ClearButton.raise_()
self.Options.raise_()
self.JobList.raise_()
self.OptionsGamma.raise_()
self.OptionsCustom.raise_()
self.EditorButton.raise_()
self.WikiButton.raise_()
self.ProgressBar.raise_()
KCC.setCentralWidget(self.Form)
self.statusBar = QtWidgets.QStatusBar(KCC)
font = QtGui.QFont()
font.setFamily("MS Shell Dlg 2")
font.setPointSize(8)
self.statusBar.setFont(font)
self.statusBar.setSizeGripEnabled(False) self.statusBar.setSizeGripEnabled(False)
self.statusBar.setObjectName("statusBar") self.statusBar.setObjectName("statusBar")
KCC.setStatusBar(self.statusBar) mainWindow.setStatusBar(self.statusBar)
self.ActionBasic = QtWidgets.QAction(KCC)
self.ActionBasic.setCheckable(True)
self.ActionBasic.setChecked(False)
font = QtGui.QFont()
font.setPointSize(9)
self.ActionBasic.setFont(font)
self.ActionBasic.setObjectName("ActionBasic")
self.ActionAdvanced = QtWidgets.QAction(KCC)
self.ActionAdvanced.setCheckable(True)
self.ActionAdvanced.setObjectName("ActionAdvanced")
self.retranslateUi(KCC) self.retranslateUi(mainWindow)
QtCore.QMetaObject.connectSlotsByName(KCC) QtCore.QMetaObject.connectSlotsByName(mainWindow)
KCC.setTabOrder(self.DirectoryButton, self.FileButton)
KCC.setTabOrder(self.FileButton, self.ConvertButton)
KCC.setTabOrder(self.ConvertButton, self.ClearButton)
def retranslateUi(self, KCC): def retranslateUi(self, mainWindow):
_translate = QtCore.QCoreApplication.translate _translate = QtCore.QCoreApplication.translate
KCC.setWindowTitle(_translate("KCC", "Kindle Comic Converter")) mainWindow.setWindowTitle(_translate("mainWindow", "Kindle Comic Converter"))
self.DeviceBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Target device.</p></body></html>")) self.directoryButton.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Add directory containing JPG, PNG or GIF files to queue.<br/><span style=\" font-weight:600;\">CBR, CBZ and CB7 files inside will not be processed!</span></p></body></html>"))
self.FormatBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Output format.</p></body></html>")) self.directoryButton.setText(_translate("mainWindow", "Add directory"))
self.ConvertButton.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Shift+Click to select the output directory.</p></body></html>")) self.clearButton.setText(_translate("mainWindow", "Clear list"))
self.ConvertButton.setText(_translate("KCC", "Convert")) self.fileButton.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Add CBR, CBZ, CB7 or PDF file to queue.</p></body></html>"))
self.DirectoryButton.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Add directory containing JPG, PNG or GIF files to queue.<br/><span style=\" font-weight:600;\">CBR, CBZ and CB7 files inside will not be processed!</span></p></body></html>")) self.fileButton.setText(_translate("mainWindow", "Add file"))
self.DirectoryButton.setText(_translate("KCC", "Add directory")) self.deviceBox.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Target device.</p></body></html>"))
self.FileButton.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Add CBR, CBZ, CB7 or PDF file to queue.</p></body></html>")) self.convertButton.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Shift+Click to select the output directory.</p></body></html>"))
self.FileButton.setText(_translate("KCC", "Add file")) self.convertButton.setText(_translate("mainWindow", "Convert"))
self.ClearButton.setText(_translate("KCC", "Clear list")) self.formatBox.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Output format.</p></body></html>"))
self.MangaBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Enable right-to-left reading.</p></body></html>")) self.hLabel.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>"))
self.MangaBox.setText(_translate("KCC", "Manga mode")) self.hLabel.setText(_translate("mainWindow", "Custom height:"))
self.RotateBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Split<br/></span>Double page spreads will be cut into two separate pages.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - Rotate and split<br/></span>Double page spreads will be displayed twice. First rotated and then split. </p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Rotate<br/></span>Double page spreads will be rotated.</p></body></html>")) self.widthBox.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>"))
self.RotateBox.setText(_translate("KCC", "Spread splitter")) self.wLabel.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>"))
self.QualityBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>High quality Panel View.<br/>Require source files with bigger resolution than target device.<br/><span style=\" font-weight:600;\">Highly impact size of output file!</span></p></body></html>")) self.wLabel.setText(_translate("mainWindow", "Custom width:"))
self.QualityBox.setText(_translate("KCC", "HQ zoom")) self.heightBox.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>"))
self.GammaBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Disable automatic gamma correction.</p></body></html>")) self.mangaBox.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Enable right-to-left reading.</p></body></html>"))
self.GammaBox.setText(_translate("KCC", "Custom gamma")) self.mangaBox.setText(_translate("mainWindow", "Manga mode"))
self.NoDitheringBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Create PNG files instead JPEG.<br/>Quality increase is not noticeable on most of devices.<br/>Output files <span style=\" font-weight:600;\">might</span> be smaller.<br/><span style=\" font-weight:600;\">MOBI conversion will be much slower.</span></p></body></html>")) self.rotateBox.setToolTip(_translate("mainWindow", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Split<br/></span>Double page spreads will be cut into two separate pages.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - Rotate and split<br/></span>Double page spreads will be displayed twice. First rotated and then split. </p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Rotate<br/></span>Double page spreads will be rotated.</p></body></html>"))
self.NoDitheringBox.setText(_translate("KCC", "PNG output")) self.rotateBox.setText(_translate("mainWindow", "Spread splitter"))
self.ColorBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Disable conversion to grayscale.</p></body></html>")) self.qualityBox.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>High quality Panel View.<br/>Require source files with bigger resolution than target device.<br/><span style=\" font-weight:600;\">Highly impact size of output file!</span></p></body></html>"))
self.ColorBox.setText(_translate("KCC", "Color mode")) self.qualityBox.setText(_translate("mainWindow", "HQ zoom"))
self.UpscaleBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Nothing<br/></span>Images smaller than device resolution will not be resized.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - Stretching<br/></span>Images smaller than device resolution will be resized. Aspect ratio will be not preserved.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Upscaling<br/></span>Images smaller than device resolution will be resized. Aspect ratio will be preserved.</p></body></html>")) self.webtoonBox.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Enable special parsing mode for Korean Webtoons.</p></body></html>"))
self.UpscaleBox.setText(_translate("KCC", "Stretch/Upscale")) self.webtoonBox.setText(_translate("mainWindow", "Webtoon mode"))
self.WebtoonBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Enable special parsing mode for Korean Webtoons.</p></body></html>")) self.upscaleBox.setToolTip(_translate("mainWindow", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Nothing<br/></span>Images smaller than device resolution will not be resized.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - Stretching<br/></span>Images smaller than device resolution will be resized. Aspect ratio will be not preserved.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Upscaling<br/></span>Images smaller than device resolution will be resized. Aspect ratio will be preserved.</p></body></html>"))
self.WebtoonBox.setText(_translate("KCC", "Webtoon mode")) self.upscaleBox.setText(_translate("mainWindow", "Stretch/Upscale"))
self.BorderBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Autodetection<br/></span>Color of margins fill will be detected automatically.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - White<br/></span>Margins will be filled with white color.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Black<br/></span>Margins will be filled with black color.</p></body></html>")) self.gammaBox.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Disable automatic gamma correction.</p></body></html>"))
self.BorderBox.setText(_translate("KCC", "W/B margins")) self.gammaBox.setText(_translate("mainWindow", "Custom gamma"))
self.GammaLabel.setText(_translate("KCC", "Gamma: Auto")) self.borderBox.setToolTip(_translate("mainWindow", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Autodetection<br/></span>Color of margins fill will be detected automatically.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - White<br/></span>Margins will be filled with white color.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Black<br/></span>Margins will be filled with black color.</p></body></html>"))
self.wLabel.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>")) self.borderBox.setText(_translate("mainWindow", "W/B margins"))
self.wLabel.setText(_translate("KCC", "Custom width: ")) self.noDitheringBox.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Create PNG files instead JPEG.<br/>Quality increase is not noticeable on most of devices.<br/>Output files <span style=\" font-weight:600;\">might</span> be smaller.<br/><span style=\" font-weight:600;\">MOBI conversion will be much slower.</span></p></body></html>"))
self.customWidth.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>")) self.noDitheringBox.setText(_translate("mainWindow", "PNG output"))
self.customWidth.setInputMask(_translate("KCC", "0000")) self.colorBox.setToolTip(_translate("mainWindow", "<html><head/><body><p style=\'white-space:pre\'>Disable conversion to grayscale.</p></body></html>"))
self.hLabel.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>")) self.colorBox.setText(_translate("mainWindow", "Color mode"))
self.hLabel.setText(_translate("KCC", "Custom height: ")) self.gammaLabel.setText(_translate("mainWindow", "Gamma: Auto"))
self.customHeight.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>")) self.editorButton.setText(_translate("mainWindow", "Editor"))
self.customHeight.setInputMask(_translate("KCC", "0000")) self.wikiButton.setText(_translate("mainWindow", "Wiki"))
self.EditorButton.setText(_translate("KCC", "Editor"))
self.WikiButton.setText(_translate("KCC", "Wiki"))
self.ActionBasic.setText(_translate("KCC", "Basic"))
self.ActionAdvanced.setText(_translate("KCC", "Advanced"))
from . import KCC_rc from . import KCC_rc

124
kcc/KCC_ui_editor.py Normal file
View File

@@ -0,0 +1,124 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'gui\MetaEditor.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_editorDialog(object):
def setupUi(self, editorDialog):
editorDialog.setObjectName("editorDialog")
editorDialog.resize(400, 260)
editorDialog.setMinimumSize(QtCore.QSize(400, 260))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/Icon/icons/comic2ebook.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
editorDialog.setWindowIcon(icon)
self.verticalLayout = QtWidgets.QVBoxLayout(editorDialog)
self.verticalLayout.setContentsMargins(-1, -1, -1, 5)
self.verticalLayout.setObjectName("verticalLayout")
self.editorWidget = QtWidgets.QWidget(editorDialog)
self.editorWidget.setObjectName("editorWidget")
self.gridLayout = QtWidgets.QGridLayout(self.editorWidget)
self.gridLayout.setContentsMargins(0, 0, 0, 0)
self.gridLayout.setObjectName("gridLayout")
self.label_1 = QtWidgets.QLabel(self.editorWidget)
self.label_1.setObjectName("label_1")
self.gridLayout.addWidget(self.label_1, 0, 0, 1, 1)
self.seriesLine = QtWidgets.QLineEdit(self.editorWidget)
self.seriesLine.setObjectName("seriesLine")
self.gridLayout.addWidget(self.seriesLine, 0, 1, 1, 1)
self.label_2 = QtWidgets.QLabel(self.editorWidget)
self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
self.volumeLine = QtWidgets.QLineEdit(self.editorWidget)
self.volumeLine.setObjectName("volumeLine")
self.gridLayout.addWidget(self.volumeLine, 1, 1, 1, 1)
self.label_3 = QtWidgets.QLabel(self.editorWidget)
self.label_3.setObjectName("label_3")
self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1)
self.numberLine = QtWidgets.QLineEdit(self.editorWidget)
self.numberLine.setObjectName("numberLine")
self.gridLayout.addWidget(self.numberLine, 2, 1, 1, 1)
self.label_4 = QtWidgets.QLabel(self.editorWidget)
self.label_4.setObjectName("label_4")
self.gridLayout.addWidget(self.label_4, 3, 0, 1, 1)
self.writerLine = QtWidgets.QLineEdit(self.editorWidget)
self.writerLine.setObjectName("writerLine")
self.gridLayout.addWidget(self.writerLine, 3, 1, 1, 1)
self.label_5 = QtWidgets.QLabel(self.editorWidget)
self.label_5.setObjectName("label_5")
self.gridLayout.addWidget(self.label_5, 4, 0, 1, 1)
self.pencillerLine = QtWidgets.QLineEdit(self.editorWidget)
self.pencillerLine.setObjectName("pencillerLine")
self.gridLayout.addWidget(self.pencillerLine, 4, 1, 1, 1)
self.label_6 = QtWidgets.QLabel(self.editorWidget)
self.label_6.setObjectName("label_6")
self.gridLayout.addWidget(self.label_6, 5, 0, 1, 1)
self.inkerLine = QtWidgets.QLineEdit(self.editorWidget)
self.inkerLine.setObjectName("inkerLine")
self.gridLayout.addWidget(self.inkerLine, 5, 1, 1, 1)
self.label_7 = QtWidgets.QLabel(self.editorWidget)
self.label_7.setObjectName("label_7")
self.gridLayout.addWidget(self.label_7, 6, 0, 1, 1)
self.coloristLine = QtWidgets.QLineEdit(self.editorWidget)
self.coloristLine.setObjectName("coloristLine")
self.gridLayout.addWidget(self.coloristLine, 6, 1, 1, 1)
self.label_8 = QtWidgets.QLabel(self.editorWidget)
self.label_8.setOpenExternalLinks(True)
self.label_8.setObjectName("label_8")
self.gridLayout.addWidget(self.label_8, 7, 0, 1, 1)
self.muidLine = QtWidgets.QLineEdit(self.editorWidget)
self.muidLine.setObjectName("muidLine")
self.gridLayout.addWidget(self.muidLine, 7, 1, 1, 1)
self.verticalLayout.addWidget(self.editorWidget)
self.optionWidget = QtWidgets.QWidget(editorDialog)
self.optionWidget.setObjectName("optionWidget")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.optionWidget)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.statusLabel = QtWidgets.QLabel(self.optionWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.statusLabel.sizePolicy().hasHeightForWidth())
self.statusLabel.setSizePolicy(sizePolicy)
self.statusLabel.setText("")
self.statusLabel.setObjectName("statusLabel")
self.horizontalLayout.addWidget(self.statusLabel)
self.okButton = QtWidgets.QPushButton(self.optionWidget)
self.okButton.setMinimumSize(QtCore.QSize(0, 30))
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/Other/icons/convert.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.okButton.setIcon(icon1)
self.okButton.setObjectName("okButton")
self.horizontalLayout.addWidget(self.okButton)
self.cancelButton = QtWidgets.QPushButton(self.optionWidget)
self.cancelButton.setMinimumSize(QtCore.QSize(0, 30))
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(":/Other/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.cancelButton.setIcon(icon2)
self.cancelButton.setObjectName("cancelButton")
self.horizontalLayout.addWidget(self.cancelButton)
self.verticalLayout.addWidget(self.optionWidget)
self.retranslateUi(editorDialog)
QtCore.QMetaObject.connectSlotsByName(editorDialog)
def retranslateUi(self, editorDialog):
_translate = QtCore.QCoreApplication.translate
editorDialog.setWindowTitle(_translate("editorDialog", "Metadata editor"))
self.label_1.setText(_translate("editorDialog", "Series:"))
self.label_2.setText(_translate("editorDialog", "Volume:"))
self.label_3.setText(_translate("editorDialog", "Number:"))
self.label_4.setText(_translate("editorDialog", "Writer:"))
self.label_5.setText(_translate("editorDialog", "Penciller:"))
self.label_6.setText(_translate("editorDialog", "Inker:"))
self.label_7.setText(_translate("editorDialog", "Colorist:"))
self.label_8.setText(_translate("editorDialog", "<html><head/><body><p><a href=\"https://github.com/ciromattia/kcc/wiki/Manga-Cover-Database-support\"><span style=\" text-decoration: underline; color:#0000ff;\">MUid:</span></a></p></body></html>"))
self.okButton.setText(_translate("editorDialog", "Save"))
self.cancelButton.setText(_translate("editorDialog", "Cancel"))
from . import KCC_rc

View File

@@ -1,299 +0,0 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'gui/KCC-Linux.ui'
#
# Created: Wed Oct 28 08:34:21 2015
# by: PyQt5 UI code generator 5.2.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_KCC(object):
def setupUi(self, KCC):
KCC.setObjectName("KCC")
KCC.resize(420, 390)
KCC.setMinimumSize(QtCore.QSize(420, 390))
KCC.setMaximumSize(QtCore.QSize(420, 390))
font = QtGui.QFont()
font.setPointSize(9)
KCC.setFont(font)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/Icon/icons/comic2ebook.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
KCC.setWindowIcon(icon)
KCC.setLocale(QtCore.QLocale(QtCore.QLocale.C, QtCore.QLocale.AnyCountry))
self.Form = QtWidgets.QWidget(KCC)
self.Form.setObjectName("Form")
self.DeviceBox = QtWidgets.QComboBox(self.Form)
self.DeviceBox.setGeometry(QtCore.QRect(10, 200, 141, 31))
font = QtGui.QFont()
font.setPointSize(8)
self.DeviceBox.setFont(font)
self.DeviceBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.DeviceBox.setObjectName("DeviceBox")
self.FormatBox = QtWidgets.QComboBox(self.Form)
self.FormatBox.setGeometry(QtCore.QRect(260, 200, 151, 31))
font = QtGui.QFont()
font.setPointSize(8)
self.FormatBox.setFont(font)
self.FormatBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.FormatBox.setObjectName("FormatBox")
self.ConvertButton = QtWidgets.QPushButton(self.Form)
self.ConvertButton.setGeometry(QtCore.QRect(160, 200, 91, 32))
font = QtGui.QFont()
font.setPointSize(9)
font.setBold(True)
font.setWeight(75)
self.ConvertButton.setFont(font)
self.ConvertButton.setFocusPolicy(QtCore.Qt.NoFocus)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/Other/icons/convert.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.ConvertButton.setIcon(icon1)
self.ConvertButton.setObjectName("ConvertButton")
self.DirectoryButton = QtWidgets.QPushButton(self.Form)
self.DirectoryButton.setGeometry(QtCore.QRect(10, 160, 141, 32))
font = QtGui.QFont()
font.setPointSize(8)
self.DirectoryButton.setFont(font)
self.DirectoryButton.setFocusPolicy(QtCore.Qt.NoFocus)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(":/Other/icons/folder_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.DirectoryButton.setIcon(icon2)
self.DirectoryButton.setObjectName("DirectoryButton")
self.FileButton = QtWidgets.QPushButton(self.Form)
self.FileButton.setGeometry(QtCore.QRect(260, 160, 151, 32))
font = QtGui.QFont()
font.setPointSize(8)
self.FileButton.setFont(font)
self.FileButton.setFocusPolicy(QtCore.Qt.NoFocus)
icon3 = QtGui.QIcon()
icon3.addPixmap(QtGui.QPixmap(":/Other/icons/document_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.FileButton.setIcon(icon3)
self.FileButton.setObjectName("FileButton")
self.ClearButton = QtWidgets.QPushButton(self.Form)
self.ClearButton.setGeometry(QtCore.QRect(160, 160, 91, 32))
font = QtGui.QFont()
font.setPointSize(8)
self.ClearButton.setFont(font)
self.ClearButton.setFocusPolicy(QtCore.Qt.NoFocus)
icon4 = QtGui.QIcon()
icon4.addPixmap(QtGui.QPixmap(":/Other/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.ClearButton.setIcon(icon4)
self.ClearButton.setObjectName("ClearButton")
self.Options = QtWidgets.QFrame(self.Form)
self.Options.setGeometry(QtCore.QRect(10, 237, 401, 70))
font = QtGui.QFont()
font.setPointSize(9)
self.Options.setFont(font)
self.Options.setObjectName("Options")
self.gridLayout = QtWidgets.QGridLayout(self.Options)
self.gridLayout.setContentsMargins(0, 0, 0, 0)
self.gridLayout.setHorizontalSpacing(25)
self.gridLayout.setVerticalSpacing(4)
self.gridLayout.setObjectName("gridLayout")
self.MangaBox = QtWidgets.QCheckBox(self.Options)
self.MangaBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.MangaBox.setObjectName("MangaBox")
self.gridLayout.addWidget(self.MangaBox, 2, 0, 1, 1)
self.RotateBox = QtWidgets.QCheckBox(self.Options)
self.RotateBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.RotateBox.setTristate(True)
self.RotateBox.setObjectName("RotateBox")
self.gridLayout.addWidget(self.RotateBox, 2, 1, 1, 1)
self.QualityBox = QtWidgets.QCheckBox(self.Options)
self.QualityBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.QualityBox.setObjectName("QualityBox")
self.gridLayout.addWidget(self.QualityBox, 2, 2, 1, 1)
self.GammaBox = QtWidgets.QCheckBox(self.Options)
self.GammaBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.GammaBox.setObjectName("GammaBox")
self.gridLayout.addWidget(self.GammaBox, 4, 2, 1, 1)
self.NoDitheringBox = QtWidgets.QCheckBox(self.Options)
self.NoDitheringBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.NoDitheringBox.setObjectName("NoDitheringBox")
self.gridLayout.addWidget(self.NoDitheringBox, 5, 1, 1, 1)
self.ColorBox = QtWidgets.QCheckBox(self.Options)
self.ColorBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.ColorBox.setObjectName("ColorBox")
self.gridLayout.addWidget(self.ColorBox, 5, 2, 1, 1)
self.UpscaleBox = QtWidgets.QCheckBox(self.Options)
self.UpscaleBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.UpscaleBox.setTristate(True)
self.UpscaleBox.setObjectName("UpscaleBox")
self.gridLayout.addWidget(self.UpscaleBox, 4, 1, 1, 1)
self.WebtoonBox = QtWidgets.QCheckBox(self.Options)
self.WebtoonBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.WebtoonBox.setObjectName("WebtoonBox")
self.gridLayout.addWidget(self.WebtoonBox, 4, 0, 1, 1)
self.BorderBox = QtWidgets.QCheckBox(self.Options)
self.BorderBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.BorderBox.setTristate(True)
self.BorderBox.setObjectName("BorderBox")
self.gridLayout.addWidget(self.BorderBox, 5, 0, 1, 1)
self.JobList = QtWidgets.QListWidget(self.Form)
self.JobList.setGeometry(QtCore.QRect(10, 50, 401, 101))
self.JobList.setFocusPolicy(QtCore.Qt.NoFocus)
self.JobList.setStyleSheet("QListWidget#JobList {background:#ffffff;background-image:url(:/Other/icons/list_background.png);background-position:center center;background-repeat:no-repeat;}QScrollBar:vertical{border:1px solid #999;background:#FFF;width:5px;margin:0}QScrollBar::handle:vertical{background:DarkGray;min-height:0}QScrollBar::add-line:vertical{height:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:vertical{height:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}QScrollBar:horizontal{border:1px solid #999;background:#FFF;height:5px;margin:0}QScrollBar::handle:horizontal{background:DarkGray;min-width:0}QScrollBar::add-line:horizontal{width:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:horizontal{width:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}")
self.JobList.setProperty("showDropIndicator", False)
self.JobList.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection)
self.JobList.setIconSize(QtCore.QSize(18, 18))
self.JobList.setObjectName("JobList")
self.OptionsGamma = QtWidgets.QFrame(self.Form)
self.OptionsGamma.setEnabled(True)
self.OptionsGamma.setGeometry(QtCore.QRect(10, 305, 401, 35))
font = QtGui.QFont()
font.setPointSize(9)
self.OptionsGamma.setFont(font)
self.OptionsGamma.setObjectName("OptionsGamma")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.OptionsGamma)
self.horizontalLayout.setSpacing(15)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.GammaLabel = QtWidgets.QLabel(self.OptionsGamma)
self.GammaLabel.setObjectName("GammaLabel")
self.horizontalLayout.addWidget(self.GammaLabel)
self.GammaSlider = QtWidgets.QSlider(self.OptionsGamma)
self.GammaSlider.setFocusPolicy(QtCore.Qt.ClickFocus)
self.GammaSlider.setMaximum(500)
self.GammaSlider.setSingleStep(5)
self.GammaSlider.setOrientation(QtCore.Qt.Horizontal)
self.GammaSlider.setObjectName("GammaSlider")
self.horizontalLayout.addWidget(self.GammaSlider)
self.ProgressBar = QtWidgets.QProgressBar(self.Form)
self.ProgressBar.setGeometry(QtCore.QRect(10, 10, 401, 31))
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(True)
font.setWeight(75)
self.ProgressBar.setFont(font)
self.ProgressBar.setProperty("value", 0)
self.ProgressBar.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter)
self.ProgressBar.setFormat("")
self.ProgressBar.setObjectName("ProgressBar")
self.OptionsCustom = QtWidgets.QFrame(self.Form)
self.OptionsCustom.setGeometry(QtCore.QRect(10, 336, 401, 25))
font = QtGui.QFont()
font.setPointSize(9)
self.OptionsCustom.setFont(font)
self.OptionsCustom.setObjectName("OptionsCustom")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.OptionsCustom)
self.horizontalLayout_2.setSpacing(10)
self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.wLabel = QtWidgets.QLabel(self.OptionsCustom)
self.wLabel.setObjectName("wLabel")
self.horizontalLayout_2.addWidget(self.wLabel)
self.customWidth = QtWidgets.QLineEdit(self.OptionsCustom)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.customWidth.sizePolicy().hasHeightForWidth())
self.customWidth.setSizePolicy(sizePolicy)
self.customWidth.setFocusPolicy(QtCore.Qt.ClickFocus)
self.customWidth.setAcceptDrops(False)
self.customWidth.setMaxLength(4)
self.customWidth.setObjectName("customWidth")
self.horizontalLayout_2.addWidget(self.customWidth)
self.hLabel = QtWidgets.QLabel(self.OptionsCustom)
self.hLabel.setObjectName("hLabel")
self.horizontalLayout_2.addWidget(self.hLabel)
self.customHeight = QtWidgets.QLineEdit(self.OptionsCustom)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.customHeight.sizePolicy().hasHeightForWidth())
self.customHeight.setSizePolicy(sizePolicy)
self.customHeight.setFocusPolicy(QtCore.Qt.ClickFocus)
self.customHeight.setAcceptDrops(False)
self.customHeight.setMaxLength(4)
self.customHeight.setObjectName("customHeight")
self.horizontalLayout_2.addWidget(self.customHeight)
self.EditorButton = QtWidgets.QPushButton(self.Form)
self.EditorButton.setGeometry(QtCore.QRect(10, 10, 200, 32))
font = QtGui.QFont()
font.setPointSize(9)
self.EditorButton.setFont(font)
self.EditorButton.setFocusPolicy(QtCore.Qt.NoFocus)
icon5 = QtGui.QIcon()
icon5.addPixmap(QtGui.QPixmap(":/Other/icons/editor.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.EditorButton.setIcon(icon5)
self.EditorButton.setObjectName("EditorButton")
self.WikiButton = QtWidgets.QPushButton(self.Form)
self.WikiButton.setGeometry(QtCore.QRect(211, 10, 200, 32))
font = QtGui.QFont()
font.setPointSize(9)
self.WikiButton.setFont(font)
self.WikiButton.setFocusPolicy(QtCore.Qt.NoFocus)
icon6 = QtGui.QIcon()
icon6.addPixmap(QtGui.QPixmap(":/Other/icons/wiki.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.WikiButton.setIcon(icon6)
self.WikiButton.setObjectName("WikiButton")
KCC.setCentralWidget(self.Form)
self.statusBar = QtWidgets.QStatusBar(KCC)
font = QtGui.QFont()
font.setPointSize(8)
self.statusBar.setFont(font)
self.statusBar.setSizeGripEnabled(False)
self.statusBar.setObjectName("statusBar")
KCC.setStatusBar(self.statusBar)
self.ActionBasic = QtWidgets.QAction(KCC)
self.ActionBasic.setCheckable(True)
self.ActionBasic.setChecked(False)
font = QtGui.QFont()
self.ActionBasic.setFont(font)
self.ActionBasic.setObjectName("ActionBasic")
self.ActionAdvanced = QtWidgets.QAction(KCC)
self.ActionAdvanced.setCheckable(True)
self.ActionAdvanced.setObjectName("ActionAdvanced")
self.retranslateUi(KCC)
QtCore.QMetaObject.connectSlotsByName(KCC)
KCC.setTabOrder(self.DirectoryButton, self.FileButton)
KCC.setTabOrder(self.FileButton, self.ConvertButton)
KCC.setTabOrder(self.ConvertButton, self.ClearButton)
def retranslateUi(self, KCC):
_translate = QtCore.QCoreApplication.translate
KCC.setWindowTitle(_translate("KCC", "Kindle Comic Converter"))
self.DeviceBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Target device.</p></body></html>"))
self.FormatBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Output format.</p></body></html>"))
self.ConvertButton.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Shift+Click to select the output directory.</p></body></html>"))
self.ConvertButton.setText(_translate("KCC", "Convert"))
self.DirectoryButton.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Add directory containing JPG, PNG or GIF files to queue.<br/><span style=\" font-weight:600;\">CBR, CBZ and CB7 files inside will not be processed!</span></p></body></html>"))
self.DirectoryButton.setText(_translate("KCC", "Add directory"))
self.FileButton.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Add CBR, CBZ, CB7 or PDF file to queue.</p></body></html>"))
self.FileButton.setText(_translate("KCC", "Add file"))
self.ClearButton.setText(_translate("KCC", "Clear list"))
self.MangaBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Enable right-to-left reading.</p></body></html>"))
self.MangaBox.setText(_translate("KCC", "Manga mode"))
self.RotateBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Split<br/></span>Double page spreads will be cut into two separate pages.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - Rotate and split<br/></span>Double page spreads will be displayed twice. First rotated and then split. </p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Rotate<br/></span>Double page spreads will be rotated.</p></body></html>"))
self.RotateBox.setText(_translate("KCC", "Spread splitter"))
self.QualityBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>High quality Panel View.<br/>Require source files with bigger resolution than target device.<br/><span style=\" font-weight:600;\">Highly impact size of output file!</span></p></body></html>"))
self.QualityBox.setText(_translate("KCC", "HQ zoom"))
self.GammaBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Disable automatic gamma correction.</p></body></html>"))
self.GammaBox.setText(_translate("KCC", "Custom gamma"))
self.NoDitheringBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Create PNG files instead JPEG.<br/>Quality increase is not noticeable on most of devices.<br/>Output files <span style=\" font-weight:600;\">might</span> be smaller.<br/><span style=\" font-weight:600;\">MOBI conversion will be much slower.</span></p></body></html>"))
self.NoDitheringBox.setText(_translate("KCC", "PNG output"))
self.ColorBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Disable conversion to grayscale.</p></body></html>"))
self.ColorBox.setText(_translate("KCC", "Color mode"))
self.UpscaleBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Nothing<br/></span>Images smaller than device resolution will not be resized.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - Stretching<br/></span>Images smaller than device resolution will be resized. Aspect ratio will be not preserved.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Upscaling<br/></span>Images smaller than device resolution will be resized. Aspect ratio will be preserved.</p></body></html>"))
self.UpscaleBox.setText(_translate("KCC", "Stretch/Upscale"))
self.WebtoonBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Enable special parsing mode for Korean Webtoons.</p></body></html>"))
self.WebtoonBox.setText(_translate("KCC", "Webtoon mode"))
self.BorderBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Autodetection<br/></span>Color of margins fill will be detected automatically.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - White<br/></span>Margins will be filled with white color.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Black<br/></span>Margins will be filled with black color.</p></body></html>"))
self.BorderBox.setText(_translate("KCC", "W/B margins"))
self.GammaLabel.setText(_translate("KCC", "Gamma: Auto"))
self.wLabel.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>"))
self.wLabel.setText(_translate("KCC", "Custom width: "))
self.customWidth.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>"))
self.customWidth.setInputMask(_translate("KCC", "0000"))
self.hLabel.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>"))
self.hLabel.setText(_translate("KCC", "Custom height: "))
self.customHeight.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>"))
self.customHeight.setInputMask(_translate("KCC", "0000"))
self.EditorButton.setText(_translate("KCC", "Editor"))
self.WikiButton.setText(_translate("KCC", "Wiki"))
self.ActionBasic.setText(_translate("KCC", "Basic"))
self.ActionAdvanced.setText(_translate("KCC", "Advanced"))
from . import KCC_rc

View File

@@ -1,317 +0,0 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'KCC-OSX.ui'
#
# Created by: PyQt5 UI code generator 5.5.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_KCC(object):
def setupUi(self, KCC):
KCC.setObjectName("KCC")
KCC.resize(420, 390)
KCC.setMinimumSize(QtCore.QSize(420, 390))
KCC.setMaximumSize(QtCore.QSize(420, 390))
font = QtGui.QFont()
font.setPointSize(11)
KCC.setFont(font)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/Icon/icons/comic2ebook.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
KCC.setWindowIcon(icon)
KCC.setLocale(QtCore.QLocale(QtCore.QLocale.C, QtCore.QLocale.AnyCountry))
self.Form = QtWidgets.QWidget(KCC)
self.Form.setObjectName("Form")
self.DeviceBox = QtWidgets.QComboBox(self.Form)
self.DeviceBox.setGeometry(QtCore.QRect(8, 204, 151, 26))
font = QtGui.QFont()
font.setPointSize(11)
self.DeviceBox.setFont(font)
self.DeviceBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.DeviceBox.setObjectName("DeviceBox")
self.FormatBox = QtWidgets.QComboBox(self.Form)
self.FormatBox.setGeometry(QtCore.QRect(264, 204, 150, 26))
font = QtGui.QFont()
font.setPointSize(11)
self.FormatBox.setFont(font)
self.FormatBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.FormatBox.setObjectName("FormatBox")
self.ConvertButton = QtWidgets.QPushButton(self.Form)
self.ConvertButton.setGeometry(QtCore.QRect(159, 200, 104, 41))
font = QtGui.QFont()
font.setPointSize(11)
font.setBold(True)
font.setWeight(75)
self.ConvertButton.setFont(font)
self.ConvertButton.setFocusPolicy(QtCore.Qt.NoFocus)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/Other/icons/convert.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.ConvertButton.setIcon(icon1)
self.ConvertButton.setObjectName("ConvertButton")
self.DirectoryButton = QtWidgets.QPushButton(self.Form)
self.DirectoryButton.setGeometry(QtCore.QRect(4, 160, 158, 41))
font = QtGui.QFont()
font.setPointSize(11)
self.DirectoryButton.setFont(font)
self.DirectoryButton.setFocusPolicy(QtCore.Qt.NoFocus)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(":/Other/icons/folder_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.DirectoryButton.setIcon(icon2)
self.DirectoryButton.setObjectName("DirectoryButton")
self.FileButton = QtWidgets.QPushButton(self.Form)
self.FileButton.setGeometry(QtCore.QRect(260, 160, 157, 41))
font = QtGui.QFont()
font.setPointSize(11)
self.FileButton.setFont(font)
self.FileButton.setFocusPolicy(QtCore.Qt.NoFocus)
icon3 = QtGui.QIcon()
icon3.addPixmap(QtGui.QPixmap(":/Other/icons/document_new.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.FileButton.setIcon(icon3)
self.FileButton.setObjectName("FileButton")
self.ClearButton = QtWidgets.QPushButton(self.Form)
self.ClearButton.setGeometry(QtCore.QRect(159, 160, 104, 41))
font = QtGui.QFont()
font.setPointSize(11)
self.ClearButton.setFont(font)
self.ClearButton.setFocusPolicy(QtCore.Qt.NoFocus)
icon4 = QtGui.QIcon()
icon4.addPixmap(QtGui.QPixmap(":/Other/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.ClearButton.setIcon(icon4)
self.ClearButton.setObjectName("ClearButton")
self.Options = QtWidgets.QFrame(self.Form)
self.Options.setGeometry(QtCore.QRect(10, 237, 401, 70))
font = QtGui.QFont()
font.setPointSize(11)
self.Options.setFont(font)
self.Options.setObjectName("Options")
self.gridLayout = QtWidgets.QGridLayout(self.Options)
self.gridLayout.setContentsMargins(0, 0, 0, 0)
self.gridLayout.setHorizontalSpacing(31)
self.gridLayout.setVerticalSpacing(5)
self.gridLayout.setObjectName("gridLayout")
self.MangaBox = QtWidgets.QCheckBox(self.Options)
self.MangaBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.MangaBox.setObjectName("MangaBox")
self.gridLayout.addWidget(self.MangaBox, 2, 0, 1, 1)
self.RotateBox = QtWidgets.QCheckBox(self.Options)
self.RotateBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.RotateBox.setTristate(True)
self.RotateBox.setObjectName("RotateBox")
self.gridLayout.addWidget(self.RotateBox, 2, 1, 1, 1)
self.QualityBox = QtWidgets.QCheckBox(self.Options)
self.QualityBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.QualityBox.setObjectName("QualityBox")
self.gridLayout.addWidget(self.QualityBox, 2, 2, 1, 1)
self.GammaBox = QtWidgets.QCheckBox(self.Options)
self.GammaBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.GammaBox.setObjectName("GammaBox")
self.gridLayout.addWidget(self.GammaBox, 4, 2, 1, 1)
self.NoDitheringBox = QtWidgets.QCheckBox(self.Options)
self.NoDitheringBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.NoDitheringBox.setObjectName("NoDitheringBox")
self.gridLayout.addWidget(self.NoDitheringBox, 5, 1, 1, 1)
self.ColorBox = QtWidgets.QCheckBox(self.Options)
self.ColorBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.ColorBox.setObjectName("ColorBox")
self.gridLayout.addWidget(self.ColorBox, 5, 2, 1, 1)
self.UpscaleBox = QtWidgets.QCheckBox(self.Options)
self.UpscaleBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.UpscaleBox.setTristate(True)
self.UpscaleBox.setObjectName("UpscaleBox")
self.gridLayout.addWidget(self.UpscaleBox, 4, 1, 1, 1)
self.WebtoonBox = QtWidgets.QCheckBox(self.Options)
self.WebtoonBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.WebtoonBox.setObjectName("WebtoonBox")
self.gridLayout.addWidget(self.WebtoonBox, 4, 0, 1, 1)
self.BorderBox = QtWidgets.QCheckBox(self.Options)
self.BorderBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.BorderBox.setTristate(True)
self.BorderBox.setObjectName("BorderBox")
self.gridLayout.addWidget(self.BorderBox, 5, 0, 1, 1)
self.JobList = QtWidgets.QListWidget(self.Form)
self.JobList.setGeometry(QtCore.QRect(10, 50, 401, 101))
font = QtGui.QFont()
font.setPointSize(11)
self.JobList.setFont(font)
self.JobList.setFocusPolicy(QtCore.Qt.NoFocus)
self.JobList.setStyleSheet("QListWidget#JobList {background:#ffffff;background-image:url(:/Other/icons/list_background.png);background-position:center center;background-repeat:no-repeat;}QScrollBar:vertical{border:1px solid #999;background:#FFF;width:5px;margin:0}QScrollBar::handle:vertical{background:DarkGray;min-height:0}QScrollBar::add-line:vertical{height:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:vertical{height:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}QScrollBar:horizontal{border:1px solid #999;background:#FFF;height:5px;margin:0}QScrollBar::handle:horizontal{background:DarkGray;min-width:0}QScrollBar::add-line:horizontal{width:0;background:DarkGray;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:horizontal{width:0;background:DarkGray;subcontrol-position:top;subcontrol-origin:margin}")
self.JobList.setProperty("showDropIndicator", False)
self.JobList.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection)
self.JobList.setIconSize(QtCore.QSize(15, 15))
self.JobList.setVerticalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel)
self.JobList.setHorizontalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel)
self.JobList.setObjectName("JobList")
self.OptionsGamma = QtWidgets.QFrame(self.Form)
self.OptionsGamma.setEnabled(True)
self.OptionsGamma.setGeometry(QtCore.QRect(10, 305, 401, 35))
font = QtGui.QFont()
font.setPointSize(11)
self.OptionsGamma.setFont(font)
self.OptionsGamma.setObjectName("OptionsGamma")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.OptionsGamma)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setSpacing(15)
self.horizontalLayout.setObjectName("horizontalLayout")
self.GammaLabel = QtWidgets.QLabel(self.OptionsGamma)
self.GammaLabel.setObjectName("GammaLabel")
self.horizontalLayout.addWidget(self.GammaLabel)
self.GammaSlider = QtWidgets.QSlider(self.OptionsGamma)
self.GammaSlider.setFocusPolicy(QtCore.Qt.ClickFocus)
self.GammaSlider.setMaximum(500)
self.GammaSlider.setSingleStep(5)
self.GammaSlider.setOrientation(QtCore.Qt.Horizontal)
self.GammaSlider.setObjectName("GammaSlider")
self.horizontalLayout.addWidget(self.GammaSlider)
self.ProgressBar = QtWidgets.QProgressBar(self.Form)
self.ProgressBar.setGeometry(QtCore.QRect(10, 10, 401, 31))
font = QtGui.QFont()
font.setPointSize(11)
font.setBold(True)
font.setWeight(75)
self.ProgressBar.setFont(font)
self.ProgressBar.setProperty("value", 0)
self.ProgressBar.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter)
self.ProgressBar.setFormat("")
self.ProgressBar.setObjectName("ProgressBar")
self.OptionsCustom = QtWidgets.QFrame(self.Form)
self.OptionsCustom.setGeometry(QtCore.QRect(10, 337, 401, 25))
font = QtGui.QFont()
font.setPointSize(11)
self.OptionsCustom.setFont(font)
self.OptionsCustom.setObjectName("OptionsCustom")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.OptionsCustom)
self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout_2.setSpacing(5)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.wLabel = QtWidgets.QLabel(self.OptionsCustom)
self.wLabel.setObjectName("wLabel")
self.horizontalLayout_2.addWidget(self.wLabel)
self.customWidth = QtWidgets.QLineEdit(self.OptionsCustom)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.customWidth.sizePolicy().hasHeightForWidth())
self.customWidth.setSizePolicy(sizePolicy)
self.customWidth.setFocusPolicy(QtCore.Qt.ClickFocus)
self.customWidth.setAcceptDrops(False)
self.customWidth.setMaxLength(4)
self.customWidth.setObjectName("customWidth")
self.horizontalLayout_2.addWidget(self.customWidth)
self.hLabel = QtWidgets.QLabel(self.OptionsCustom)
self.hLabel.setObjectName("hLabel")
self.horizontalLayout_2.addWidget(self.hLabel)
self.customHeight = QtWidgets.QLineEdit(self.OptionsCustom)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.customHeight.sizePolicy().hasHeightForWidth())
self.customHeight.setSizePolicy(sizePolicy)
self.customHeight.setFocusPolicy(QtCore.Qt.ClickFocus)
self.customHeight.setAcceptDrops(False)
self.customHeight.setMaxLength(4)
self.customHeight.setObjectName("customHeight")
self.horizontalLayout_2.addWidget(self.customHeight)
self.EditorButton = QtWidgets.QPushButton(self.Form)
self.EditorButton.setGeometry(QtCore.QRect(4, 10, 210, 41))
font = QtGui.QFont()
font.setPointSize(11)
self.EditorButton.setFont(font)
self.EditorButton.setFocusPolicy(QtCore.Qt.NoFocus)
icon5 = QtGui.QIcon()
icon5.addPixmap(QtGui.QPixmap(":/Other/icons/editor.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.EditorButton.setIcon(icon5)
self.EditorButton.setObjectName("EditorButton")
self.WikiButton = QtWidgets.QPushButton(self.Form)
self.WikiButton.setGeometry(QtCore.QRect(207, 10, 210, 41))
font = QtGui.QFont()
font.setPointSize(11)
self.WikiButton.setFont(font)
self.WikiButton.setFocusPolicy(QtCore.Qt.NoFocus)
icon6 = QtGui.QIcon()
icon6.addPixmap(QtGui.QPixmap(":/Other/icons/wiki.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.WikiButton.setIcon(icon6)
self.WikiButton.setObjectName("WikiButton")
self.DeviceBox.raise_()
self.FormatBox.raise_()
self.ConvertButton.raise_()
self.DirectoryButton.raise_()
self.FileButton.raise_()
self.ClearButton.raise_()
self.Options.raise_()
self.JobList.raise_()
self.OptionsGamma.raise_()
self.OptionsCustom.raise_()
self.EditorButton.raise_()
self.WikiButton.raise_()
self.ProgressBar.raise_()
KCC.setCentralWidget(self.Form)
self.statusBar = QtWidgets.QStatusBar(KCC)
font = QtGui.QFont()
font.setPointSize(11)
self.statusBar.setFont(font)
self.statusBar.setSizeGripEnabled(False)
self.statusBar.setObjectName("statusBar")
KCC.setStatusBar(self.statusBar)
self.ActionBasic = QtWidgets.QAction(KCC)
self.ActionBasic.setCheckable(True)
self.ActionBasic.setChecked(False)
font = QtGui.QFont()
font.setPointSize(11)
self.ActionBasic.setFont(font)
self.ActionBasic.setObjectName("ActionBasic")
self.ActionAdvanced = QtWidgets.QAction(KCC)
self.ActionAdvanced.setCheckable(True)
self.ActionAdvanced.setObjectName("ActionAdvanced")
self.retranslateUi(KCC)
QtCore.QMetaObject.connectSlotsByName(KCC)
KCC.setTabOrder(self.DirectoryButton, self.FileButton)
KCC.setTabOrder(self.FileButton, self.ConvertButton)
KCC.setTabOrder(self.ConvertButton, self.ClearButton)
def retranslateUi(self, KCC):
_translate = QtCore.QCoreApplication.translate
KCC.setWindowTitle(_translate("KCC", "Kindle Comic Converter"))
self.DeviceBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Target device.</p></body></html>"))
self.FormatBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Output format.</p></body></html>"))
self.ConvertButton.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Shift+Click to select the output directory.</p></body></html>"))
self.ConvertButton.setText(_translate("KCC", "Convert"))
self.DirectoryButton.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Add directory containing JPG, PNG or GIF files to queue.<br/><span style=\" font-weight:600;\">CBR, CBZ and CB7 files inside will not be processed!</span></p></body></html>"))
self.DirectoryButton.setText(_translate("KCC", "Add directory"))
self.FileButton.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Add CBR, CBZ, CB7 or PDF file to queue.</p></body></html>"))
self.FileButton.setText(_translate("KCC", "Add file"))
self.ClearButton.setText(_translate("KCC", "Clear list"))
self.MangaBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Enable right-to-left reading.</p></body></html>"))
self.MangaBox.setText(_translate("KCC", "Manga mode"))
self.RotateBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Split<br/></span>Double page spreads will be cut into two separate pages.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - Rotate and split<br/></span>Double page spreads will be displayed twice. First rotated and then split. </p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Rotate<br/></span>Double page spreads will be rotated.</p></body></html>"))
self.RotateBox.setText(_translate("KCC", "Spread splitter"))
self.QualityBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>High quality Panel View.<br/>Require source files with bigger resolution than target device.<br/><span style=\" font-weight:600;\">Highly impact size of output file!</span></p></body></html>"))
self.QualityBox.setText(_translate("KCC", "HQ zoom"))
self.GammaBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Disable automatic gamma correction.</p></body></html>"))
self.GammaBox.setText(_translate("KCC", "Custom gamma"))
self.NoDitheringBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Create PNG files instead JPEG.<br/>Quality increase is not noticeable on most of devices.<br/>Output files <span style=\" font-weight:600;\">might</span> be smaller.<br/><span style=\" font-weight:600;\">MOBI conversion will be much slower.</span></p></body></html>"))
self.NoDitheringBox.setText(_translate("KCC", "PNG output"))
self.ColorBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Disable conversion to grayscale.</p></body></html>"))
self.ColorBox.setText(_translate("KCC", "Color mode"))
self.UpscaleBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Nothing<br/></span>Images smaller than device resolution will not be resized.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - Stretching<br/></span>Images smaller than device resolution will be resized. Aspect ratio will be not preserved.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Upscaling<br/></span>Images smaller than device resolution will be resized. Aspect ratio will be preserved.</p></body></html>"))
self.UpscaleBox.setText(_translate("KCC", "Stretch/Upscale"))
self.WebtoonBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Enable special parsing mode for Korean Webtoons.</p></body></html>"))
self.WebtoonBox.setText(_translate("KCC", "Webtoon mode"))
self.BorderBox.setToolTip(_translate("KCC", "<html><head/><body><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Autodetection<br/></span>Color of margins fill will be detected automatically.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Indeterminate - White<br/></span>Margins will be filled with white color.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Black<br/></span>Margins will be filled with black color.</p></body></html>"))
self.BorderBox.setText(_translate("KCC", "W/B margins"))
self.GammaLabel.setText(_translate("KCC", "Gamma: Auto"))
self.wLabel.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>"))
self.wLabel.setText(_translate("KCC", "Custom width: "))
self.customWidth.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>"))
self.customWidth.setInputMask(_translate("KCC", "0000"))
self.hLabel.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>"))
self.hLabel.setText(_translate("KCC", "Custom height: "))
self.customHeight.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>"))
self.customHeight.setInputMask(_translate("KCC", "0000"))
self.EditorButton.setText(_translate("KCC", "Editor"))
self.WikiButton.setText(_translate("KCC", "Wiki"))
self.ActionBasic.setText(_translate("KCC", "Basic"))
self.ActionAdvanced.setText(_translate("KCC", "Advanced"))
from . import KCC_rc

View File

@@ -1,4 +1,4 @@
__version__ = '5.0.1' __version__ = '5.1'
__license__ = 'ISC' __license__ = 'ISC'
__copyright__ = '2012-2015, Ciro Mattia Gonano <ciromattia@gmail.com>, Pawel Jastrzebski <pawelj@iosphe.re>' __copyright__ = '2012-2016, Ciro Mattia Gonano <ciromattia@gmail.com>, Pawel Jastrzebski <pawelj@iosphe.re>'
__docformat__ = 'restructuredtext en' __docformat__ = 'restructuredtext en'

View File

@@ -1,5 +1,5 @@
# Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com> # Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com>
# Copyright (c) 2013-2015 Pawel Jastrzebski <pawelj@iosphe.re> # Copyright (c) 2013-2016 Pawel Jastrzebski <pawelj@iosphe.re>
# #
# Permission to use, copy, modify, and/or distribute this software for # Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the # any purpose with or without fee is hereby granted, provided that the

View File

@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com> # Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com>
# Copyright (c) 2013-2015 Pawel Jastrzebski <pawelj@iosphe.re> # Copyright (c) 2013-2016 Pawel Jastrzebski <pawelj@iosphe.re>
# #
# Permission to use, copy, modify, and/or distribute this software for # Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the # any purpose with or without fee is hereby granted, provided that the
@@ -545,10 +545,10 @@ def imgFileProcessing(work):
workImg = image.ComicPageParser((dirpath, afile), opt) workImg = image.ComicPageParser((dirpath, afile), opt)
for i in workImg.payload: for i in workImg.payload:
img = image.ComicPage(i[0], i[1], i[2], i[3], i[4], opt) img = image.ComicPage(i[0], i[1], i[2], i[3], i[4], opt)
if not opt.webtoon: if opt.cropping > 0 and not opt.webtoon:
img.cropWhiteSpace() img.cropWhiteSpace(opt.croppingp)
if opt.cutpagenumbers and not opt.webtoon: if opt.cropping == 2 and not opt.webtoon:
img.cutPageNumber() img.cutPageNumber(opt.croppingpn)
img.autocontrastImage() img.autocontrastImage()
img.resizeImage() img.resizeImage()
if opt.forcepng and not opt.forcecolor: if opt.forcepng and not opt.forcecolor:
@@ -556,7 +556,7 @@ def imgFileProcessing(work):
output.append(img.saveToDir()) output.append(img.saveToDir())
return output return output
except Exception: except Exception:
return str(sys.exc_info()[1]) return str(sys.exc_info()[:2])
def getWorkFolder(afile): def getWorkFolder(afile):
@@ -591,6 +591,7 @@ def getWorkFolder(afile):
raise UserWarning("Failed to detect archive format.") raise UserWarning("Failed to detect archive format.")
else: else:
raise UserWarning("Failed to open source file/directory.") raise UserWarning("Failed to open source file/directory.")
sanitizePermissions(path)
newpath = mkdtemp('', 'KCC-') newpath = mkdtemp('', 'KCC-')
copytree(path, os.path.join(newpath, 'OEBPS', 'Images')) copytree(path, os.path.join(newpath, 'OEBPS', 'Images'))
rmtree(path, True) rmtree(path, True)
@@ -656,9 +657,9 @@ def getComicInfo(path, originalPath):
if xml.data['Series']: if xml.data['Series']:
options.title = escape(xml.data['Series']) options.title = escape(xml.data['Series'])
if xml.data['Volume']: if xml.data['Volume']:
titleSuffix += ' V' + xml.data['Volume'] titleSuffix += ' V' + xml.data['Volume'].zfill(2)
if xml.data['Number']: if xml.data['Number']:
titleSuffix += ' #' + xml.data['Number'] titleSuffix += ' #' + xml.data['Number'].zfill(3)
options.title += titleSuffix options.title += titleSuffix
for field in ['Writers', 'Pencillers', 'Inkers', 'Colorists']: for field in ['Writers', 'Pencillers', 'Inkers', 'Colorists']:
for person in xml.data[field]: for person in xml.data[field]:
@@ -955,7 +956,7 @@ def makeParser():
otherOptions = OptionGroup(psr, "OTHER") otherOptions = OptionGroup(psr, "OTHER")
mainOptions.add_option("-p", "--profile", action="store", dest="profile", default="KV", mainOptions.add_option("-p", "--profile", action="store", dest="profile", default="KV",
help="Device profile (Available options: K1, K2, K345, KDX, KPW, KV, KoMT, KoG, KoGHD," help="Device profile (Available options: K1, K2, K3, K45, KDX, KPW, KV, KoMT, KoG, KoGHD,"
" KoA, KoAHD, KoAH2O) [Default=KV]") " KoA, KoAHD, KoAH2O) [Default=KV]")
mainOptions.add_option("-m", "--manga-style", action="store_true", dest="righttoleft", default=False, mainOptions.add_option("-m", "--manga-style", action="store_true", dest="righttoleft", default=False,
help="Manga style (right-to-left reading and splitting)") help="Manga style (right-to-left reading and splitting)")
@@ -989,8 +990,12 @@ def makeParser():
help="Don't convert images to grayscale") help="Don't convert images to grayscale")
processingOptions.add_option("--forcepng", action="store_true", dest="forcepng", default=False, processingOptions.add_option("--forcepng", action="store_true", dest="forcepng", default=False,
help="Create PNG files instead JPEG") help="Create PNG files instead JPEG")
processingOptions.add_option("--nocutpagenumbers", action="store_false", dest="cutpagenumbers", default=True, processingOptions.add_option("--cropping", type="int", dest="cropping", default="2",
help="Don't try to cut page numbers from images") help="Set cropping mode. 0: Disabled 1: Margins 2: Margins + page numbers [Default=2]")
processingOptions.add_option("--croppingpower", type="float", dest="croppingp", default="0.1",
help="Set margin cropping threshold [Default=0.1]")
processingOptions.add_option("--croppingpowerpage", type="float", dest="croppingpn", default="5.0",
help="Set page number cropping threshold [Default=5.0]")
customProfileOptions.add_option("--customwidth", type="int", dest="customwidth", default=0, customProfileOptions.add_option("--customwidth", type="int", dest="customwidth", default=0,
help="Replace screen width provided by device profile") help="Replace screen width provided by device profile")
@@ -1014,13 +1019,13 @@ def checkOptions():
options.iskindle = False options.iskindle = False
options.bordersColor = None options.bordersColor = None
if options.format == 'Auto': if options.format == 'Auto':
if options.profile in ['K1', 'K2', 'K345', 'KPW', 'KV']: if options.profile in ['K1', 'K2', 'K3', 'K45', 'KPW', 'KV']:
options.format = 'MOBI' options.format = 'MOBI'
elif options.profile in ['OTHER', 'KoMT', 'KoG', 'KoGHD', 'KoA', 'KoAHD', 'KoAH2O']: elif options.profile in ['OTHER', 'KoMT', 'KoG', 'KoGHD', 'KoA', 'KoAHD', 'KoAH2O']:
options.format = 'EPUB' options.format = 'EPUB'
elif options.profile in ['KDX']: elif options.profile in ['KDX']:
options.format = 'CBZ' options.format = 'CBZ'
if options.profile in ['K1', 'K2', 'K345', 'KPW', 'KV']: if options.profile in ['K1', 'K2', 'K3', 'K45', 'KPW', 'KV']:
options.iskindle = True options.iskindle = True
if options.white_borders: if options.white_borders:
options.bordersColor = 'white' options.bordersColor = 'white'
@@ -1030,7 +1035,7 @@ def checkOptions():
if options.format == 'MOBI': if options.format == 'MOBI':
options.batchsplit = True options.batchsplit = True
# Older Kindle don't need higher resolution files due lack of Panel View. # Older Kindle don't need higher resolution files due lack of Panel View.
if options.profile == 'K1' or options.profile == 'K2' or options.profile == 'KDX': if options.profile == 'K1' or options.profile == 'K2' or options.profile == 'K3' or options.profile == 'KDX':
options.panelview = False options.panelview = False
options.hqmode = False options.hqmode = False
# Webtoon mode mandatory options # Webtoon mode mandatory options
@@ -1239,6 +1244,8 @@ def makeMOBIWorker(item):
kindlegenErrorCode = 23026 kindlegenErrorCode = 23026
if kindlegenErrorCode > 0: if kindlegenErrorCode > 0:
break break
if ":I1036: Mobi file built successfully" in line:
output.terminate()
else: else:
# ERROR: EPUB too big # ERROR: EPUB too big
kindlegenErrorCode = 23026 kindlegenErrorCode = 23026

View File

@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com> # Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com>
# Copyright (c) 2013-2015 Pawel Jastrzebski <pawelj@iosphe.re> # Copyright (c) 2013-2016 Pawel Jastrzebski <pawelj@iosphe.re>
# #
# Permission to use, copy, modify, and/or distribute this software for # Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the # any purpose with or without fee is hereby granted, provided that the

View File

@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Based on initial version of DualMetaFix. Copyright (C) 2013 Kevin Hendricks # Based on initial version of DualMetaFix. Copyright (C) 2013 Kevin Hendricks
# Changes for KCC Copyright (C) 2014-2015 Pawel Jastrzebski <pawelj@iosphe.re> # Changes for KCC Copyright (C) 2014-2016 Pawel Jastrzebski <pawelj@iosphe.re>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by

View File

@@ -1,7 +1,7 @@
# Copyright (C) 2010 Alex Yatskov # Copyright (C) 2010 Alex Yatskov
# Copyright (C) 2011 Stanislav (proDOOMman) Kosolapov <prodoomman@gmail.com> # Copyright (C) 2011 Stanislav (proDOOMman) Kosolapov <prodoomman@gmail.com>
# Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com> # Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com>
# Copyright (c) 2013-2015 Pawel Jastrzebski <pawelj@iosphe.re> # Copyright (c) 2013-2016 Pawel Jastrzebski <pawelj@iosphe.re>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -79,10 +79,11 @@ class ProfileData:
Profiles = { Profiles = {
'K1': ("Kindle 1", (600, 670), Palette4, 1.8, (900, 1005)), 'K1': ("Kindle 1", (600, 670), Palette4, 1.8, (900, 1005)),
'K2': ("Kindle 2", (600, 670), Palette15, 1.8, (900, 1005)), 'K2': ("Kindle 2", (600, 670), Palette15, 1.8, (900, 1005)),
'K345': ("Kindle", (600, 800), Palette16, 1.8, (900, 1200)), 'K3': ("Kindle", (600, 800), Palette16, 1.8, (900, 1200)),
'K45': ("Kindle", (600, 800), Palette16, 1.8, (900, 1200)),
'KDX': ("Kindle DX/DXG", (824, 1000), Palette16, 1.8, (1236, 1500)), 'KDX': ("Kindle DX/DXG", (824, 1000), Palette16, 1.8, (1236, 1500)),
'KPW': ("Kindle Paperwhite 1/2", (758, 1024), Palette16, 1.8, (1137, 1536)), 'KPW': ("Kindle Paperwhite 1/2", (758, 1024), Palette16, 1.8, (1137, 1536)),
'KV': ("Kindle Paperwhite 3/Voyage", (1072, 1448), Palette16, 1.8, (1608, 2172)), 'KV': ("Kindle Paperwhite 3/Voyage/Oasis", (1072, 1448), Palette16, 1.8, (1608, 2172)),
'KoMT': ("Kobo Mini/Touch", (600, 800), Palette16, 1.8, (900, 1200)), 'KoMT': ("Kobo Mini/Touch", (600, 800), Palette16, 1.8, (900, 1200)),
'KoG': ("Kobo Glo", (768, 1024), Palette16, 1.8, (1152, 1536)), 'KoG': ("Kobo Glo", (768, 1024), Palette16, 1.8, (1152, 1536)),
'KoGHD': ("Kobo Glo HD", (1072, 1448), Palette16, 1.8, (1608, 2172)), 'KoGHD': ("Kobo Glo HD", (1072, 1448), Palette16, 1.8, (1608, 2172)),
@@ -316,12 +317,11 @@ class ComicPage:
if self.image.size[0] > size[0] or self.image.size[1] > size[1]: if self.image.size[0] > size[0] or self.image.size[1] > size[1]:
self.image.thumbnail(size, Image.LANCZOS) self.image.thumbnail(size, Image.LANCZOS)
def cutPageNumber(self): def cutPageNumber(self, fixedThreshold):
if ImageChops.invert(self.image).getbbox() is not None: if ImageChops.invert(self.image).getbbox() is not None:
widthImg, heightImg = self.image.size widthImg, heightImg = self.image.size
delta = 2 delta = 2
diff = delta diff = delta
fixedThreshold = 5
if ImageStat.Stat(self.image).var[0] < 2 * fixedThreshold: if ImageStat.Stat(self.image).var[0] < 2 * fixedThreshold:
return self.image return self.image
while ImageStat.Stat(self.image.crop((0, heightImg - diff, widthImg, heightImg))).var[0] < fixedThreshold\ while ImageStat.Stat(self.image.crop((0, heightImg - diff, widthImg, heightImg))).var[0] < fixedThreshold\
@@ -370,12 +370,11 @@ class ComicPage:
diff = pageNumberCut1 diff = pageNumberCut1
self.image = self.image.crop((0, 0, widthImg, heightImg - diff)) self.image = self.image.crop((0, 0, widthImg, heightImg - diff))
def cropWhiteSpace(self): def cropWhiteSpace(self, fixedThreshold):
if ImageChops.invert(self.image).getbbox() is not None: if ImageChops.invert(self.image).getbbox() is not None:
widthImg, heightImg = self.image.size widthImg, heightImg = self.image.size
delta = 10 delta = 10
diff = delta diff = delta
fixedThreshold = 0.1
# top # top
while ImageStat.Stat(self.image.crop((0, 0, widthImg, diff))).var[0] < fixedThreshold and diff < heightImg: while ImageStat.Stat(self.image.crop((0, 0, widthImg, diff))).var[0] < fixedThreshold and diff < heightImg:
diff += delta diff += delta

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Copyright (c) 2013-2015 Pawel Jastrzebski <pawelj@iosphe.re> # Copyright (c) 2013-2016 Pawel Jastrzebski <pawelj@iosphe.re>
# #
# Permission to use, copy, modify, and/or distribute this software for # Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the # any purpose with or without fee is hereby granted, provided that the

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Copyright (c) 2013-2015 Pawel Jastrzebski <pawelj@iosphe.re> # Copyright (c) 2013-2016 Pawel Jastrzebski <pawelj@iosphe.re>
# #
# Permission to use, copy, modify, and/or distribute this software for # Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the # any purpose with or without fee is hereby granted, provided that the

View File

@@ -1,5 +1,5 @@
# Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com> # Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com>
# Copyright (c) 2013-2015 Pawel Jastrzebski <pawelj@iosphe.re> # Copyright (c) 2013-2016 Pawel Jastrzebski <pawelj@iosphe.re>
# #
# Based upon the code snippet by Ned Batchelder # Based upon the code snippet by Ned Batchelder
# (http://nedbatchelder.com/blog/200712/extracting_jpgs_from_pdfs.html) # (http://nedbatchelder.com/blog/200712/extracting_jpgs_from_pdfs.html)
@@ -61,6 +61,7 @@ class PdfJpgExtract:
iend += endfix iend += endfix
jpg = pdf[istart:iend] jpg = pdf[istart:iend]
jpgfile = open(self.path + "/jpg%d.jpg" % njpg, "wb") jpgfile = open(self.path + "/jpg%d.jpg" % njpg, "wb")
# noinspection PyTypeChecker
jpgfile.write(jpg) jpgfile.write(jpg)
jpgfile.close() jpgfile.close()
njpg += 1 njpg += 1

View File

@@ -1,5 +1,5 @@
# Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com> # Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com>
# Copyright (c) 2013-2015 Pawel Jastrzebski <pawelj@iosphe.re> # Copyright (c) 2013-2016 Pawel Jastrzebski <pawelj@iosphe.re>
# #
# Permission to use, copy, modify, and/or distribute this software for # Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the # any purpose with or without fee is hereby granted, provided that the
@@ -97,7 +97,7 @@ def check7ZFile(filePath):
def saferReplace(old, new): def saferReplace(old, new):
for x in range(10): for x in range(30):
try: try:
os.replace(old, new) os.replace(old, new)
except PermissionError: except PermissionError:
@@ -109,7 +109,7 @@ def saferReplace(old, new):
def saferRemove(target): def saferRemove(target):
for x in range(10): for x in range(30):
try: try:
os.remove(target) os.remove(target)
except PermissionError: except PermissionError:
@@ -129,11 +129,11 @@ def removeFromZIP(zipfname, *filenames):
for item in zipread.infolist(): for item in zipread.infolist():
if item.filename not in filenames: if item.filename not in filenames:
zipwrite.writestr(item, zipread.read(item.filename)) zipwrite.writestr(item, zipread.read(item.filename))
for x in range(50): for x in range(30):
try: try:
copy(tempname, zipfname) copy(tempname, zipfname)
except PermissionError: except PermissionError:
sleep(0.1) sleep(1)
else: else:
break break
else: else:
@@ -144,9 +144,10 @@ def removeFromZIP(zipfname, *filenames):
def sanitizeTrace(traceback): def sanitizeTrace(traceback):
return ''.join(format_tb(traceback))\ return ''.join(format_tb(traceback))\
.replace('C:\\Users\\pawel\\Documents\\Projekty\\KCC\\', '')\ .replace('C:\\Users\\pawel\\Documents\\Projekty\\KCC\\', '') \
.replace('C:\\Python34\\', '')\ .replace('C:\\Users\\Paweł\\Documents\\Projekty\\KCC\\', '') \
.replace('c:\\python34\\', '') .replace('C:\\Python35\\', '')\
.replace('c:\\python35\\', '')
def dependencyCheck(level): def dependencyCheck(level):
@@ -154,36 +155,40 @@ def dependencyCheck(level):
if level > 2: if level > 2:
try: try:
from PyQt5.QtCore import qVersion as qtVersion from PyQt5.QtCore import qVersion as qtVersion
if StrictVersion('5.2.1') > StrictVersion(qtVersion()): if StrictVersion('5.6.0') > StrictVersion(qtVersion()):
missing.append('PyQt 5.2.1+') missing.append('PyQt 5.6.0+')
except ImportError: except ImportError:
missing.append('PyQt 5.2.1+') missing.append('PyQt 5.6.0+')
try:
import raven
except ImportError:
missing.append('raven 5.13.0+')
if level > 1: if level > 1:
try: try:
from psutil import __version__ as psutilVersion from psutil import __version__ as psutilVersion
if StrictVersion('3.2.2') > StrictVersion(psutilVersion): if StrictVersion('4.1.0') > StrictVersion(psutilVersion):
missing.append('psutil 3.2.2+') missing.append('psutil 4.1.0+')
except ImportError: except ImportError:
missing.append('psutil 3.2.2+') missing.append('psutil 4.1.0+')
try: try:
from slugify import __version__ as slugifyVersion from slugify import __version__ as slugifyVersion
if StrictVersion('1.1.4') > StrictVersion(slugifyVersion): if StrictVersion('1.2.0') > StrictVersion(slugifyVersion):
missing.append('python-slugify 1.1.4+') missing.append('python-slugify 1.2.0+')
except ImportError: except ImportError:
missing.append('python-slugify 1.1.4+') missing.append('python-slugify 1.2.0+')
try: try:
from PIL import PILLOW_VERSION as pillowVersion from PIL import PILLOW_VERSION as pillowVersion
if StrictVersion('3.0.0') > StrictVersion(pillowVersion): if StrictVersion('3.2.0') > StrictVersion(pillowVersion):
missing.append('Pillow 3.0.0+') missing.append('Pillow 3.2.0+')
except ImportError: except ImportError:
missing.append('Pillow 3.0.0+') missing.append('Pillow 3.2.0+')
if version_info[1] < 5: if version_info[1] < 5:
try: try:
from scandir import __version__ as scandirVersion from scandir import __version__ as scandirVersion
if StrictVersion('1.1') > StrictVersion(scandirVersion): if StrictVersion('1.2') > StrictVersion(scandirVersion):
missing.append('scandir 1.1+') missing.append('scandir 1.2+')
except ImportError: except ImportError:
missing.append('scandir 1.1+') missing.append('scandir 1.2+')
if len(missing) > 0: if len(missing) > 0:
print('ERROR: ' + ', '.join(missing) + ' is not installed!') print('ERROR: ' + ', '.join(missing) + ' is not installed!')
exit(1) exit(1)

View File

@@ -1,4 +1,4 @@
kindlecomicconverter: statically-linked-binary usr/bin/kcc
kindlecomicconverter: binary-without-manpage usr/bin/kcc kindlecomicconverter: binary-without-manpage usr/bin/kcc
kindlecomicconverter: wrong-name-for-changelog-of-native-package usr/share/doc/kindlecomicconverter/changelog.Debian.gz kindlecomicconverter: wrong-name-for-changelog-of-native-package usr/share/doc/kindlecomicconverter/changelog.Debian.gz
kindlecomicconverter: file-missing-in-md5sums usr/share/doc/kindlecomicconverter/changelog.Debian.gz kindlecomicconverter: file-missing-in-md5sums usr/share/doc/kindlecomicconverter/changelog.Debian.gz
kindlecomicconverter: hardening-no-relro usr/bin/kcc

Binary file not shown.

View File

@@ -9,7 +9,7 @@
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>MacOS/Kindle Comic Converter</string> <string>MacOS/Kindle Comic Converter</string>
<key>CFBundleGetInfoString</key> <key>CFBundleGetInfoString</key>
<string>KindleComicConverter 5.0.1, written 2012-2015 by Ciro Mattia Gonano and Pawel Jastrzebski</string> <string>KindleComicConverter 5.1, written 2012-2016 by Ciro Mattia Gonano and Pawel Jastrzebski</string>
<key>CFBundleIconFile</key> <key>CFBundleIconFile</key>
<string>comic2ebook.icns</string> <string>comic2ebook.icns</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
@@ -21,11 +21,11 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>5.0.1</string> <string>5.1</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>5.0.1</string> <string>5.1</string>
<key>LSEnvironment</key> <key>LSEnvironment</key>
<dict> <dict>
<key>PATH</key> <key>PATH</key>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -53,7 +53,7 @@ class BuildBinaryCommand(distutils.cmd.Command):
elif sys.platform == 'win32': elif sys.platform == 'win32':
os.system('pyinstaller -y -F -i icons\comic2ebook.ico -n KCC -w --noupx kcc.py') os.system('pyinstaller -y -F -i icons\comic2ebook.ico -n KCC -w --noupx kcc.py')
if os.path.isfile('setup.bat'): if os.path.isfile('setup.bat'):
os.system('setup.bat ' + VERSION) os.system('setup.bat')
exit(0) exit(0)
else: else:
if self.pyz: if self.pyz:
@@ -90,8 +90,7 @@ class BuildBinaryCommand(distutils.cmd.Command):
os.system("bash -c '%s'" % script) os.system("bash -c '%s'" % script)
exit(0) exit(0)
else: else:
os.system('docker build --no-cache -t kcc . && docker run --rm -v ' + os.getcwd() + os.system('docker run --rm -v ' + os.getcwd() + ':/app -e KCCVER=' + VERSION + ' acidweb/kcc')
':/out kcc && docker rmi kcc')
exit(0) exit(0)
@@ -108,14 +107,16 @@ class BuildCommand(build):
'build/_scripts/kcc-c2p'], 'build/_scripts/kcc-c2p'],
packages=['kcc'], packages=['kcc'],
install_requires=[ install_requires=[
'Pillow>=3.0.0', 'PyQt5>=5.6.0'
'psutil>=3.2.2', 'Pillow>=3.2.0',
'python-slugify>=1.1.4', 'psutil>=4.1.0',
'python-slugify>=1.2.0',
'raven>=5.13.0',
], ],
zip_safe=False, zip_safe=False,
) )
if sys.version_info[1] < 5: if sys.version_info[1] < 5:
OPTIONS['install_requires'].append('scandir>=1.1.0') OPTIONS['install_requires'].append('scandir>=1.2.0')
build.run(self) build.run(self)