1
0
mirror of https://github.com/ciromattia/kcc synced 2026-04-17 14:38:47 +00:00

Compare commits

...

28 Commits
4.6.4 ... 5.0

Author SHA1 Message Date
Paweł Jastrzębski
a2086618a2 Merge pull request #165 from ciromattia/dev
5.0
2015-10-30 09:00:56 -07:00
Paweł Jastrzębski
7d81de6834 Miscellaneous tweaks 2015-10-29 20:34:24 +01:00
Paweł Jastrzębski
7305ccffc5 Updated README + version bump 2015-10-29 17:12:18 +01:00
Paweł Jastrzębski
72b5027021 OS X: GUI update 2015-10-28 19:18:06 +01:00
Paweł Jastrzębski
1152655061 Miscellaneous tweaks 2015-10-28 16:51:02 +01:00
Paweł Jastrzębski
f25c25a121 Linux: GUI update 2015-10-28 12:26:20 +01:00
Paweł Jastrzębski
fff7eeca2b GUI overhaul 2015-10-27 17:46:35 +01:00
Paweł Jastrzębski
a93da2136b Added cover upload 2015-10-25 20:04:21 +01:00
Paweł Jastrzębski
dc3498b74c Escape special characters in TOC 2015-10-22 16:11:41 +02:00
Paweł Jastrzębski
f317a5c430 Overhaul of converter internals 2015-10-20 09:54:22 +02:00
Paweł Jastrzębski
3bedc3b928 Windows: Miscellaneous tweaks 2015-10-13 19:08:55 +02:00
Paweł Jastrzębski
a2651747cd Build tweaks 2015-10-13 18:42:24 +02:00
Paweł Jastrzębski
af2c4e7250 OS X: GUI tweak 2015-10-11 11:31:18 +02:00
Paweł Jastrzębski
f93ced8939 Migrated to PyInstaller 2015-10-02 20:01:21 +02:00
Paweł Jastrzębski
8a0ba682c3 Binary blob cleanup 2015-09-30 17:04:12 +02:00
Paweł Jastrzębski
1a7b6baaf3 Windows: Miscellenaus tweaks 2015-09-30 16:51:54 +02:00
Paweł Jastrzębski
0f8daaf9f3 OS X: GUI tweak for Retina display (close #158) 2015-09-28 22:34:00 +02:00
Paweł Jastrzębski
1fa6d315b1 Merge pull request #156 from ciromattia/dev
4.6.5
2015-09-17 15:44:42 +02:00
Paweł Jastrzębski
112917754a Fixed OS X GUI anomalies 2015-09-17 10:35:54 +02:00
Paweł Jastrzębski
65774c6f12 Updated README + version bump 2015-09-16 19:13:32 +02:00
Paweł Jastrzębski
7b3ce8827f Updated OS X build environment 2015-09-16 19:00:45 +02:00
Paweł Jastrzębski
b12825045b Fixed stupid typo 2015-09-16 11:52:17 +02:00
Paweł Jastrzębski
ac9f3a5d87 KindleGen detection tweak 2015-09-16 10:22:53 +02:00
Paweł Jastrzębski
00969a3739 Allow older PyQT 2015-09-16 08:47:59 +02:00
Paweł Jastrzębski
21f738b44a Yet another Windows file lock fix 2015-09-15 21:24:49 +02:00
Paweł Jastrzębski
f2238b16a6 os.access acts unpredictably on Windows 2015-09-15 17:44:55 +02:00
Paweł Jastrzębski
14f677ec68 Python 3.5+ include scandir 2015-09-15 15:44:52 +02:00
Paweł Jastrzębski
7b3bf4618f Yet another Windows file lock fixes 2015-09-12 09:48:17 +02:00
40 changed files with 7393 additions and 7817 deletions

3
.gitignore vendored
View File

@@ -10,3 +10,6 @@ Output
test test
solaio solaio
kindlegen* kindlegen*
*.spec
setup.bat
setup.sh

26
Dockerfile Normal file
View File

@@ -0,0 +1,26 @@
# Recipe used to build DEB package
FROM acidweb/kcc-base
MAINTAINER Paweł Jastrzębski <pawelj@iosphe.re>
ENV KCCVER 5.0
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 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

@@ -25,23 +25,23 @@ If you find **KCC** valuable you can consider donating to the authors:
## BINARY RELEASES ## BINARY RELEASES
You can find the latest released binary at the following links: You can find the latest released binary at the following links:
- **Windows (Vista or newer):** [http://kcc.iosphe.re/Windows/](http://kcc.iosphe.re/Windows/) - **Windows (64-bit only):** [http://kcc.iosphe.re/Windows/](http://kcc.iosphe.re/Windows/)
- **Linux:** [http://kcc.iosphe.re/Linux/](http://kcc.iosphe.re/Linux/) - **Linux (Glibc 2.19+):** [http://kcc.iosphe.re/Linux/](http://kcc.iosphe.re/Linux/)
- **OS X (10.8+):** [http://kcc.iosphe.re/OSX/](http://kcc.iosphe.re/OSX/) - **OS X (10.9+):** [http://kcc.iosphe.re/OSX/](http://kcc.iosphe.re/OSX/)
## 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.4.0+ - [PyQt](http://www.riverbankcomputing.co.uk/software/pyqt/download5) 5.2.1+ _(5.5+ is recommended)_
- [Pillow](http://pypi.python.org/pypi/Pillow/) 2.8.2+ - [Pillow](http://pypi.python.org/pypi/Pillow/) 3.0.0+
- [psutil](https://pypi.python.org/pypi/psutil) 3.0.0+ - [psutil](https://pypi.python.org/pypi/psutil) 3.2.1+
- [python-slugify](http://pypi.python.org/pypi/python-slugify) 1.1.3+ - [python-slugify](http://pypi.python.org/pypi/python-slugify) 1.1.4+
- [scandir](https://pypi.python.org/pypi/scandir) 1.1.0+ - [scandir](https://pypi.python.org/pypi/scandir) 1.1.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 python3-pyqt5 libpng-dev libjpeg-dev p7zip-full unrar
sudo pip3 install pillow python-slugify psutil scandir sudo pip3 install --upgrade pillow python-slugify psutil scandir
``` ```
### Optional dependencies ### Optional dependencies
@@ -76,9 +76,7 @@ Options:
-p PROFILE, --profile=PROFILE -p PROFILE, --profile=PROFILE
Device profile (Available options: K1, K2, K345, KDX, Device profile (Available options: K1, K2, K345, KDX,
KPW, KV, KoMT, KoG, KoGHD, KoA, KoAHD, KoAH2O) [Default=KV] KPW, KV, KoMT, KoG, KoGHD, KoA, KoAHD, KoAH2O) [Default=KV]
-q QUALITY, --quality=QUALITY -m, --manga-style Manga style (right-to-left reading and splitting)
Quality of Panel View. 0 - Normal 1 - High 2 - Ultra [Default=0]
-m, --manga-style Manga style (Right-to-left reading and splitting)
-w, --webtoon Webtoon processing mode -w, --webtoon Webtoon processing mode
OUTPUT SETTINGS: OUTPUT SETTINGS:
@@ -87,22 +85,23 @@ Options:
-t TITLE, --title=TITLE -t TITLE, --title=TITLE
Comic title [Default=filename or directory name] Comic title [Default=filename or directory name]
-f FORMAT, --format=FORMAT -f FORMAT, --format=FORMAT
Output format (Available options: Auto, MOBI, Output format (Available options: Auto, MOBI, EPUB, CBZ)
EPUB, CBZ) [Default=Auto] [Default=Auto]
--batchsplit Split output into multiple files -b, --batchsplit Split output into multiple files
PROCESSING: PROCESSING:
-u, --upscale Resize images smaller than device's resolution
-s, --stretch Stretch images to device's resolution
-r SPLITTER, --splitter=SPLITTER
Double page parsing mode. 0: Split 1: Rotate 2: Both [Default=0]
-g GAMMA, --gamma=GAMMA
Apply gamma correction to linearize the image [Default=Auto]
--hq Enable high quality Panel View
--blackborders Disable autodetection and force black borders --blackborders Disable autodetection and force black borders
--whiteborders Disable autodetection and force white borders --whiteborders Disable autodetection and force white borders
--forcecolor Don't convert images to grayscale --forcecolor Don't convert images to grayscale
--forcepng Create PNG files instead JPEG --forcepng Create PNG files instead JPEG
--gamma=GAMMA Apply gamma correction to linearize the image [Default=Auto] --nocutpagenumbers Don't try to cut page numbers from images
--nocutpagenumbers Don't try to cut page numbering on images
--noprocessing Don't apply image preprocessing
--nosplitrotate Disable splitting and rotation
--rotate Rotate landscape pages instead of splitting them
--stretch Stretch images to device's resolution
--upscale Resize images smaller than device's resolution
CUSTOM PROFILE: CUSTOM PROFILE:
--customwidth=CUSTOMWIDTH --customwidth=CUSTOMWIDTH
@@ -156,6 +155,17 @@ 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.0:
* Major overhaul of internal mechanisms and GUI
* Added cover upload feature
* Tweaked Webtoon parsing mode
* Fixed multiple smaller issues
* Migrated build enviroment to PyInstaller
####4.6.5:
* Fixed multiple Windows and OS X issues
* Allowed Linux release to use older PyQT5 version
####4.6.4: ####4.6.4:
* Fixed multiple Windows specific problems * Fixed multiple Windows specific problems
* Improved error handling * Improved error handling

View File

@@ -7,19 +7,19 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>420</width> <width>420</width>
<height>397</height> <height>390</height>
</rect> </rect>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>420</width> <width>420</width>
<height>397</height> <height>390</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>420</width> <width>420</width>
<height>397</height> <height>390</height>
</size> </size>
</property> </property>
<property name="font"> <property name="font">
@@ -38,144 +38,6 @@
<locale language="C" country="AnyCountry"/> <locale language="C" country="AnyCountry"/>
</property> </property>
<widget class="QWidget" name="Form"> <widget class="QWidget" name="Form">
<widget class="QFrame" name="OptionsAdvanced">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>1</x>
<y>254</y>
<width>421</width>
<height>61</height>
</rect>
</property>
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>9</pointsize>
</font>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>9</number>
</property>
<item row="1" column="0">
<widget class="QCheckBox" name="ProcessingBox">
<property name="font">
<font>
<family>DejaVu Sans</family>
</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;Disable image optimizations.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Input images must be already resized.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>No optimisation</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="UpscaleBox">
<property name="font">
<font>
<family>DejaVu Sans</family>
</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&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="3" column="1">
<widget class="QCheckBox" name="WebtoonBox">
<property name="font">
<font>
<family>DejaVu Sans</family>
</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;Enable special parsing mode for WebToons.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Webtoon mode</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QCheckBox" name="NoDitheringBox">
<property name="font">
<font>
<family>DejaVu Sans</family>
</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;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="3" column="0">
<widget class="QCheckBox" name="BorderBox">
<property name="font">
<font>
<family>DejaVu Sans</family>
</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&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>
<item row="1" column="2">
<widget class="QCheckBox" name="NoRotateBox">
<property name="font">
<font>
<family>DejaVu Sans</family>
</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;Disable page splitting and rotation.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>No split/rotate</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QComboBox" name="DeviceBox"> <widget class="QComboBox" name="DeviceBox">
<property name="geometry"> <property name="geometry">
<rect> <rect>
@@ -187,7 +49,6 @@
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>DejaVu Sans</family>
<pointsize>8</pointsize> <pointsize>8</pointsize>
</font> </font>
</property> </property>
@@ -209,7 +70,6 @@
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>DejaVu Sans</family>
<pointsize>8</pointsize> <pointsize>8</pointsize>
</font> </font>
</property> </property>
@@ -231,7 +91,6 @@
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>DejaVu Sans</family>
<pointsize>9</pointsize> <pointsize>9</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
@@ -262,7 +121,6 @@
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>DejaVu Sans</family>
<pointsize>8</pointsize> <pointsize>8</pointsize>
</font> </font>
</property> </property>
@@ -291,7 +149,6 @@
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>DejaVu Sans</family>
<pointsize>8</pointsize> <pointsize>8</pointsize>
</font> </font>
</property> </property>
@@ -320,7 +177,6 @@
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>DejaVu Sans</family>
<pointsize>8</pointsize> <pointsize>8</pointsize>
</font> </font>
</property> </property>
@@ -335,99 +191,166 @@
<normaloff>:/Other/icons/clear.png</normaloff>:/Other/icons/clear.png</iconset> <normaloff>:/Other/icons/clear.png</normaloff>:/Other/icons/clear.png</iconset>
</property> </property>
</widget> </widget>
<widget class="QFrame" name="OptionsBasic"> <widget class="QFrame" name="Options">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>1</x> <x>10</x>
<y>230</y> <y>237</y>
<width>421</width> <width>401</width>
<height>41</height> <height>70</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>DejaVu Sans</family>
<pointsize>9</pointsize> <pointsize>9</pointsize>
</font> </font>
</property> </property>
<widget class="QCheckBox" name="MangaBox"> <layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0">
<property name="geometry"> <property name="leftMargin">
<rect> <number>0</number>
<x>9</x>
<y>10</y>
<width>130</width>
<height>18</height>
</rect>
</property> </property>
<property name="font"> <property name="topMargin">
<font> <number>0</number>
<family>DejaVu Sans</family>
</font>
</property> </property>
<property name="focusPolicy"> <property name="rightMargin">
<enum>Qt::NoFocus</enum> <number>0</number>
</property> </property>
<property name="toolTip"> <property name="bottomMargin">
<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> <number>0</number>
</property> </property>
<property name="text"> <property name="horizontalSpacing">
<string>Manga mode</string> <number>25</number>
</property> </property>
</widget> <property name="verticalSpacing">
<widget class="QCheckBox" name="QualityBox"> <number>4</number>
<property name="geometry">
<rect>
<x>282</x>
<y>10</y>
<width>135</width>
<height>18</height>
</rect>
</property> </property>
<property name="font"> <item row="2" column="0">
<font> <widget class="QCheckBox" name="MangaBox">
<family>DejaVu Sans</family> <property name="focusPolicy">
</font> <enum>Qt::NoFocus</enum>
</property> </property>
<property name="focusPolicy"> <property name="toolTip">
<enum>Qt::NoFocus</enum> <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>
<property name="toolTip"> <property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Quality of Panel View/zoom. Highly impact size of output file.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;This option control only quality of magnification!&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>Manga mode</string>
</property> </property>
<property name="text"> </widget>
<string>High/Ultra quality</string> </item>
</property> <item row="2" column="1">
<property name="tristate"> <widget class="QCheckBox" name="RotateBox">
<bool>true</bool> <property name="focusPolicy">
</property> <enum>Qt::NoFocus</enum>
</widget> </property>
<widget class="QCheckBox" name="RotateBox"> <property name="toolTip">
<property name="geometry"> <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>
<rect> </property>
<x>145</x> <property name="text">
<y>10</y> <string>Spread splitter</string>
<width>130</width> </property>
<height>18</height> <property name="tristate">
</rect> <bool>true</bool>
</property> </property>
<property name="font"> </widget>
<font> </item>
<family>DejaVu Sans</family> <item row="2" column="2">
</font> <widget class="QCheckBox" name="QualityBox">
</property> <property name="focusPolicy">
<property name="focusPolicy"> <enum>Qt::NoFocus</enum>
<enum>Qt::NoFocus</enum> </property>
</property> <property name="toolTip">
<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>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Disable splitting of two-page spreads.&lt;br/&gt;They will be rotated instead.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> </property>
</property> <property name="text">
<property name="text"> <string>HQ zoom</string>
<string>Horizontal mode</string> </property>
</property> </widget>
</widget> </item>
<zorder>RotateBox</zorder> <item row="4" column="2">
<zorder>MangaBox</zorder> <widget class="QCheckBox" name="GammaBox">
<zorder>QualityBox</zorder> <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>
<widget class="QListWidget" name="JobList"> <widget class="QListWidget" name="JobList">
<property name="geometry"> <property name="geometry">
@@ -438,13 +361,6 @@
<height>101</height> <height>101</height>
</rect> </rect>
</property> </property>
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>8</pointsize>
<italic>false</italic>
</font>
</property>
<property name="focusPolicy"> <property name="focusPolicy">
<enum>Qt::NoFocus</enum> <enum>Qt::NoFocus</enum>
</property> </property>
@@ -464,51 +380,7 @@
</size> </size>
</property> </property>
</widget> </widget>
<widget class="QPushButton" name="BasicModeButton"> <widget class="QFrame" name="OptionsGamma">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>141</width>
<height>32</height>
</rect>
</property>
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>9</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Basic</string>
</property>
</widget>
<widget class="QPushButton" name="AdvModeButton">
<property name="geometry">
<rect>
<x>260</x>
<y>10</y>
<width>151</width>
<height>32</height>
</rect>
</property>
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>9</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Advanced</string>
</property>
</widget>
<widget class="QFrame" name="OptionsAdvancedGamma">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
@@ -517,60 +389,54 @@
<x>10</x> <x>10</x>
<y>305</y> <y>305</y>
<width>401</width> <width>401</width>
<height>41</height> <height>35</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>DejaVu Sans</family>
<pointsize>9</pointsize> <pointsize>9</pointsize>
</font> </font>
</property> </property>
<widget class="QLabel" name="GammaLabel"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="geometry"> <property name="spacing">
<rect> <number>15</number>
<x>15</x>
<y>0</y>
<width>100</width>
<height>40</height>
</rect>
</property> </property>
<property name="font"> <property name="leftMargin">
<font> <number>0</number>
<family>DejaVu Sans</family>
</font>
</property> </property>
<property name="text"> <property name="topMargin">
<string>Gamma: Auto</string> <number>0</number>
</property> </property>
</widget> <property name="rightMargin">
<widget class="QSlider" name="GammaSlider"> <number>0</number>
<property name="geometry">
<rect>
<x>110</x>
<y>10</y>
<width>275</width>
<height>22</height>
</rect>
</property> </property>
<property name="font"> <property name="bottomMargin">
<font> <number>0</number>
<family>DejaVu Sans</family>
</font>
</property> </property>
<property name="focusPolicy"> <item>
<enum>Qt::ClickFocus</enum> <widget class="QLabel" name="GammaLabel">
</property> <property name="text">
<property name="maximum"> <string>Gamma: Auto</string>
<number>500</number> </property>
</property> </widget>
<property name="singleStep"> </item>
<number>5</number> <item>
</property> <widget class="QSlider" name="GammaSlider">
<property name="orientation"> <property name="focusPolicy">
<enum>Qt::Horizontal</enum> <enum>Qt::ClickFocus</enum>
</property> </property>
</widget> <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>
<widget class="QProgressBar" name="ProgressBar"> <widget class="QProgressBar" name="ProgressBar">
<property name="geometry"> <property name="geometry">
@@ -583,7 +449,6 @@
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>DejaVu Sans</family>
<pointsize>10</pointsize> <pointsize>10</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
@@ -599,177 +464,119 @@
<string/> <string/>
</property> </property>
</widget> </widget>
<widget class="QFrame" name="OptionsExpert"> <widget class="QFrame" name="OptionsCustom">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>1</x> <x>10</x>
<y>337</y> <y>336</y>
<width>421</width> <width>401</width>
<height>41</height> <height>25</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>DejaVu Sans</family>
<pointsize>9</pointsize> <pointsize>9</pointsize>
</font> </font>
</property> </property>
<widget class="QCheckBox" name="ColorBox"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="geometry"> <property name="spacing">
<rect> <number>10</number>
<x>9</x>
<y>11</y>
<width>130</width>
<height>18</height>
</rect>
</property> </property>
<property name="font"> <property name="leftMargin">
<font> <number>0</number>
<family>DejaVu Sans</family>
</font>
</property> </property>
<property name="focusPolicy"> <property name="topMargin">
<enum>Qt::NoFocus</enum> <number>0</number>
</property> </property>
<property name="toolTip"> <property name="rightMargin">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Don't convert images to grayscale.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <number>0</number>
</property> </property>
<property name="text"> <property name="bottomMargin">
<string>Color mode</string> <number>0</number>
</property> </property>
</widget> <item>
<widget class="QFrame" name="OptionsExpertInternal"> <widget class="QLabel" name="wLabel">
<property name="geometry"> <property name="toolTip">
<rect> <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>
<x>105</x> </property>
<y>0</y> <property name="text">
<width>295</width> <string>Custom width: </string>
<height>40</height> </property>
</rect> </widget>
</property> </item>
<property name="font"> <item>
<font> <widget class="QLineEdit" name="customWidth">
<family>DejaVu Sans</family> <property name="sizePolicy">
</font> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
</property> <horstretch>0</horstretch>
<layout class="QGridLayout" name="gridLayout_2"> <verstretch>0</verstretch>
<item row="0" column="0"> </sizepolicy>
<widget class="QLabel" name="wLabel"> </property>
<property name="font"> <property name="focusPolicy">
<font> <enum>Qt::ClickFocus</enum>
<family>DejaVu Sans</family> </property>
</font> <property name="acceptDrops">
</property> <bool>false</bool>
<property name="toolTip"> </property>
<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 name="toolTip">
</property> <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 name="text"> </property>
<string>Custom width: </string> <property name="inputMask">
</property> <string>0000</string>
</widget> </property>
</item> <property name="maxLength">
<item row="0" column="1"> <number>4</number>
<widget class="QLineEdit" name="customWidth"> </property>
<property name="sizePolicy"> </widget>
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> </item>
<horstretch>0</horstretch> <item>
<verstretch>0</verstretch> <widget class="QLabel" name="hLabel">
</sizepolicy> <property name="toolTip">
</property> <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 name="maximumSize"> </property>
<size> <property name="text">
<width>40</width> <string>Custom height: </string>
<height>16777215</height> </property>
</size> </widget>
</property> </item>
<property name="font"> <item>
<font> <widget class="QLineEdit" name="customHeight">
<family>DejaVu Sans</family> <property name="sizePolicy">
</font> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
</property> <horstretch>0</horstretch>
<property name="focusPolicy"> <verstretch>0</verstretch>
<enum>Qt::ClickFocus</enum> </sizepolicy>
</property> </property>
<property name="acceptDrops"> <property name="focusPolicy">
<bool>false</bool> <enum>Qt::ClickFocus</enum>
</property> </property>
<property name="toolTip"> <property name="acceptDrops">
<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> <bool>false</bool>
</property> </property>
<property name="inputMask"> <property name="toolTip">
<string>0000</string> <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>
<property name="maxLength"> <property name="inputMask">
<number>4</number> <string>0000</string>
</property> </property>
</widget> <property name="maxLength">
</item> <number>4</number>
<item row="0" column="2"> </property>
<widget class="QLabel" name="hLabel"> </widget>
<property name="font"> </item>
<font> </layout>
<family>DejaVu Sans</family>
</font>
</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="text">
<string>Custom height: </string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLineEdit" name="customHeight">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<family>DejaVu Sans</family>
</font>
</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> </widget>
<widget class="QPushButton" name="EditorButton"> <widget class="QPushButton" name="EditorButton">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>160</x> <x>10</x>
<y>10</y> <y>10</y>
<width>91</width> <width>200</width>
<height>32</height> <height>32</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>DejaVu Sans</family>
<pointsize>9</pointsize> <pointsize>9</pointsize>
</font> </font>
</property> </property>
@@ -784,26 +591,48 @@
<normaloff>:/Other/icons/editor.png</normaloff>:/Other/icons/editor.png</iconset> <normaloff>:/Other/icons/editor.png</normaloff>:/Other/icons/editor.png</iconset>
</property> </property>
</widget> </widget>
<zorder>OptionsAdvanced</zorder> <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>DeviceBox</zorder>
<zorder>FormatBox</zorder> <zorder>FormatBox</zorder>
<zorder>ConvertButton</zorder> <zorder>ConvertButton</zorder>
<zorder>DirectoryButton</zorder> <zorder>DirectoryButton</zorder>
<zorder>FileButton</zorder> <zorder>FileButton</zorder>
<zorder>ClearButton</zorder> <zorder>ClearButton</zorder>
<zorder>OptionsBasic</zorder> <zorder>Options</zorder>
<zorder>JobList</zorder> <zorder>JobList</zorder>
<zorder>BasicModeButton</zorder> <zorder>OptionsGamma</zorder>
<zorder>AdvModeButton</zorder> <zorder>OptionsCustom</zorder>
<zorder>OptionsAdvancedGamma</zorder>
<zorder>OptionsExpert</zorder>
<zorder>EditorButton</zorder> <zorder>EditorButton</zorder>
<zorder>WikiButton</zorder>
<zorder>ProgressBar</zorder> <zorder>ProgressBar</zorder>
</widget> </widget>
<widget class="QStatusBar" name="statusBar"> <widget class="QStatusBar" name="statusBar">
<property name="font"> <property name="font">
<font> <font>
<family>DejaVu Sans</family>
<pointsize>8</pointsize> <pointsize>8</pointsize>
</font> </font>
</property> </property>

File diff suppressed because it is too large Load Diff

View File

@@ -18,6 +18,7 @@
<file>../icons/warning.png</file> <file>../icons/warning.png</file>
</qresource> </qresource>
<qresource prefix="Other"> <qresource prefix="Other">
<file>../icons/wiki.png</file>
<file>../icons/editor.png</file> <file>../icons/editor.png</file>
<file>../icons/list_background.png</file> <file>../icons/list_background.png</file>
<file>../icons/clear.png</file> <file>../icons/clear.png</file>

View File

@@ -7,19 +7,19 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>420</width> <width>420</width>
<height>397</height> <height>390</height>
</rect> </rect>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>420</width> <width>420</width>
<height>397</height> <height>390</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>420</width> <width>420</width>
<height>397</height> <height>390</height>
</size> </size>
</property> </property>
<property name="font"> <property name="font">
@@ -38,113 +38,6 @@
<locale language="C" country="AnyCountry"/> <locale language="C" country="AnyCountry"/>
</property> </property>
<widget class="QWidget" name="Form"> <widget class="QWidget" name="Form">
<widget class="QFrame" name="OptionsAdvanced">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>254</y>
<width>421</width>
<height>61</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>9</number>
</property>
<item row="1" column="0">
<widget class="QCheckBox" name="ProcessingBox">
<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 image optimizations.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Input images must be already resized.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>No optimisation</string>
</property>
</widget>
</item>
<item row="1" 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="3" column="1">
<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 WebToons.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Webtoon mode</string>
</property>
</widget>
</item>
<item row="3" column="2">
<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="3" 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>
<item row="1" column="2">
<widget class="QCheckBox" name="NoRotateBox">
<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 page splitting and rotation.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>No split/rotate</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QComboBox" name="DeviceBox"> <widget class="QComboBox" name="DeviceBox">
<property name="geometry"> <property name="geometry">
<rect> <rect>
@@ -298,13 +191,13 @@
<normaloff>:/Other/icons/clear.png</normaloff>:/Other/icons/clear.png</iconset> <normaloff>:/Other/icons/clear.png</normaloff>:/Other/icons/clear.png</iconset>
</property> </property>
</widget> </widget>
<widget class="QFrame" name="OptionsBasic"> <widget class="QFrame" name="Options">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>10</x>
<y>230</y> <y>237</y>
<width>421</width> <width>401</width>
<height>41</height> <height>70</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
@@ -312,69 +205,152 @@
<pointsize>9</pointsize> <pointsize>9</pointsize>
</font> </font>
</property> </property>
<widget class="QCheckBox" name="MangaBox"> <layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0">
<property name="geometry"> <property name="leftMargin">
<rect> <number>0</number>
<x>9</x>
<y>10</y>
<width>130</width>
<height>18</height>
</rect>
</property> </property>
<property name="focusPolicy"> <property name="topMargin">
<enum>Qt::NoFocus</enum> <number>0</number>
</property> </property>
<property name="toolTip"> <property name="rightMargin">
<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> <number>0</number>
</property> </property>
<property name="text"> <property name="bottomMargin">
<string>Manga mode</string> <number>0</number>
</property> </property>
</widget> <property name="horizontalSpacing">
<widget class="QCheckBox" name="QualityBox"> <number>40</number>
<property name="geometry">
<rect>
<x>282</x>
<y>10</y>
<width>130</width>
<height>18</height>
</rect>
</property> </property>
<property name="focusPolicy"> <property name="verticalSpacing">
<enum>Qt::NoFocus</enum> <number>5</number>
</property> </property>
<property name="toolTip"> <item row="2" column="0">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Quality of Panel View/zoom. Highly impact size of output file.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;This option control only quality of magnification!&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <widget class="QCheckBox" name="MangaBox">
</property> <property name="focusPolicy">
<property name="text"> <enum>Qt::NoFocus</enum>
<string>High/Ultra quality</string> </property>
</property> <property name="toolTip">
<property name="tristate"> <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>
<bool>true</bool> </property>
</property> <property name="text">
</widget> <string>Manga mode</string>
<widget class="QCheckBox" name="RotateBox"> </property>
<property name="geometry"> </widget>
<rect> </item>
<x>145</x> <item row="2" column="1">
<y>10</y> <widget class="QCheckBox" name="RotateBox">
<width>130</width> <property name="focusPolicy">
<height>18</height> <enum>Qt::NoFocus</enum>
</rect> </property>
</property> <property name="toolTip">
<property name="focusPolicy"> <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>
<enum>Qt::NoFocus</enum> </property>
</property> <property name="text">
<property name="toolTip"> <string>Spread splitter</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Disable splitting of two-page spreads.&lt;br/&gt;They will be rotated instead.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> </property>
</property> <property name="tristate">
<property name="text"> <bool>true</bool>
<string>Horizontal mode</string> </property>
</property> </widget>
</widget> </item>
<zorder>RotateBox</zorder> <item row="2" column="2">
<zorder>MangaBox</zorder> <widget class="QCheckBox" name="QualityBox">
<zorder>QualityBox</zorder> <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>
<widget class="QListWidget" name="JobList"> <widget class="QListWidget" name="JobList">
<property name="geometry"> <property name="geometry">
@@ -404,49 +380,7 @@
<enum>QAbstractItemView::ScrollPerPixel</enum> <enum>QAbstractItemView::ScrollPerPixel</enum>
</property> </property>
</widget> </widget>
<widget class="QPushButton" name="BasicModeButton"> <widget class="QFrame" name="OptionsGamma">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>141</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>Basic</string>
</property>
</widget>
<widget class="QPushButton" name="AdvModeButton">
<property name="geometry">
<rect>
<x>261</x>
<y>10</y>
<width>151</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>Advanced</string>
</property>
</widget>
<widget class="QFrame" name="OptionsAdvancedGamma">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
@@ -455,7 +389,7 @@
<x>10</x> <x>10</x>
<y>305</y> <y>305</y>
<width>401</width> <width>401</width>
<height>41</height> <height>35</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
@@ -463,41 +397,46 @@
<pointsize>9</pointsize> <pointsize>9</pointsize>
</font> </font>
</property> </property>
<widget class="QLabel" name="GammaLabel"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="geometry"> <property name="spacing">
<rect> <number>15</number>
<x>15</x>
<y>0</y>
<width>100</width>
<height>40</height>
</rect>
</property> </property>
<property name="text"> <property name="leftMargin">
<string>Gamma: Auto</string> <number>0</number>
</property> </property>
</widget> <property name="topMargin">
<widget class="QSlider" name="GammaSlider"> <number>0</number>
<property name="geometry">
<rect>
<x>110</x>
<y>10</y>
<width>270</width>
<height>22</height>
</rect>
</property> </property>
<property name="focusPolicy"> <property name="rightMargin">
<enum>Qt::ClickFocus</enum> <number>0</number>
</property> </property>
<property name="maximum"> <property name="bottomMargin">
<number>500</number> <number>0</number>
</property> </property>
<property name="singleStep"> <item>
<number>5</number> <widget class="QLabel" name="GammaLabel">
</property> <property name="text">
<property name="orientation"> <string>Gamma: Auto</string>
<enum>Qt::Horizontal</enum> </property>
</property> </widget>
</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>
<widget class="QProgressBar" name="ProgressBar"> <widget class="QProgressBar" name="ProgressBar">
<property name="geometry"> <property name="geometry">
@@ -525,13 +464,13 @@
<string/> <string/>
</property> </property>
</widget> </widget>
<widget class="QFrame" name="OptionsExpert"> <widget class="QFrame" name="OptionsCustom">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>10</x>
<y>337</y> <y>340</y>
<width>421</width> <width>401</width>
<height>41</height> <height>25</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
@@ -539,126 +478,100 @@
<pointsize>9</pointsize> <pointsize>9</pointsize>
</font> </font>
</property> </property>
<widget class="QCheckBox" name="ColorBox"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="geometry"> <property name="spacing">
<rect> <number>15</number>
<x>9</x>
<y>11</y>
<width>130</width>
<height>18</height>
</rect>
</property> </property>
<property name="focusPolicy"> <property name="leftMargin">
<enum>Qt::NoFocus</enum> <number>0</number>
</property> </property>
<property name="toolTip"> <property name="topMargin">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Don't convert images to grayscale.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <number>0</number>
</property> </property>
<property name="text"> <property name="rightMargin">
<string>Color mode</string> <number>0</number>
</property> </property>
</widget> <property name="bottomMargin">
<widget class="QFrame" name="OptionsExpertInternal"> <number>0</number>
<property name="geometry">
<rect>
<x>100</x>
<y>0</y>
<width>295</width>
<height>40</height>
</rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <item>
<item row="0" column="0"> <widget class="QLabel" name="wLabel">
<widget class="QLabel" name="wLabel"> <property name="toolTip">
<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>
<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> <property name="text">
<property name="text"> <string>Custom width: </string>
<string>Custom width: </string> </property>
</property> </widget>
</widget> </item>
</item> <item>
<item row="0" column="1"> <widget class="QLineEdit" name="customWidth">
<widget class="QLineEdit" name="customWidth"> <property name="sizePolicy">
<property name="sizePolicy"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <horstretch>0</horstretch>
<horstretch>0</horstretch> <verstretch>0</verstretch>
<verstretch>0</verstretch> </sizepolicy>
</sizepolicy> </property>
</property> <property name="focusPolicy">
<property name="maximumSize"> <enum>Qt::ClickFocus</enum>
<size> </property>
<width>40</width> <property name="acceptDrops">
<height>16777215</height> <bool>false</bool>
</size> </property>
</property> <property name="toolTip">
<property name="focusPolicy"> <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>
<enum>Qt::ClickFocus</enum> </property>
</property> <property name="inputMask">
<property name="acceptDrops"> <string>0000</string>
<bool>false</bool> </property>
</property> <property name="maxLength">
<property name="toolTip"> <number>4</number>
<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> </widget>
<property name="inputMask"> </item>
<string>0000</string> <item>
</property> <widget class="QLabel" name="hLabel">
<property name="maxLength"> <property name="toolTip">
<number>4</number> <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>
</widget> <property name="text">
</item> <string>Custom height: </string>
<item row="0" column="2"> </property>
<widget class="QLabel" name="hLabel"> </widget>
<property name="toolTip"> </item>
<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> <item>
</property> <widget class="QLineEdit" name="customHeight">
<property name="text"> <property name="sizePolicy">
<string>Custom height: </string> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
</property> <horstretch>0</horstretch>
</widget> <verstretch>0</verstretch>
</item> </sizepolicy>
<item row="0" column="3"> </property>
<widget class="QLineEdit" name="customHeight"> <property name="focusPolicy">
<property name="sizePolicy"> <enum>Qt::ClickFocus</enum>
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> </property>
<horstretch>0</horstretch> <property name="acceptDrops">
<verstretch>0</verstretch> <bool>false</bool>
</sizepolicy> </property>
</property> <property name="toolTip">
<property name="maximumSize"> <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>
<size> </property>
<width>40</width> <property name="inputMask">
<height>16777215</height> <string>0000</string>
</size> </property>
</property> <property name="maxLength">
<property name="focusPolicy"> <number>4</number>
<enum>Qt::ClickFocus</enum> </property>
</property> </widget>
<property name="acceptDrops"> </item>
<bool>false</bool> </layout>
</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> </widget>
<widget class="QPushButton" name="EditorButton"> <widget class="QPushButton" name="EditorButton">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>160</x> <x>10</x>
<y>10</y> <y>10</y>
<width>91</width> <width>200</width>
<height>32</height> <height>32</height>
</rect> </rect>
</property> </property>
@@ -678,20 +591,43 @@
<normaloff>:/Other/icons/editor.png</normaloff>:/Other/icons/editor.png</iconset> <normaloff>:/Other/icons/editor.png</normaloff>:/Other/icons/editor.png</iconset>
</property> </property>
</widget> </widget>
<zorder>OptionsAdvanced</zorder> <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>DeviceBox</zorder>
<zorder>FormatBox</zorder> <zorder>FormatBox</zorder>
<zorder>ConvertButton</zorder> <zorder>ConvertButton</zorder>
<zorder>DirectoryButton</zorder> <zorder>DirectoryButton</zorder>
<zorder>FileButton</zorder> <zorder>FileButton</zorder>
<zorder>ClearButton</zorder> <zorder>ClearButton</zorder>
<zorder>OptionsBasic</zorder> <zorder>Options</zorder>
<zorder>JobList</zorder> <zorder>JobList</zorder>
<zorder>BasicModeButton</zorder> <zorder>OptionsGamma</zorder>
<zorder>AdvModeButton</zorder> <zorder>OptionsCustom</zorder>
<zorder>OptionsAdvancedGamma</zorder>
<zorder>OptionsExpert</zorder>
<zorder>EditorButton</zorder> <zorder>EditorButton</zorder>
<zorder>WikiButton</zorder>
<zorder>ProgressBar</zorder> <zorder>ProgressBar</zorder>
</widget> </widget>
<widget class="QStatusBar" name="statusBar"> <widget class="QStatusBar" name="statusBar">

View File

@@ -7,19 +7,19 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>400</width> <width>400</width>
<height>320</height> <height>290</height>
</rect> </rect>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>400</width> <width>400</width>
<height>320</height> <height>290</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>400</width> <width>400</width>
<height>320</height> <height>290</height>
</size> </size>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@@ -33,7 +33,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>10</x>
<y>280</y> <y>250</y>
<width>381</width> <width>381</width>
<height>31</height> <height>31</height>
</rect> </rect>
@@ -49,7 +49,7 @@
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>10</pointsize> <pointsize>9</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
</font> </font>
@@ -113,7 +113,7 @@
<x>10</x> <x>10</x>
<y>10</y> <y>10</y>
<width>381</width> <width>381</width>
<height>271</height> <height>241</height>
</rect> </rect>
</property> </property>
<widget class="QWidget" name="formLayoutWidget"> <widget class="QWidget" name="formLayoutWidget">
@@ -214,10 +214,9 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<zorder>formLayoutWidget</zorder>
<zorder>horizontalLayoutWidget</zorder>
</widget> </widget>
<zorder>horizontalLayoutWidget</zorder>
<zorder>EditorFrame</zorder>
<zorder>StatusLabel</zorder>
</widget> </widget>
<resources> <resources>
<include location="KCC.qrc"/> <include location="KCC.qrc"/>

BIN
icons/wiki.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -33,5 +33,4 @@ from kcc.comic2ebook import main
if __name__ == "__main__": if __name__ == "__main__":
freeze_support() freeze_support()
print('comic2ebook v' + __version__ + ' - Written by Ciro Mattia Gonano and Pawel Jastrzebski.') print('comic2ebook v' + __version__ + ' - Written by Ciro Mattia Gonano and Pawel Jastrzebski.')
main(sys.argv[1:]) sys.exit(main(sys.argv[1:]))
sys.exit(0)

View File

@@ -33,5 +33,4 @@ from kcc.comic2panel import main
if __name__ == "__main__": if __name__ == "__main__":
freeze_support() freeze_support()
print('comic2panel v' + __version__ + ' - Written by Ciro Mattia Gonano and Pawel Jastrzebski.') print('comic2panel v' + __version__ + ' - Written by Ciro Mattia Gonano and Pawel Jastrzebski.')
main(sys.argv[1:]) sys.exit(main(sys.argv[1:]))
sys.exit(0)

27
kcc.iss
View File

@@ -1,5 +1,5 @@
#define MyAppName "Kindle Comic Converter" #define MyAppName "Kindle Comic Converter"
#define MyAppVersion "4.6.4" #define MyAppVersion "5.0"
#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"
@@ -13,6 +13,7 @@ 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-2015 Ciro Mattia Gonano and Paweł Jastrzębski
ArchitecturesAllowed=x64
DefaultDirName={pf}\{#MyAppName} DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName} DefaultGroupName={#MyAppName}
AllowNoIcons=yes AllowNoIcons=yes
@@ -20,7 +21,6 @@ LicenseFile=LICENSE.txt
OutputBaseFilename=KindleComicConverter_win_{#MyAppVersion} OutputBaseFilename=KindleComicConverter_win_{#MyAppVersion}
SetupIconFile=icons\comic2ebook.ico SetupIconFile=icons\comic2ebook.ico
SolidCompression=yes SolidCompression=yes
ArchitecturesInstallIn64BitMode=x64
ShowLanguageDialog=no ShowLanguageDialog=no
LanguageDetectionMethod=none LanguageDetectionMethod=none
WizardImageFile=icons\Wizard.bmp WizardImageFile=icons\Wizard.bmp
@@ -28,9 +28,10 @@ WizardSmallImageFile=icons\Wizard-Small.bmp
UninstallDisplayName={#MyAppName} UninstallDisplayName={#MyAppName}
UninstallDisplayIcon={app}\{#MyAppExeName} UninstallDisplayIcon={app}\{#MyAppExeName}
ChangesAssociations=True ChangesAssociations=True
InfoAfterFile=other\InstallWarning.rtf InfoAfterFile=other\windows\InstallWarning.rtf
SignTool=SignTool /d $q{#MyAppName}$q /du $q{#MyAppURL}$q $f SignTool=SignTool /d $q{#MyAppName}$q /du $q{#MyAppURL}$q $f
MinVersion=0,6.0 MinVersion=0,6.0
OutputDir=dist
[Languages] [Languages]
Name: "english"; MessagesFile: "compiler:Default.isl" Name: "english"; MessagesFile: "compiler:Default.isl"
@@ -42,21 +43,11 @@ Name: "CBRassociation"; Description: "CBR"; GroupDescription: "File associations
Name: "CB7association"; Description: "CB7"; GroupDescription: "File associations:" Name: "CB7association"; Description: "CB7"; GroupDescription: "File associations:"
[Files] [Files]
; x64 files Source: "dist\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "dist_64\platforms\*"; DestDir: "{app}\platforms\"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "dist_64\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "dist_64\*.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "other\vcredist_x64.exe"; DestDir: "{tmp}"; Flags: ignoreversion deleteafterinstall; Check: Is64BitInstallMode
; x86 files
Source: "dist\platforms\*"; DestDir: "{app}\platforms\"; Flags: ignoreversion; Check: not Is64BitInstallMode
Source: "dist\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
Source: "dist\*.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
Source: "other\vcredist_x86.exe"; DestDir: "{tmp}"; Flags: ignoreversion deleteafterinstall; Check: not Is64BitInstallMode
; Common files
Source: "LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion solidbreak Source: "LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion solidbreak
Source: "other\Additional-LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion Source: "other\windows\Additional-LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "other\UnRAR.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "other\windows\UnRAR.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "other\7za.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "other\windows\7za.exe"; DestDir: "{app}"; Flags: ignoreversion
[Icons] [Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
@@ -65,8 +56,6 @@ Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks:
[Run] [Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall
Filename: "{tmp}\vcredist_x64.exe"; Parameters: "/passive /Q:a /c:""msiexec /qb /i vcredist.msi"" "; StatusMsg: "Installing Microsoft Visual C++ 2010 Redistributable Package..."; Check: Is64BitInstallMode
Filename: "{tmp}\vcredist_x86.exe"; Parameters: "/passive /Q:a /c:""msiexec /qb /i vcredist.msi"" "; StatusMsg: "Installing Microsoft Visual C++ 2010 Redistributable Package..."; Check: not Is64BitInstallMode
[Messages] [Messages]
WelcomeLabel1=Welcome to the KCC Setup Wizard WelcomeLabel1=Welcome to the KCC Setup Wizard

40
kcc.py
View File

@@ -23,28 +23,38 @@ if sys.version_info[0] != 3:
print('ERROR: This is Python 3 script!') print('ERROR: This is Python 3 script!')
exit(1) exit(1)
# OS specific PATH variable workarounds # OS specific workarounds
import os import os
if sys.platform.startswith('darwin'): if sys.platform.startswith('darwin'):
if 'RESOURCEPATH' not in os.environ: if getattr(sys, 'frozen', False):
os.environ['PATH'] = os.path.dirname(os.path.abspath(__file__)) + '/other/:' + os.environ['PATH'] os.environ['PATH'] = os.path.dirname(os.path.abspath(sys.executable)) + \
'/../Resources:/usr/local/bin:/usr/bin:/bin'
os.system('defaults write com.kindlecomicconverter.KindleComicConverter ApplePersistenceIgnoreState YES')
os.system('defaults write com.kindlecomicconverter.KindleComicConverter NSInitialToolTipDelay -int 1000')
else: else:
os.environ['PATH'] = './../Resources:/usr/local/bin:/usr/bin:/bin' os.environ['PATH'] = os.path.dirname(os.path.abspath(__file__)) + '/other/osx/:' + os.environ['PATH']
elif sys.platform.startswith('win'): elif sys.platform.startswith('win'):
import multiprocessing.popen_spawn_win32 as forking
class _Popen(forking.Popen):
def __init__(self, *args, **kw):
if hasattr(sys, 'frozen'):
# noinspection PyProtectedMember
os.putenv('_MEIPASS2', sys._MEIPASS)
try:
super(_Popen, self).__init__(*args, **kw)
finally:
if hasattr(sys, 'frozen'):
if hasattr(os, 'unsetenv'):
os.unsetenv('_MEIPASS2')
else:
os.putenv('_MEIPASS2', '')
forking.Popen = _Popen
if getattr(sys, 'frozen', False): if getattr(sys, 'frozen', False):
os.chdir(os.path.dirname(os.path.abspath(sys.executable))) os.chdir(os.path.dirname(os.path.abspath(sys.executable)))
# Implementing dummy stdout and stderr for frozen Windows release
class FakeSTD(object):
def write(self, string):
pass
def flush(self):
pass
sys.stdout = FakeSTD()
sys.stderr = FakeSTD()
else: else:
os.environ['PATH'] = os.path.dirname(os.path.abspath(__file__)) + '/other/;' + 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__)))
from kcc.shared import dependencyCheck from kcc.shared import dependencyCheck

View File

@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'gui/MetaEditor.ui' # Form implementation generated from reading ui file 'gui/MetaEditor-Linux.ui'
# #
# Created: Sun Feb 8 03:24:23 2015 # Created: Wed Oct 28 08:59:02 2015
# by: PyQt5 UI code generator 5.2.1 # by: PyQt5 UI code generator 5.2.1
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
@@ -12,14 +12,14 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MetaEditorDialog(object): class Ui_MetaEditorDialog(object):
def setupUi(self, MetaEditorDialog): def setupUi(self, MetaEditorDialog):
MetaEditorDialog.setObjectName("MetaEditorDialog") MetaEditorDialog.setObjectName("MetaEditorDialog")
MetaEditorDialog.resize(400, 320) MetaEditorDialog.resize(400, 290)
MetaEditorDialog.setMinimumSize(QtCore.QSize(400, 320)) MetaEditorDialog.setMinimumSize(QtCore.QSize(400, 290))
MetaEditorDialog.setMaximumSize(QtCore.QSize(400, 320)) MetaEditorDialog.setMaximumSize(QtCore.QSize(400, 290))
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)
MetaEditorDialog.setWindowIcon(icon) MetaEditorDialog.setWindowIcon(icon)
self.horizontalLayoutWidget = QtWidgets.QWidget(MetaEditorDialog) self.horizontalLayoutWidget = QtWidgets.QWidget(MetaEditorDialog)
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(10, 280, 381, 31)) self.horizontalLayoutWidget.setGeometry(QtCore.QRect(10, 250, 381, 31))
self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget") self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget) self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
@@ -31,7 +31,7 @@ class Ui_MetaEditorDialog(object):
sizePolicy.setHeightForWidth(self.StatusLabel.sizePolicy().hasHeightForWidth()) sizePolicy.setHeightForWidth(self.StatusLabel.sizePolicy().hasHeightForWidth())
self.StatusLabel.setSizePolicy(sizePolicy) self.StatusLabel.setSizePolicy(sizePolicy)
font = QtGui.QFont() font = QtGui.QFont()
font.setPointSize(10) font.setPointSize(9)
font.setBold(True) font.setBold(True)
font.setWeight(75) font.setWeight(75)
self.StatusLabel.setFont(font) self.StatusLabel.setFont(font)
@@ -69,7 +69,7 @@ class Ui_MetaEditorDialog(object):
self.CancelButton.setObjectName("CancelButton") self.CancelButton.setObjectName("CancelButton")
self.horizontalLayout.addWidget(self.CancelButton) self.horizontalLayout.addWidget(self.CancelButton)
self.EditorFrame = QtWidgets.QFrame(MetaEditorDialog) self.EditorFrame = QtWidgets.QFrame(MetaEditorDialog)
self.EditorFrame.setGeometry(QtCore.QRect(10, 10, 381, 271)) self.EditorFrame.setGeometry(QtCore.QRect(10, 10, 381, 241))
self.EditorFrame.setObjectName("EditorFrame") self.EditorFrame.setObjectName("EditorFrame")
self.formLayoutWidget = QtWidgets.QWidget(self.EditorFrame) self.formLayoutWidget = QtWidgets.QWidget(self.EditorFrame)
self.formLayoutWidget.setGeometry(QtCore.QRect(0, 0, 381, 266)) self.formLayoutWidget.setGeometry(QtCore.QRect(0, 0, 381, 266))

View File

@@ -21,12 +21,9 @@ import os
import sys import sys
from urllib.parse import unquote from urllib.parse import unquote
from urllib.request import urlopen, urlretrieve, Request from urllib.request import urlopen, urlretrieve, Request
from socket import gethostbyname_ex, gethostname
from time import sleep, time from time import sleep, time
from datetime import datetime from datetime import datetime
from shutil import move from shutil import move
from http.server import BaseHTTPRequestHandler, HTTPServer
from socketserver import ThreadingMixIn
from subprocess import STDOUT, PIPE from subprocess import STDOUT, PIPE
from PyQt5 import QtGui, QtCore, QtWidgets, QtNetwork from PyQt5 import QtGui, QtCore, QtWidgets, QtNetwork
from xml.dom.minidom import parse, Document from xml.dom.minidom import parse, Document
@@ -38,8 +35,8 @@ from platform import platform
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 KCC_rc_web
from . import metadata from . import metadata
from . import kindle
if sys.platform.startswith('darwin'): if sys.platform.startswith('darwin'):
from . import KCC_ui_osx as KCC_ui from . import KCC_ui_osx as KCC_ui
elif sys.platform.startswith('linux'): elif sys.platform.startswith('linux'):
@@ -137,101 +134,6 @@ class Icons:
self.programIcon.addPixmap(QtGui.QPixmap(":/Icon/icons/comic2ebook.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.programIcon.addPixmap(QtGui.QPixmap(":/Icon/icons/comic2ebook.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
class WebServerHandler(BaseHTTPRequestHandler):
# noinspection PyAttributeOutsideInit
def do_GET(self):
if self.path == '/':
self.path = '/index.html'
try:
sendReply = False
mimetype = None
if self.path.endswith('.mobi'):
mimetype = 'application/x-mobipocket-ebook'
sendReply = True
if self.path.endswith('.epub'):
mimetype = 'application/epub+zip'
sendReply = True
if self.path.endswith('.cbz'):
mimetype = 'application/x-cbz'
sendReply = True
if self.path == '/index.html':
self.send_response(200)
self.send_header('Content-type', 'text/html')
self.end_headers()
self.wfile.write(bytes('<!DOCTYPE html>\n'
'<html lang="en">\n'
'<head><meta charset="utf-8">\n'
'<link href="' + GUI.webContent.favicon + '" rel="icon" type="image/x-icon" />\n'
'<title>Kindle Comic Converter</title>\n'
'</head>\n'
'<body>\n'
'<div style="text-align: center; font-size:25px">\n'
'<p style="font-size:50px">- <img style="vertical-align: middle" '
'alt="KCC Logo" src="' + GUI.webContent.logo + '" /> -</p>\n', 'UTF-8'))
if len(GUI.completedWork) > 0 and not GUI.conversionAlive:
for key in sorted(GUI.completedWork.keys()):
self.wfile.write(bytes('<p><a href="' + key + '">' + key.split('.')[0] + '</a></p>\n', 'UTF-8'))
else:
self.wfile.write(bytes('<p style="font-weight: bold">No downloads are available.<br/>'
'Convert some files and refresh this page.</p>\n', 'UTF-8'))
self.wfile.write(bytes('</div>\n'
'</body>\n'
'</html>\n', 'UTF-8'))
elif sendReply:
outputFile = GUI.completedWork[unquote(self.path[1:])]
fp = open(outputFile, 'rb')
self.send_response(200)
self.send_header('Content-type', mimetype)
self.send_header('Content-Length', os.path.getsize(outputFile))
self.end_headers()
while True:
chunk = fp.read(8192)
if not chunk:
fp.close()
break
self.wfile.write(chunk)
return
except (IOError, LookupError):
self.send_error(404, 'File Not Found: %s' % self.path)
class WebServerThreaded(ThreadingMixIn, HTTPServer):
"""Handle requests in a separate thread."""
class WebServerThread(QtCore.QThread):
def __init__(self):
QtCore.QThread.__init__(self)
self.server = None
self.running = False
def __del__(self):
self.wait()
def run(self):
try:
# Sweet cross-platform one-liner to get LAN ip address
lIP = [ip for ip in gethostbyname_ex(gethostname())[2] if not ip.startswith("127.")][:1][0]
except Exception:
# Sadly it can fail on some Linux configurations
lIP = None
try:
self.server = WebServerThreaded(('', 4242), WebServerHandler)
self.running = True
if lIP:
MW.addMessage.emit('<b><a href="http://' + str(lIP) + ':4242/">Content server</a></b> started.', 'info',
False)
else:
MW.addMessage.emit('<b>Content server</b> started on port 4242.', 'info', False)
while self.running:
self.server.handle_request()
except Exception:
MW.addMessage.emit('<b>Content server</b> failed to start!', 'error', False)
def stop(self):
self.running = False
class VersionThread(QtCore.QThread): class VersionThread(QtCore.QThread):
def __init__(self): def __init__(self):
QtCore.QThread.__init__(self) QtCore.QThread.__init__(self)
@@ -282,7 +184,7 @@ class VersionThread(QtCore.QThread):
move(path[0], path[0] + '.exe') move(path[0], path[0] + '.exe')
MW.hideProgressBar.emit() MW.hideProgressBar.emit()
MW.modeConvert.emit(1) MW.modeConvert.emit(1)
Popen(path[0] + '.exe /SP- /silent /noicons') Popen(path[0] + '.exe /SP- /silent /noicons', stdout=PIPE, stderr=STDOUT, stdin=PIPE, shell=True)
MW.forceShutdown.emit() MW.forceShutdown.emit()
except Exception: except Exception:
MW.addMessage.emit('Failed to download update!', 'warning', False) MW.addMessage.emit('Failed to download update!', 'warning', False)
@@ -352,50 +254,38 @@ class WorkerThread(QtCore.QThread):
parser = comic2ebook.makeParser() parser = comic2ebook.makeParser()
options, _ = parser.parse_args() options, _ = parser.parse_args()
profile = GUI.profiles[str(GUI.DeviceBox.currentText())]['Label']
options.profile = profile
argv = '' argv = ''
currentJobs = [] currentJobs = []
# Basic mode settings options.profile = GUI.profiles[str(GUI.DeviceBox.currentText())]['Label']
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.isChecked(): if GUI.RotateBox.checkState() == 1:
options.rotate = True options.splitter = 2
if GUI.QualityBox.checkState() == 1: elif GUI.RotateBox.checkState() == 2:
options.quality = 1 options.splitter = 1
elif GUI.QualityBox.checkState() == 2: if GUI.QualityBox.isChecked():
options.quality = 2 options.hqmode = True
options.format = str(GUI.FormatBox.currentText()) if GUI.WebtoonBox.isChecked():
options.webtoon = True
# Advanced mode settings if GUI.UpscaleBox.checkState() == 1:
if GUI.currentMode > 1: options.stretch = True
if GUI.ProcessingBox.isChecked(): elif GUI.UpscaleBox.checkState() == 2:
options.imgproc = False options.upscale = True
if GUI.NoRotateBox.isChecked(): if GUI.GammaBox.isChecked() and float(GUI.GammaValue) > 0.09:
options.nosplitrotate = True options.gamma = float(GUI.GammaValue)
if GUI.UpscaleBox.checkState() == 1: if GUI.BorderBox.checkState() == 1:
options.stretch = True options.white_borders = True
elif GUI.UpscaleBox.checkState() == 2: elif GUI.BorderBox.checkState() == 2:
options.upscale = True options.black_borders = True
if GUI.BorderBox.checkState() == 1: if GUI.NoDitheringBox.isChecked():
options.white_borders = True options.forcepng = True
elif GUI.BorderBox.checkState() == 2: if GUI.ColorBox.isChecked():
options.black_borders = True options.forcecolor = True
if GUI.NoDitheringBox.isChecked():
options.forcepng = True
if GUI.WebtoonBox.isChecked():
options.webtoon = True
if float(GUI.GammaValue) > 0.09:
options.gamma = float(GUI.GammaValue)
# Other/custom settings.
if GUI.currentMode > 2: if GUI.currentMode > 2:
options.customwidth = str(GUI.customWidth.text()) options.customwidth = str(GUI.customWidth.text())
options.customheight = str(GUI.customHeight.text()) options.customheight = str(GUI.customHeight.text())
if GUI.ColorBox.isChecked():
options.forcecolor = True
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
@@ -456,7 +346,7 @@ class WorkerThread(QtCore.QThread):
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': 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')
@@ -486,7 +376,8 @@ class WorkerThread(QtCore.QThread):
GUI.progress.content = 'Processing MOBI files' GUI.progress.content = 'Processing MOBI files'
self.workerOutput = [] self.workerOutput = []
for item in outputPath: for item in outputPath:
self.workerOutput.append(comic2ebook.makeMOBIFix(item)) self.workerOutput.append(comic2ebook.makeMOBIFix(
item, comic2ebook.options.covers[outputPath.index(item)][1]))
MW.progressBarTick.emit('tick') MW.progressBarTick.emit('tick')
for success in self.workerOutput: for success in self.workerOutput:
if not success[0]: if not success[0]:
@@ -500,11 +391,15 @@ class WorkerThread(QtCore.QThread):
if GUI.targetDirectory and GUI.targetDirectory != os.path.dirname(mobiPath): if GUI.targetDirectory and GUI.targetDirectory != os.path.dirname(mobiPath):
try: try:
move(mobiPath, GUI.targetDirectory) move(mobiPath, GUI.targetDirectory)
mobiPath = os.path.join(GUI.targetDirectory, os.path.basename(mobiPath))
except Exception: except Exception:
pass pass
GUI.completedWork[os.path.basename(mobiPath)] = mobiPath
MW.addMessage.emit('Processing MOBI files... <b>Done!</b>', 'info', True) MW.addMessage.emit('Processing MOBI files... <b>Done!</b>', 'info', True)
k = kindle.Kindle()
if k.path and k.coverSupport:
for item in outputPath:
comic2ebook.options.covers[outputPath.index(item)][0].saveToKindle(
k, comic2ebook.options.covers[outputPath.index(item)][1])
MW.addMessage.emit('Kindle detected. Uploading covers...', 'info', False)
else: else:
GUI.progress.content = '' GUI.progress.content = ''
for item in outputPath: for item in outputPath:
@@ -536,10 +431,8 @@ class WorkerThread(QtCore.QThread):
if GUI.targetDirectory and GUI.targetDirectory != os.path.dirname(item): if GUI.targetDirectory and GUI.targetDirectory != os.path.dirname(item):
try: try:
move(item, GUI.targetDirectory) move(item, GUI.targetDirectory)
item = os.path.join(GUI.targetDirectory, os.path.basename(item))
except Exception: except Exception:
pass pass
GUI.completedWork[os.path.basename(item)] = item
GUI.progress.content = '' GUI.progress.content = ''
GUI.progress.stop() GUI.progress.stop()
MW.hideProgressBar.emit() MW.hideProgressBar.emit()
@@ -640,120 +533,48 @@ class KCCGUI(KCC_ui.Ui_KCC):
def clearJobs(self): def clearJobs(self):
GUI.JobList.clear() GUI.JobList.clear()
def modeBasic(self): # noinspection PyCallByClass,PyTypeChecker,PyArgumentList
self.currentMode = 1 def openWiki(self):
if sys.platform.startswith('darwin'): QtGui.QDesktopServices.openUrl(QtCore.QUrl('https://github.com/ciromattia/kcc/wiki'))
MW.setMaximumSize(QtCore.QSize(420, 291))
MW.setMinimumSize(QtCore.QSize(420, 291))
MW.resize(420, 291)
else:
MW.setMaximumSize(QtCore.QSize(420, 287))
MW.setMinimumSize(QtCore.QSize(420, 287))
MW.resize(420, 287)
GUI.BasicModeButton.setEnabled(True)
GUI.EditorButton.setEnabled(True)
GUI.AdvModeButton.setEnabled(True)
GUI.BasicModeButton.setStyleSheet('font-weight:Bold;')
GUI.AdvModeButton.setStyleSheet('font-weight:Normal;')
GUI.FormatBox.setEnabled(False)
GUI.OptionsBasic.setEnabled(True)
GUI.OptionsBasic.setVisible(True)
GUI.MangaBox.setChecked(False)
GUI.RotateBox.setChecked(False)
GUI.QualityBox.setChecked(False)
GUI.OptionsAdvanced.setEnabled(False)
GUI.OptionsAdvanced.setVisible(False)
GUI.ProcessingBox.setChecked(False)
GUI.UpscaleBox.setChecked(False)
GUI.NoRotateBox.setChecked(False)
GUI.BorderBox.setChecked(False)
GUI.WebtoonBox.setChecked(False)
GUI.NoDitheringBox.setChecked(False)
GUI.OptionsAdvancedGamma.setEnabled(False)
GUI.OptionsAdvancedGamma.setVisible(False)
GUI.OptionsExpert.setEnabled(False)
GUI.OptionsExpert.setVisible(False)
GUI.ColorBox.setChecked(False)
def modeAdvanced(self): def modeChange(self, mode):
self.currentMode = 2 if mode == 1:
MW.setMaximumSize(QtCore.QSize(420, 365)) self.currentMode = 1
MW.setMinimumSize(QtCore.QSize(420, 365)) MW.setMaximumSize(QtCore.QSize(420, 335))
MW.resize(420, 365) MW.setMinimumSize(QtCore.QSize(420, 335))
GUI.BasicModeButton.setEnabled(True) MW.resize(420, 335)
GUI.EditorButton.setEnabled(True) GUI.OptionsGamma.setVisible(False)
GUI.AdvModeButton.setEnabled(True) GUI.OptionsCustom.setVisible(False)
GUI.BasicModeButton.setStyleSheet('font-weight:Normal;') elif mode == 2:
GUI.AdvModeButton.setStyleSheet('font-weight:Bold;') self.currentMode = 2
GUI.FormatBox.setEnabled(True) MW.setMaximumSize(QtCore.QSize(420, 365))
GUI.OptionsBasic.setEnabled(True) MW.setMinimumSize(QtCore.QSize(420, 365))
GUI.OptionsBasic.setVisible(True) MW.resize(420, 365)
GUI.MangaBox.setChecked(False) GUI.OptionsGamma.setVisible(True)
GUI.RotateBox.setChecked(False) GUI.OptionsCustom.setVisible(False)
GUI.QualityBox.setChecked(False) elif mode == 3:
GUI.OptionsAdvanced.setEnabled(True) self.currentMode = 3
GUI.OptionsAdvanced.setVisible(True) MW.setMaximumSize(QtCore.QSize(420, 390))
GUI.ProcessingBox.setChecked(False) MW.setMinimumSize(QtCore.QSize(420, 390))
GUI.UpscaleBox.setChecked(False) MW.resize(420, 390)
GUI.NoRotateBox.setChecked(False) GUI.OptionsGamma.setVisible(True)
GUI.BorderBox.setChecked(False) GUI.OptionsCustom.setVisible(True)
GUI.WebtoonBox.setChecked(False)
GUI.NoDitheringBox.setChecked(False)
GUI.OptionsAdvancedGamma.setEnabled(True)
GUI.OptionsAdvancedGamma.setVisible(True)
GUI.OptionsExpert.setEnabled(True)
GUI.OptionsExpert.setVisible(True)
GUI.ColorBox.setChecked(False)
def modeExpert(self):
self.currentMode = 3
MW.setMaximumSize(QtCore.QSize(420, 397))
MW.setMinimumSize(QtCore.QSize(420, 397))
MW.resize(420, 397)
GUI.BasicModeButton.setEnabled(False)
GUI.EditorButton.setEnabled(True)
GUI.AdvModeButton.setEnabled(False)
GUI.BasicModeButton.setStyleSheet('font-weight:Normal;')
GUI.AdvModeButton.setStyleSheet('font-weight:Normal;')
GUI.FormatBox.setEnabled(True)
GUI.OptionsBasic.setEnabled(True)
GUI.OptionsBasic.setVisible(True)
GUI.MangaBox.setChecked(False)
GUI.RotateBox.setChecked(False)
GUI.QualityBox.setChecked(False)
GUI.OptionsAdvanced.setEnabled(True)
GUI.OptionsAdvanced.setVisible(True)
GUI.ProcessingBox.setChecked(False)
GUI.UpscaleBox.setChecked(False)
GUI.NoRotateBox.setChecked(False)
GUI.BorderBox.setChecked(False)
GUI.WebtoonBox.setChecked(False)
GUI.NoDitheringBox.setChecked(False)
GUI.OptionsAdvancedGamma.setEnabled(True)
GUI.OptionsAdvancedGamma.setVisible(True)
GUI.OptionsExpert.setEnabled(True)
GUI.OptionsExpert.setVisible(True)
GUI.ColorBox.setChecked(False)
def modeConvert(self, enable): def modeConvert(self, enable):
if enable < 1: if enable < 1:
status = False status = False
else: else:
status = True status = True
if self.currentMode != 3: GUI.EditorButton.setEnabled(status)
GUI.BasicModeButton.setEnabled(status) GUI.WikiButton.setEnabled(status)
GUI.EditorButton.setEnabled(status) GUI.FormatBox.setEnabled(status)
GUI.AdvModeButton.setEnabled(status)
if self.currentMode != 1:
GUI.FormatBox.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.DeviceBox.setEnabled(status)
GUI.OptionsBasic.setEnabled(status) GUI.Options.setEnabled(status)
GUI.OptionsAdvanced.setEnabled(status) GUI.OptionsGamma.setEnabled(status)
GUI.OptionsAdvancedGamma.setEnabled(status) GUI.OptionsCustom.setEnabled(status)
GUI.OptionsExpert.setEnabled(status)
GUI.ConvertButton.setEnabled(True) GUI.ConvertButton.setEnabled(True)
if enable == 1: if enable == 1:
self.conversionAlive = False self.conversionAlive = False
@@ -777,68 +598,29 @@ class KCCGUI(KCC_ui.Ui_KCC):
GUI.ConvertButton.setEnabled(False) GUI.ConvertButton.setEnabled(False)
GUI.Form.setAcceptDrops(False) GUI.Form.setAcceptDrops(False)
def toggleGammaBox(self, value):
if value:
if self.currentMode != 3:
self.modeChange(2)
else:
if self.currentMode != 3:
self.modeChange(1)
def toggleWebtoonBox(self, value): def toggleWebtoonBox(self, value):
if value: if value:
GUI.NoRotateBox.setEnabled(False)
GUI.NoRotateBox.setChecked(True)
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)
else:
if not GUI.ProcessingBox.isChecked():
GUI.NoRotateBox.setEnabled(True)
GUI.QualityBox.setEnabled(True)
GUI.MangaBox.setEnabled(True)
def toggleNoSplitRotate(self, value):
if value:
GUI.RotateBox.setEnabled(False) GUI.RotateBox.setEnabled(False)
GUI.RotateBox.setChecked(False) GUI.RotateBox.setChecked(False)
else:
if not GUI.ProcessingBox.isChecked():
GUI.RotateBox.setEnabled(True)
def toggleProcessingBox(self, value):
if value:
GUI.RotateBox.setEnabled(False)
GUI.RotateBox.setChecked(False)
GUI.QualityBox.setEnabled(False)
GUI.QualityBox.setChecked(False)
GUI.UpscaleBox.setEnabled(False) GUI.UpscaleBox.setEnabled(False)
GUI.UpscaleBox.setChecked(False) GUI.UpscaleBox.setChecked(True)
GUI.NoRotateBox.setEnabled(False)
GUI.NoRotateBox.setChecked(False)
GUI.BorderBox.setEnabled(False)
GUI.BorderBox.setChecked(False)
GUI.WebtoonBox.setEnabled(False)
GUI.WebtoonBox.setChecked(False)
GUI.NoDitheringBox.setEnabled(False)
GUI.NoDitheringBox.setChecked(False)
GUI.ColorBox.setEnabled(False)
GUI.ColorBox.setChecked(False)
GUI.GammaSlider.setEnabled(False)
GUI.GammaLabel.setEnabled(False)
else: else:
GUI.QualityBox.setEnabled(True)
GUI.MangaBox.setEnabled(True)
GUI.RotateBox.setEnabled(True) GUI.RotateBox.setEnabled(True)
GUI.UpscaleBox.setEnabled(True) GUI.UpscaleBox.setEnabled(True)
GUI.NoRotateBox.setEnabled(True)
GUI.BorderBox.setEnabled(True)
GUI.WebtoonBox.setEnabled(True)
GUI.NoDitheringBox.setEnabled(True)
GUI.ColorBox.setEnabled(True)
GUI.GammaSlider.setEnabled(True)
GUI.GammaLabel.setEnabled(True)
if GUI.profiles[str(GUI.DeviceBox.currentText())]['Quality']:
GUI.QualityBox.setEnabled(True)
def toggleQualityBox(self, value):
if value == 2 and 'Kobo' in str(GUI.DeviceBox.currentText()):
self.addMessage('Kobo devices can\'t use ultra quality mode!', 'warning')
GUI.QualityBox.setCheckState(0)
elif value == 2 and 'CBZ' in str(GUI.FormatBox.currentText()):
self.addMessage('CBZ format don\'t support ultra quality mode!', 'warning')
GUI.QualityBox.setCheckState(0)
def changeGamma(self, value): def changeGamma(self, value):
value = float(value) value = float(value)
@@ -850,53 +632,32 @@ class KCCGUI(KCC_ui.Ui_KCC):
self.GammaValue = value self.GammaValue = value
def changeDevice(self): def changeDevice(self):
if self.currentMode == 1:
self.modeBasic()
elif self.currentMode == 2:
self.modeAdvanced()
elif self.currentMode == 3:
self.modeExpert()
profile = GUI.profiles[str(GUI.DeviceBox.currentText())] profile = GUI.profiles[str(GUI.DeviceBox.currentText())]
if profile['ForceExpert']: if profile['ForceExpert']:
self.modeExpert() self.modeChange(3)
GUI.BasicModeButton.setEnabled(False) elif GUI.GammaBox.isChecked():
GUI.AdvModeButton.setEnabled(False) self.modeChange(2)
else: else:
GUI.BasicModeButton.setEnabled(True) self.modeChange(1)
GUI.AdvModeButton.setEnabled(True) self.changeFormat()
if self.currentMode == 3:
self.modeBasic()
self.changeFormat(event=False)
GUI.GammaSlider.setValue(0) GUI.GammaSlider.setValue(0)
self.changeGamma(0) self.changeGamma(0)
GUI.QualityBox.setEnabled(profile['Quality'])
if not profile['Quality']:
GUI.QualityBox.setChecked(False)
if profile['DefaultUpscale']: if profile['DefaultUpscale']:
GUI.UpscaleBox.setChecked(True) GUI.UpscaleBox.setChecked(True)
if str(GUI.DeviceBox.currentText()) == 'Other': 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, event=True): 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'])
if GUI.WebtoonBox.isChecked(): GUI.QualityBox.setEnabled(profile['Quality'])
GUI.MangaBox.setEnabled(False)
GUI.QualityBox.setEnabled(False)
GUI.MangaBox.setChecked(False)
GUI.QualityBox.setChecked(False)
else:
GUI.QualityBox.setEnabled(profile['Quality'])
if not profile['Quality']:
GUI.QualityBox.setChecked(False)
if GUI.ProcessingBox.isChecked():
GUI.QualityBox.setEnabled(False)
GUI.QualityBox.setChecked(False)
if event and GUI.QualityBox.isEnabled() and 'CBZ' in str(GUI.FormatBox.currentText()) and\
GUI.QualityBox.checkState() == 2:
self.addMessage('CBZ format don\'t support ultra quality mode!', 'warning')
GUI.QualityBox.setCheckState(0)
def stripTags(self, html): def stripTags(self, html):
s = HTMLStripper() s = HTMLStripper()
@@ -962,9 +723,8 @@ class KCCGUI(KCC_ui.Ui_KCC):
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.BasicModeButton.hide()
GUI.EditorButton.hide() GUI.EditorButton.hide()
GUI.AdvModeButton.hide() GUI.WikiButton.hide()
GUI.ProgressBar.reset() GUI.ProgressBar.reset()
GUI.ProgressBar.show() GUI.ProgressBar.show()
else: else:
@@ -1001,15 +761,16 @@ class KCCGUI(KCC_ui.Ui_KCC):
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' 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' self.addMessage('Cannot find <a href="http://www.amazon.com/gp/feature.html?ie=UTF8&docId='
'?ie=UTF8&docId=1000765211"><b>KindleGen</b></a>!' '1000765211"><b>KindleGen</b></a>! MOBI conversion is unavailable!', 'error')
' MOBI conversion is unavailable!', 'error')
if sys.platform.startswith('win'): if sys.platform.startswith('win'):
self.addMessage('Download it and place EXE in KCC directory.', 'error') self.addMessage('Download it and place EXE in KCC directory.', 'error')
elif sys.platform.startswith('darwin'):
self.addMessage('Install it using <a href="http://brew.sh/">Brew</a>.', 'error')
else: else:
self.addMessage('Download it and place executable in /usr/local/bin directory.', 'error') self.addMessage('Download it and place executable in /usr/local/bin directory.', 'error')
self.needClean = True self.needClean = True
@@ -1018,9 +779,8 @@ class KCCGUI(KCC_ui.Ui_KCC):
def hideProgressBar(self): def hideProgressBar(self):
GUI.ProgressBar.hide() GUI.ProgressBar.hide()
GUI.BasicModeButton.show()
GUI.EditorButton.show() GUI.EditorButton.show()
GUI.AdvModeButton.show() GUI.WikiButton.show()
def saveSettings(self, event): def saveSettings(self, event):
if self.conversionAlive: if self.conversionAlive:
@@ -1031,19 +791,16 @@ class KCCGUI(KCC_ui.Ui_KCC):
event.ignore() event.ignore()
if not GUI.ConvertButton.isEnabled(): if not GUI.ConvertButton.isEnabled():
event.ignore() event.ignore()
self.contentServer.stop()
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('currentMode', self.currentMode)
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('options', {'MangaBox': GUI.MangaBox.checkState(),
'RotateBox': GUI.RotateBox.checkState(), 'RotateBox': GUI.RotateBox.checkState(),
'QualityBox': GUI.QualityBox.checkState(), 'QualityBox': GUI.QualityBox.checkState(),
'ProcessingBox': GUI.ProcessingBox.checkState(), 'GammaBox': GUI.GammaBox.checkState(),
'UpscaleBox': GUI.UpscaleBox.checkState(), 'UpscaleBox': GUI.UpscaleBox.checkState(),
'NoRotateBox': GUI.NoRotateBox.checkState(),
'BorderBox': GUI.BorderBox.checkState(), 'BorderBox': GUI.BorderBox.checkState(),
'WebtoonBox': GUI.WebtoonBox.checkState(), 'WebtoonBox': GUI.WebtoonBox.checkState(),
'NoDitheringBox': GUI.NoDitheringBox.checkState(), 'NoDitheringBox': GUI.NoDitheringBox.checkState(),
@@ -1108,10 +865,10 @@ class KCCGUI(KCC_ui.Ui_KCC):
os.chmod('/usr/local/bin/kindlegen', 0o755) os.chmod('/usr/local/bin/kindlegen', 0o755)
except Exception: except Exception:
pass pass
kindleGenExitCode = Popen('kindlegen -locale en', stdout=PIPE, stderr=STDOUT, shell=True) kindleGenExitCode = Popen('kindlegen -locale en', stdout=PIPE, stderr=STDOUT, stdin=PIPE, shell=True)
if kindleGenExitCode.wait() == 0: if kindleGenExitCode.wait() == 0:
self.KindleGen = True self.kindleGen = True
versionCheck = Popen('kindlegen -locale en', stdout=PIPE, stderr=STDOUT, shell=True) versionCheck = Popen('kindlegen -locale en', stdout=PIPE, stderr=STDOUT, stdin=PIPE, shell=True)
for line in versionCheck.stdout: for line in versionCheck.stdout:
line = line.decode("utf-8") line = line.decode("utf-8")
if 'Amazon kindlegen' in line: if 'Amazon kindlegen' in line:
@@ -1121,12 +878,14 @@ class KCCGUI(KCC_ui.Ui_KCC):
'1000765211">KindleGen</a> is outdated! MOBI conversion might fail.', 'warning') '1000765211">KindleGen</a> is outdated! MOBI conversion might fail.', 'warning')
break break
else: else:
self.KindleGen = False self.kindleGen = False
if startup: if startup:
self.addMessage('Cannot find <a href="http://www.amazon.com/gp/feature.html?ie=UTF8&docId=1000765211">' self.addMessage('Cannot find <a href="http://www.amazon.com/gp/feature.html?ie=UTF8&docId=1000765211">'
'<b>KindleGen</b></a>! MOBI conversion will be unavailable!', 'error') '<b>KindleGen</b></a>! MOBI conversion will be unavailable!', 'error')
if sys.platform.startswith('win'): if sys.platform.startswith('win'):
self.addMessage('Download it and place EXE in KCC directory.', 'error') self.addMessage('Download it and place EXE in KCC directory.', 'error')
elif sys.platform.startswith('darwin'):
self.addMessage('Install it using <a href="http://brew.sh/">Brew</a>.', 'error')
else: else:
self.addMessage('Download it and place executable in /usr/local/bin directory.', 'error') self.addMessage('Download it and place executable in /usr/local/bin directory.', 'error')
@@ -1139,25 +898,22 @@ class KCCGUI(KCC_ui.Ui_KCC):
self.setupUi(MW) self.setupUi(MW)
self.editor = KCCGUI_MetaEditor() self.editor = KCCGUI_MetaEditor()
self.icons = Icons() self.icons = Icons()
self.webContent = KCC_rc_web.WebContent()
self.settings = QtCore.QSettings('KindleComicConverter', 'KindleComicConverter') self.settings = QtCore.QSettings('KindleComicConverter', 'KindleComicConverter')
self.settingsVersion = self.settings.value('settingsVersion', '', type=str) self.settingsVersion = self.settings.value('settingsVersion', '', type=str)
self.lastPath = self.settings.value('lastPath', '', type=str) self.lastPath = self.settings.value('lastPath', '', type=str)
self.lastDevice = self.settings.value('lastDevice', 0, type=int) self.lastDevice = self.settings.value('lastDevice', 0, type=int)
self.currentMode = self.settings.value('currentMode', 1, 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.options = self.settings.value('options', {'GammaSlider': 0})
self.worker = WorkerThread() self.worker = WorkerThread()
self.versionCheck = VersionThread() self.versionCheck = VersionThread()
self.contentServer = WebServerThread()
self.progress = ProgressThread() self.progress = ProgressThread()
self.tray = SystemTrayIcon() self.tray = SystemTrayIcon()
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.completedWork = {} self.currentMode = 1
self.targetDirectory = '' self.targetDirectory = ''
if sys.platform.startswith('darwin'): if sys.platform.startswith('darwin'):
self.listFontSize = 11 self.listFontSize = 11
@@ -1184,25 +940,25 @@ class KCCGUI(KCC_ui.Ui_KCC):
self.profiles = { self.profiles = {
"K. PW 3/Voyage": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 0, "K. PW 3/Voyage": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 0,
'DefaultUpscale': False, 'Label': 'KV'}, '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': 'K345'},
"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': True, 'ForceExpert': False, 'DefaultFormat': 1, "Kobo Mini/Touch": {'Quality': False, 'ForceExpert': False, 'DefaultFormat': 1,
'DefaultUpscale': False, 'Label': 'KoMT'}, 'DefaultUpscale': False, 'Label': 'KoMT'},
"Kobo Glo": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 1, "Kobo Glo": {'Quality': False, 'ForceExpert': False, 'DefaultFormat': 1,
'DefaultUpscale': False, 'Label': 'KoG'}, 'DefaultUpscale': False, 'Label': 'KoG'},
"Kobo Glo HD": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 1, "Kobo Glo HD": {'Quality': False, 'ForceExpert': False, 'DefaultFormat': 1,
'DefaultUpscale': False, 'Label': 'KoGHD'}, 'DefaultUpscale': False, 'Label': 'KoGHD'},
"Kobo Aura": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 1, "Kobo Aura": {'Quality': False, 'ForceExpert': False, 'DefaultFormat': 1,
'DefaultUpscale': False, 'Label': 'KoA'}, 'DefaultUpscale': False, 'Label': 'KoA'},
"Kobo Aura HD": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 1, "Kobo Aura HD": {'Quality': False, 'ForceExpert': False, 'DefaultFormat': 1,
'DefaultUpscale': False, 'Label': 'KoAHD'}, 'DefaultUpscale': True, 'Label': 'KoAHD'},
"Kobo Aura H2O": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 1, "Kobo Aura H2O": {'Quality': False, 'ForceExpert': False, 'DefaultFormat': 1,
'DefaultUpscale': False, 'Label': 'KoAH2O'}, 'DefaultUpscale': True, 'Label': 'KoAH2O'},
"Other": {'Quality': False, 'ForceExpert': True, 'DefaultFormat': 1, "Other": {'Quality': False, 'ForceExpert': True, 'DefaultFormat': 1,
'DefaultUpscale': False, 'Label': 'OTHER'}, 'DefaultUpscale': False, 'Label': 'OTHER'},
"Kindle 1": {'Quality': False, 'ForceExpert': False, 'DefaultFormat': 0, "Kindle 1": {'Quality': False, 'ForceExpert': False, 'DefaultFormat': 0,
@@ -1231,8 +987,8 @@ class KCCGUI(KCC_ui.Ui_KCC):
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.'
'com/ciromattia/kcc/blob/master/README.md#issues--new-features--donations">DO' 'com/ciromattia/kcc/blob/master/README.md#issues--new-features--donations">DO'
'NATE</a> - <a href="https://github.com/ciromattia/kcc/wiki">WIKI</a> - <a hr' 'NATE</a> - <a href="http://www.mobileread.com/forums/showthread.php?t=207461'
'ef="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.setStyleSheet(self.statusBarStyle)
statusBarLabel.setOpenExternalLinks(True) statusBarLabel.setOpenExternalLinks(True)
@@ -1247,7 +1003,7 @@ class KCCGUI(KCC_ui.Ui_KCC):
self.addMessage('Since you are new user of <b>KCC</b> please see few ' self.addMessage('Since you are new user of <b>KCC</b> please see few '
'<a href="https://github.com/ciromattia/kcc/wiki/Important-tips">important tips</a>.', '<a href="https://github.com/ciromattia/kcc/wiki/Important-tips">important tips</a>.',
'info') 'info')
rarExitCode = Popen('unrar', stdout=PIPE, stderr=STDOUT, shell=True) rarExitCode = Popen('unrar', stdout=PIPE, stderr=STDOUT, stdin=PIPE, shell=True)
rarExitCode = rarExitCode.wait() rarExitCode = rarExitCode.wait()
if rarExitCode == 0 or rarExitCode == 7: if rarExitCode == 0 or rarExitCode == 7:
self.UnRAR = True self.UnRAR = True
@@ -1255,7 +1011,7 @@ class KCCGUI(KCC_ui.Ui_KCC):
self.UnRAR = False self.UnRAR = False
self.addMessage('Cannot find <a href="http://www.rarlab.com/rar_add.htm">UnRAR</a>!' self.addMessage('Cannot find <a href="http://www.rarlab.com/rar_add.htm">UnRAR</a>!'
' Processing of CBR/RAR files will be disabled.', 'warning') ' Processing of CBR/RAR files will be disabled.', 'warning')
sevenzaExitCode = Popen('7za', stdout=PIPE, stderr=STDOUT, shell=True) sevenzaExitCode = Popen('7za', stdout=PIPE, stderr=STDOUT, stdin=PIPE, shell=True)
sevenzaExitCode = sevenzaExitCode.wait() sevenzaExitCode = sevenzaExitCode.wait()
if sevenzaExitCode == 0 or sevenzaExitCode == 7: if sevenzaExitCode == 0 or sevenzaExitCode == 7:
self.sevenza = True self.sevenza = True
@@ -1266,18 +1022,15 @@ class KCCGUI(KCC_ui.Ui_KCC):
self.detectKindleGen(True) self.detectKindleGen(True)
APP.messageFromOtherInstance.connect(self.handleMessage) APP.messageFromOtherInstance.connect(self.handleMessage)
GUI.BasicModeButton.clicked.connect(self.modeBasic)
GUI.AdvModeButton.clicked.connect(self.modeAdvanced)
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.ConvertButton.clicked.connect(self.convertStart) GUI.ConvertButton.clicked.connect(self.convertStart)
GUI.GammaSlider.valueChanged.connect(self.changeGamma) GUI.GammaSlider.valueChanged.connect(self.changeGamma)
GUI.NoRotateBox.stateChanged.connect(self.toggleNoSplitRotate) GUI.GammaBox.stateChanged.connect(self.toggleGammaBox)
GUI.WebtoonBox.stateChanged.connect(self.toggleWebtoonBox) GUI.WebtoonBox.stateChanged.connect(self.toggleWebtoonBox)
GUI.ProcessingBox.stateChanged.connect(self.toggleProcessingBox)
GUI.QualityBox.stateChanged.connect(self.toggleQualityBox)
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)
@@ -1293,6 +1046,7 @@ class KCCGUI(KCC_ui.Ui_KCC):
GUI.Form.dragEnterEvent = self.dragAndDrop GUI.Form.dragEnterEvent = self.dragAndDrop
GUI.Form.dropEvent = self.dragAndDropAccepted GUI.Form.dropEvent = self.dragAndDropAccepted
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)
@@ -1302,8 +1056,8 @@ class KCCGUI(KCC_ui.Ui_KCC):
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', 'EPUB', 'CBZ']: for f in ['MOBI/AZW3', 'EPUB', 'CBZ']:
GUI.FormatBox.addItem(eval('self.icons.' + f + '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":
@@ -1313,7 +1067,7 @@ class KCCGUI(KCC_ui.Ui_KCC):
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, False) self.changeFormat(self.currentFormat)
for option in self.options: for option in self.options:
if str(option) == "customWidth": if str(option) == "customWidth":
GUI.customWidth.setText(str(self.options[option])) GUI.customWidth.setText(str(self.options[option]))
@@ -1324,12 +1078,14 @@ class KCCGUI(KCC_ui.Ui_KCC):
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:
if eval('GUI.' + str(option)).isEnabled(): try:
eval('GUI.' + str(option)).setCheckState(self.options[option]) if eval('GUI.' + str(option)).isEnabled():
eval('GUI.' + str(option)).setCheckState(self.options[option])
except AttributeError:
pass
self.hideProgressBar() self.hideProgressBar()
self.worker.sync() self.worker.sync()
self.versionCheck.start() self.versionCheck.start()
self.contentServer.start()
self.tray.show() self.tray.show()
# Linux hack as PyQt 5.5 not hit mainstream distributions yet # Linux hack as PyQt 5.5 not hit mainstream distributions yet
@@ -1358,7 +1114,7 @@ class KCCGUI_MetaEditor(KCC_MetaEditor_ui.Ui_MetaEditorDialog):
for field in (self.WriterLine, self.PencillerLine, self.InkerLine, self.ColoristLine): for field in (self.WriterLine, self.PencillerLine, self.InkerLine, self.ColoristLine):
field.setText(', '.join(self.parser.data[field.objectName()[:-4] + 's'])) field.setText(', '.join(self.parser.data[field.objectName()[:-4] + 's']))
if self.SeriesLine.text() == '': if self.SeriesLine.text() == '':
self.SeriesLine.setText(file.split('\\')[-1].split('.')[0]) 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):

File diff suppressed because it is too large Load Diff

View File

@@ -1,225 +0,0 @@
# -*- coding: utf-8 -*-
# Resources used by content server
class WebContent:
def __init__(self):
self.favicon = 'data:image/x-icon;base64,AAABAAEAEBAAAAAAAABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAA' \
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACalpVpycW64O7q20wAAAAAAAAAAAA' \
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVlNNSJiWj//i39b11dHDKAAAAAAAAAAAAAA' \
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEpGP0eKh4L/19fU/9DLvo4AAAAAAAAAAAAAAAAAAAA' \
'AAAAAAJCOdiqRkIprr6yhfrSxpom4tauRu7mvl8C+s52opJvFvLu3/6nq7v/P087i0c7AVtLPwi4AAAAAAAAAALm1hTK' \
'NinTvv723/9rZ0P/g3NH/39rT/+Db1//e3Nr/497b/8Tb3/8s4/z/yObp/9zRy//R0MnnAAAAAAAAAAC4tImElJGF/9v' \
'b0/+8udn/bpnl/2ax+v9Rru//OMTi/zXc9v8i5///AOD//1Tf9P/W5ez/2dXS8AAAAAAAAAAAubSOprayqf/p5tv/dI3' \
'g/wNh2/8Rd+f/Dn7d/waO2/8AxOj/AKvW/wC+4P8Akdb/oMzt/+fg2e0AAAAAAAAA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HpWsFSM58s1mjpu2Y86sUfUtAOFASEsJXAYOU8qpLk0iq5HBpjfank+NV2ovbHF05Rz' \
'dz5saUiLJCWyJyFSB4DFAFAFAFAFAFAFAFAFAFAFAcKg8xQDMlrHIOKigKu72etrr3kBoBFloZ06N47cIEZt7dxyNVcbJTH' \
'/AKDdH7aL5LTYhZ0abOfeuD6ACm1CxQ0jPvTyH/MamkRZ0aLbn3gW8zmpA4uk2q8ox8KAdXT7deUY+FAOC1hHJB8KAUIYxy' \
'UUB0xIRjdFAUGsaa5RmjGaAxcQe2uHhdDgksKsmQ0amzKw2qkkBcZyasZdyxsT9KkBUHcHae2qtl4x7suwMDFVLnaAKAKAK' \
'AKAKAKAKAKAKAKAKAKAKAKAKAKAKAKAKAKAKAKAKAKAKAKA4VDDBGRQESTSrOViXgUk+FAITR7JFCiLgOQLE4+NLIolxQxw' \
'ruooAoSOUAUAUAUAUAUB/9k%3D'

View File

@@ -1,9 +1,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'KCC.ui' # Form implementation generated from reading ui file 'gui\KCC.ui'
# #
# Created: Sun Feb 8 09:50:43 2015 # Created by: PyQt5 UI code generator 5.5.1
# by: PyQt5 UI code generator 5.4
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
@@ -12,9 +11,9 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_KCC(object): class Ui_KCC(object):
def setupUi(self, KCC): def setupUi(self, KCC):
KCC.setObjectName("KCC") KCC.setObjectName("KCC")
KCC.resize(420, 397) KCC.resize(420, 390)
KCC.setMinimumSize(QtCore.QSize(420, 397)) KCC.setMinimumSize(QtCore.QSize(420, 390))
KCC.setMaximumSize(QtCore.QSize(420, 397)) KCC.setMaximumSize(QtCore.QSize(420, 390))
font = QtGui.QFont() font = QtGui.QFont()
font.setPointSize(9) font.setPointSize(9)
KCC.setFont(font) KCC.setFont(font)
@@ -24,42 +23,6 @@ class Ui_KCC(object):
KCC.setLocale(QtCore.QLocale(QtCore.QLocale.C, QtCore.QLocale.AnyCountry)) KCC.setLocale(QtCore.QLocale(QtCore.QLocale.C, QtCore.QLocale.AnyCountry))
self.Form = QtWidgets.QWidget(KCC) self.Form = QtWidgets.QWidget(KCC)
self.Form.setObjectName("Form") self.Form.setObjectName("Form")
self.OptionsAdvanced = QtWidgets.QFrame(self.Form)
self.OptionsAdvanced.setEnabled(True)
self.OptionsAdvanced.setGeometry(QtCore.QRect(10, 254, 421, 61))
font = QtGui.QFont()
font.setPointSize(9)
self.OptionsAdvanced.setFont(font)
self.OptionsAdvanced.setObjectName("OptionsAdvanced")
self.gridLayout = QtWidgets.QGridLayout(self.OptionsAdvanced)
self.gridLayout.setContentsMargins(9, -1, -1, -1)
self.gridLayout.setObjectName("gridLayout")
self.ProcessingBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
self.ProcessingBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.ProcessingBox.setObjectName("ProcessingBox")
self.gridLayout.addWidget(self.ProcessingBox, 1, 0, 1, 1)
self.UpscaleBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
self.UpscaleBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.UpscaleBox.setTristate(True)
self.UpscaleBox.setObjectName("UpscaleBox")
self.gridLayout.addWidget(self.UpscaleBox, 1, 1, 1, 1)
self.WebtoonBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
self.WebtoonBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.WebtoonBox.setObjectName("WebtoonBox")
self.gridLayout.addWidget(self.WebtoonBox, 3, 1, 1, 1)
self.NoDitheringBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
self.NoDitheringBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.NoDitheringBox.setObjectName("NoDitheringBox")
self.gridLayout.addWidget(self.NoDitheringBox, 3, 2, 1, 1)
self.BorderBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
self.BorderBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.BorderBox.setTristate(True)
self.BorderBox.setObjectName("BorderBox")
self.gridLayout.addWidget(self.BorderBox, 3, 0, 1, 1)
self.NoRotateBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
self.NoRotateBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.NoRotateBox.setObjectName("NoRotateBox")
self.gridLayout.addWidget(self.NoRotateBox, 1, 2, 1, 1)
self.DeviceBox = QtWidgets.QComboBox(self.Form) self.DeviceBox = QtWidgets.QComboBox(self.Form)
self.DeviceBox.setGeometry(QtCore.QRect(10, 200, 141, 31)) self.DeviceBox.setGeometry(QtCore.QRect(10, 200, 141, 31))
font = QtGui.QFont() font = QtGui.QFont()
@@ -116,25 +79,56 @@ class Ui_KCC(object):
icon4.addPixmap(QtGui.QPixmap(":/Other/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon4.addPixmap(QtGui.QPixmap(":/Other/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.ClearButton.setIcon(icon4) self.ClearButton.setIcon(icon4)
self.ClearButton.setObjectName("ClearButton") self.ClearButton.setObjectName("ClearButton")
self.OptionsBasic = QtWidgets.QFrame(self.Form) self.Options = QtWidgets.QFrame(self.Form)
self.OptionsBasic.setGeometry(QtCore.QRect(10, 230, 421, 41)) self.Options.setGeometry(QtCore.QRect(10, 237, 401, 70))
font = QtGui.QFont() font = QtGui.QFont()
font.setPointSize(9) font.setPointSize(9)
self.OptionsBasic.setFont(font) self.Options.setFont(font)
self.OptionsBasic.setObjectName("OptionsBasic") self.Options.setObjectName("Options")
self.MangaBox = QtWidgets.QCheckBox(self.OptionsBasic) self.gridLayout = QtWidgets.QGridLayout(self.Options)
self.MangaBox.setGeometry(QtCore.QRect(9, 10, 130, 18)) 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.setFocusPolicy(QtCore.Qt.NoFocus)
self.MangaBox.setObjectName("MangaBox") self.MangaBox.setObjectName("MangaBox")
self.QualityBox = QtWidgets.QCheckBox(self.OptionsBasic) self.gridLayout.addWidget(self.MangaBox, 2, 0, 1, 1)
self.QualityBox.setGeometry(QtCore.QRect(282, 10, 130, 18)) self.RotateBox = QtWidgets.QCheckBox(self.Options)
self.QualityBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.QualityBox.setTristate(True)
self.QualityBox.setObjectName("QualityBox")
self.RotateBox = QtWidgets.QCheckBox(self.OptionsBasic)
self.RotateBox.setGeometry(QtCore.QRect(145, 10, 130, 18))
self.RotateBox.setFocusPolicy(QtCore.Qt.NoFocus) self.RotateBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.RotateBox.setTristate(True)
self.RotateBox.setObjectName("RotateBox") 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 = QtWidgets.QListWidget(self.Form)
self.JobList.setGeometry(QtCore.QRect(10, 50, 401, 101)) self.JobList.setGeometry(QtCore.QRect(10, 50, 401, 101))
self.JobList.setFocusPolicy(QtCore.Qt.NoFocus) self.JobList.setFocusPolicy(QtCore.Qt.NoFocus)
@@ -144,37 +138,27 @@ class Ui_KCC(object):
self.JobList.setVerticalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel) self.JobList.setVerticalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel)
self.JobList.setHorizontalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel) self.JobList.setHorizontalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel)
self.JobList.setObjectName("JobList") self.JobList.setObjectName("JobList")
self.BasicModeButton = QtWidgets.QPushButton(self.Form) self.OptionsGamma = QtWidgets.QFrame(self.Form)
self.BasicModeButton.setGeometry(QtCore.QRect(10, 10, 141, 32)) self.OptionsGamma.setEnabled(True)
self.OptionsGamma.setGeometry(QtCore.QRect(10, 305, 401, 35))
font = QtGui.QFont() font = QtGui.QFont()
font.setPointSize(9) font.setPointSize(9)
self.BasicModeButton.setFont(font) self.OptionsGamma.setFont(font)
self.BasicModeButton.setFocusPolicy(QtCore.Qt.NoFocus) self.OptionsGamma.setObjectName("OptionsGamma")
self.BasicModeButton.setObjectName("BasicModeButton") self.horizontalLayout = QtWidgets.QHBoxLayout(self.OptionsGamma)
self.AdvModeButton = QtWidgets.QPushButton(self.Form) self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.AdvModeButton.setGeometry(QtCore.QRect(261, 10, 151, 32)) self.horizontalLayout.setSpacing(15)
font = QtGui.QFont() self.horizontalLayout.setObjectName("horizontalLayout")
font.setPointSize(9) self.GammaLabel = QtWidgets.QLabel(self.OptionsGamma)
self.AdvModeButton.setFont(font)
self.AdvModeButton.setFocusPolicy(QtCore.Qt.NoFocus)
self.AdvModeButton.setObjectName("AdvModeButton")
self.OptionsAdvancedGamma = QtWidgets.QFrame(self.Form)
self.OptionsAdvancedGamma.setEnabled(True)
self.OptionsAdvancedGamma.setGeometry(QtCore.QRect(10, 305, 401, 41))
font = QtGui.QFont()
font.setPointSize(9)
self.OptionsAdvancedGamma.setFont(font)
self.OptionsAdvancedGamma.setObjectName("OptionsAdvancedGamma")
self.GammaLabel = QtWidgets.QLabel(self.OptionsAdvancedGamma)
self.GammaLabel.setGeometry(QtCore.QRect(15, 0, 100, 40))
self.GammaLabel.setObjectName("GammaLabel") self.GammaLabel.setObjectName("GammaLabel")
self.GammaSlider = QtWidgets.QSlider(self.OptionsAdvancedGamma) self.horizontalLayout.addWidget(self.GammaLabel)
self.GammaSlider.setGeometry(QtCore.QRect(110, 10, 270, 22)) self.GammaSlider = QtWidgets.QSlider(self.OptionsGamma)
self.GammaSlider.setFocusPolicy(QtCore.Qt.ClickFocus) self.GammaSlider.setFocusPolicy(QtCore.Qt.ClickFocus)
self.GammaSlider.setMaximum(500) self.GammaSlider.setMaximum(500)
self.GammaSlider.setSingleStep(5) self.GammaSlider.setSingleStep(5)
self.GammaSlider.setOrientation(QtCore.Qt.Horizontal) self.GammaSlider.setOrientation(QtCore.Qt.Horizontal)
self.GammaSlider.setObjectName("GammaSlider") self.GammaSlider.setObjectName("GammaSlider")
self.horizontalLayout.addWidget(self.GammaSlider)
self.ProgressBar = QtWidgets.QProgressBar(self.Form) self.ProgressBar = QtWidgets.QProgressBar(self.Form)
self.ProgressBar.setGeometry(QtCore.QRect(10, 10, 401, 31)) self.ProgressBar.setGeometry(QtCore.QRect(10, 10, 401, 31))
font = QtGui.QFont() font = QtGui.QFont()
@@ -186,53 +170,46 @@ class Ui_KCC(object):
self.ProgressBar.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter) self.ProgressBar.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter)
self.ProgressBar.setFormat("") self.ProgressBar.setFormat("")
self.ProgressBar.setObjectName("ProgressBar") self.ProgressBar.setObjectName("ProgressBar")
self.OptionsExpert = QtWidgets.QFrame(self.Form) self.OptionsCustom = QtWidgets.QFrame(self.Form)
self.OptionsExpert.setGeometry(QtCore.QRect(10, 337, 421, 41)) self.OptionsCustom.setGeometry(QtCore.QRect(10, 340, 401, 25))
font = QtGui.QFont() font = QtGui.QFont()
font.setPointSize(9) font.setPointSize(9)
self.OptionsExpert.setFont(font) self.OptionsCustom.setFont(font)
self.OptionsExpert.setObjectName("OptionsExpert") self.OptionsCustom.setObjectName("OptionsCustom")
self.ColorBox = QtWidgets.QCheckBox(self.OptionsExpert) self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.OptionsCustom)
self.ColorBox.setGeometry(QtCore.QRect(9, 11, 130, 18)) self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
self.ColorBox.setFocusPolicy(QtCore.Qt.NoFocus) self.horizontalLayout_2.setSpacing(15)
self.ColorBox.setObjectName("ColorBox") self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.OptionsExpertInternal = QtWidgets.QFrame(self.OptionsExpert) self.wLabel = QtWidgets.QLabel(self.OptionsCustom)
self.OptionsExpertInternal.setGeometry(QtCore.QRect(100, 0, 295, 40))
self.OptionsExpertInternal.setObjectName("OptionsExpertInternal")
self.gridLayout_2 = QtWidgets.QGridLayout(self.OptionsExpertInternal)
self.gridLayout_2.setObjectName("gridLayout_2")
self.wLabel = QtWidgets.QLabel(self.OptionsExpertInternal)
self.wLabel.setObjectName("wLabel") self.wLabel.setObjectName("wLabel")
self.gridLayout_2.addWidget(self.wLabel, 0, 0, 1, 1) self.horizontalLayout_2.addWidget(self.wLabel)
self.customWidth = QtWidgets.QLineEdit(self.OptionsExpertInternal) self.customWidth = QtWidgets.QLineEdit(self.OptionsCustom)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0) sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0) sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.customWidth.sizePolicy().hasHeightForWidth()) sizePolicy.setHeightForWidth(self.customWidth.sizePolicy().hasHeightForWidth())
self.customWidth.setSizePolicy(sizePolicy) self.customWidth.setSizePolicy(sizePolicy)
self.customWidth.setMaximumSize(QtCore.QSize(40, 16777215))
self.customWidth.setFocusPolicy(QtCore.Qt.ClickFocus) self.customWidth.setFocusPolicy(QtCore.Qt.ClickFocus)
self.customWidth.setAcceptDrops(False) self.customWidth.setAcceptDrops(False)
self.customWidth.setMaxLength(4) self.customWidth.setMaxLength(4)
self.customWidth.setObjectName("customWidth") self.customWidth.setObjectName("customWidth")
self.gridLayout_2.addWidget(self.customWidth, 0, 1, 1, 1) self.horizontalLayout_2.addWidget(self.customWidth)
self.hLabel = QtWidgets.QLabel(self.OptionsExpertInternal) self.hLabel = QtWidgets.QLabel(self.OptionsCustom)
self.hLabel.setObjectName("hLabel") self.hLabel.setObjectName("hLabel")
self.gridLayout_2.addWidget(self.hLabel, 0, 2, 1, 1) self.horizontalLayout_2.addWidget(self.hLabel)
self.customHeight = QtWidgets.QLineEdit(self.OptionsExpertInternal) self.customHeight = QtWidgets.QLineEdit(self.OptionsCustom)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0) sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0) sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.customHeight.sizePolicy().hasHeightForWidth()) sizePolicy.setHeightForWidth(self.customHeight.sizePolicy().hasHeightForWidth())
self.customHeight.setSizePolicy(sizePolicy) self.customHeight.setSizePolicy(sizePolicy)
self.customHeight.setMaximumSize(QtCore.QSize(40, 16777215))
self.customHeight.setFocusPolicy(QtCore.Qt.ClickFocus) self.customHeight.setFocusPolicy(QtCore.Qt.ClickFocus)
self.customHeight.setAcceptDrops(False) self.customHeight.setAcceptDrops(False)
self.customHeight.setMaxLength(4) self.customHeight.setMaxLength(4)
self.customHeight.setObjectName("customHeight") self.customHeight.setObjectName("customHeight")
self.gridLayout_2.addWidget(self.customHeight, 0, 3, 1, 1) self.horizontalLayout_2.addWidget(self.customHeight)
self.EditorButton = QtWidgets.QPushButton(self.Form) self.EditorButton = QtWidgets.QPushButton(self.Form)
self.EditorButton.setGeometry(QtCore.QRect(160, 10, 91, 32)) self.EditorButton.setGeometry(QtCore.QRect(10, 10, 200, 32))
font = QtGui.QFont() font = QtGui.QFont()
font.setPointSize(9) font.setPointSize(9)
self.EditorButton.setFont(font) self.EditorButton.setFont(font)
@@ -241,6 +218,29 @@ class Ui_KCC(object):
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.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")
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) KCC.setCentralWidget(self.Form)
self.statusBar = QtWidgets.QStatusBar(KCC) self.statusBar = QtWidgets.QStatusBar(KCC)
font = QtGui.QFont() font = QtGui.QFont()
@@ -270,18 +270,6 @@ class Ui_KCC(object):
def retranslateUi(self, KCC): def retranslateUi(self, KCC):
_translate = QtCore.QCoreApplication.translate _translate = QtCore.QCoreApplication.translate
KCC.setWindowTitle(_translate("KCC", "Kindle Comic Converter")) KCC.setWindowTitle(_translate("KCC", "Kindle Comic Converter"))
self.ProcessingBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Disable image optimizations.<br/><span style=\" font-weight:600;\">Input images must be already resized.</span></p></body></html>"))
self.ProcessingBox.setText(_translate("KCC", "No optimisation"))
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 WebToons.</p></body></html>"))
self.WebtoonBox.setText(_translate("KCC", "Webtoon 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.NoDitheringBox.setText(_translate("KCC", "PNG output"))
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.NoRotateBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Disable page splitting and rotation.</p></body></html>"))
self.NoRotateBox.setText(_translate("KCC", "No split/rotate"))
self.DeviceBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Target device.</p></body></html>")) 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.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.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Shift+Click to select the output directory.</p></body></html>"))
@@ -293,15 +281,23 @@ class Ui_KCC(object):
self.ClearButton.setText(_translate("KCC", "Clear list")) 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.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.MangaBox.setText(_translate("KCC", "Manga mode"))
self.QualityBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Quality of Panel View/zoom. Highly impact size of output file.<br/><span style=\" font-weight:600;\">This option control only quality of magnification!</span></p></body></html>")) 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.QualityBox.setText(_translate("KCC", "High/Ultra quality")) self.RotateBox.setText(_translate("KCC", "Spread splitter"))
self.RotateBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Disable splitting of two-page spreads.<br/>They will be rotated instead.</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.RotateBox.setText(_translate("KCC", "Horizontal mode")) self.QualityBox.setText(_translate("KCC", "HQ zoom"))
self.BasicModeButton.setText(_translate("KCC", "Basic")) self.GammaBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Disable automatic gamma correction.</p></body></html>"))
self.AdvModeButton.setText(_translate("KCC", "Advanced")) self.GammaBox.setText(_translate("KCC", "Custom gamma"))
self.GammaLabel.setText(_translate("KCC", "Gamma: Auto")) 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.ColorBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Don\'t convert images to grayscale.</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.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.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.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.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>"))
@@ -311,6 +307,7 @@ class Ui_KCC(object):
self.customHeight.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>")) 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.customHeight.setInputMask(_translate("KCC", "0000"))
self.EditorButton.setText(_translate("KCC", "Editor")) self.EditorButton.setText(_translate("KCC", "Editor"))
self.WikiButton.setText(_translate("KCC", "Wiki"))
self.ActionBasic.setText(_translate("KCC", "Basic")) self.ActionBasic.setText(_translate("KCC", "Basic"))
self.ActionAdvanced.setText(_translate("KCC", "Advanced")) self.ActionAdvanced.setText(_translate("KCC", "Advanced"))

View File

@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'gui/KCC-Linux.ui' # Form implementation generated from reading ui file 'gui/KCC-Linux.ui'
# #
# Created: Sun Feb 8 03:10:09 2015 # Created: Wed Oct 28 08:34:21 2015
# by: PyQt5 UI code generator 5.2.1 # by: PyQt5 UI code generator 5.2.1
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
@@ -12,9 +12,9 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_KCC(object): class Ui_KCC(object):
def setupUi(self, KCC): def setupUi(self, KCC):
KCC.setObjectName("KCC") KCC.setObjectName("KCC")
KCC.resize(420, 397) KCC.resize(420, 390)
KCC.setMinimumSize(QtCore.QSize(420, 397)) KCC.setMinimumSize(QtCore.QSize(420, 390))
KCC.setMaximumSize(QtCore.QSize(420, 397)) KCC.setMaximumSize(QtCore.QSize(420, 390))
font = QtGui.QFont() font = QtGui.QFont()
font.setPointSize(9) font.setPointSize(9)
KCC.setFont(font) KCC.setFont(font)
@@ -24,65 +24,9 @@ class Ui_KCC(object):
KCC.setLocale(QtCore.QLocale(QtCore.QLocale.C, QtCore.QLocale.AnyCountry)) KCC.setLocale(QtCore.QLocale(QtCore.QLocale.C, QtCore.QLocale.AnyCountry))
self.Form = QtWidgets.QWidget(KCC) self.Form = QtWidgets.QWidget(KCC)
self.Form.setObjectName("Form") self.Form.setObjectName("Form")
self.OptionsAdvanced = QtWidgets.QFrame(self.Form)
self.OptionsAdvanced.setEnabled(True)
self.OptionsAdvanced.setGeometry(QtCore.QRect(1, 254, 421, 61))
font = QtGui.QFont()
font.setFamily("DejaVu Sans")
font.setPointSize(9)
self.OptionsAdvanced.setFont(font)
self.OptionsAdvanced.setObjectName("OptionsAdvanced")
self.gridLayout = QtWidgets.QGridLayout(self.OptionsAdvanced)
self.gridLayout.setContentsMargins(9, -1, -1, -1)
self.gridLayout.setObjectName("gridLayout")
self.ProcessingBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
font = QtGui.QFont()
font.setFamily("DejaVu Sans")
self.ProcessingBox.setFont(font)
self.ProcessingBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.ProcessingBox.setObjectName("ProcessingBox")
self.gridLayout.addWidget(self.ProcessingBox, 1, 0, 1, 1)
self.UpscaleBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
font = QtGui.QFont()
font.setFamily("DejaVu Sans")
self.UpscaleBox.setFont(font)
self.UpscaleBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.UpscaleBox.setTristate(True)
self.UpscaleBox.setObjectName("UpscaleBox")
self.gridLayout.addWidget(self.UpscaleBox, 1, 1, 1, 1)
self.WebtoonBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
font = QtGui.QFont()
font.setFamily("DejaVu Sans")
self.WebtoonBox.setFont(font)
self.WebtoonBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.WebtoonBox.setObjectName("WebtoonBox")
self.gridLayout.addWidget(self.WebtoonBox, 3, 1, 1, 1)
self.NoDitheringBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
font = QtGui.QFont()
font.setFamily("DejaVu Sans")
self.NoDitheringBox.setFont(font)
self.NoDitheringBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.NoDitheringBox.setObjectName("NoDitheringBox")
self.gridLayout.addWidget(self.NoDitheringBox, 3, 2, 1, 1)
self.BorderBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
font = QtGui.QFont()
font.setFamily("DejaVu Sans")
self.BorderBox.setFont(font)
self.BorderBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.BorderBox.setTristate(True)
self.BorderBox.setObjectName("BorderBox")
self.gridLayout.addWidget(self.BorderBox, 3, 0, 1, 1)
self.NoRotateBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
font = QtGui.QFont()
font.setFamily("DejaVu Sans")
self.NoRotateBox.setFont(font)
self.NoRotateBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.NoRotateBox.setObjectName("NoRotateBox")
self.gridLayout.addWidget(self.NoRotateBox, 1, 2, 1, 1)
self.DeviceBox = QtWidgets.QComboBox(self.Form) self.DeviceBox = QtWidgets.QComboBox(self.Form)
self.DeviceBox.setGeometry(QtCore.QRect(10, 200, 141, 31)) self.DeviceBox.setGeometry(QtCore.QRect(10, 200, 141, 31))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("DejaVu Sans")
font.setPointSize(8) font.setPointSize(8)
self.DeviceBox.setFont(font) self.DeviceBox.setFont(font)
self.DeviceBox.setFocusPolicy(QtCore.Qt.NoFocus) self.DeviceBox.setFocusPolicy(QtCore.Qt.NoFocus)
@@ -90,7 +34,6 @@ class Ui_KCC(object):
self.FormatBox = QtWidgets.QComboBox(self.Form) self.FormatBox = QtWidgets.QComboBox(self.Form)
self.FormatBox.setGeometry(QtCore.QRect(260, 200, 151, 31)) self.FormatBox.setGeometry(QtCore.QRect(260, 200, 151, 31))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("DejaVu Sans")
font.setPointSize(8) font.setPointSize(8)
self.FormatBox.setFont(font) self.FormatBox.setFont(font)
self.FormatBox.setFocusPolicy(QtCore.Qt.NoFocus) self.FormatBox.setFocusPolicy(QtCore.Qt.NoFocus)
@@ -98,7 +41,6 @@ class Ui_KCC(object):
self.ConvertButton = QtWidgets.QPushButton(self.Form) self.ConvertButton = QtWidgets.QPushButton(self.Form)
self.ConvertButton.setGeometry(QtCore.QRect(160, 200, 91, 32)) self.ConvertButton.setGeometry(QtCore.QRect(160, 200, 91, 32))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("DejaVu Sans")
font.setPointSize(9) font.setPointSize(9)
font.setBold(True) font.setBold(True)
font.setWeight(75) font.setWeight(75)
@@ -111,7 +53,6 @@ class Ui_KCC(object):
self.DirectoryButton = QtWidgets.QPushButton(self.Form) self.DirectoryButton = QtWidgets.QPushButton(self.Form)
self.DirectoryButton.setGeometry(QtCore.QRect(10, 160, 141, 32)) self.DirectoryButton.setGeometry(QtCore.QRect(10, 160, 141, 32))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("DejaVu Sans")
font.setPointSize(8) font.setPointSize(8)
self.DirectoryButton.setFont(font) self.DirectoryButton.setFont(font)
self.DirectoryButton.setFocusPolicy(QtCore.Qt.NoFocus) self.DirectoryButton.setFocusPolicy(QtCore.Qt.NoFocus)
@@ -122,7 +63,6 @@ class Ui_KCC(object):
self.FileButton = QtWidgets.QPushButton(self.Form) self.FileButton = QtWidgets.QPushButton(self.Form)
self.FileButton.setGeometry(QtCore.QRect(260, 160, 151, 32)) self.FileButton.setGeometry(QtCore.QRect(260, 160, 151, 32))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("DejaVu Sans")
font.setPointSize(8) font.setPointSize(8)
self.FileButton.setFont(font) self.FileButton.setFont(font)
self.FileButton.setFocusPolicy(QtCore.Qt.NoFocus) self.FileButton.setFocusPolicy(QtCore.Qt.NoFocus)
@@ -133,7 +73,6 @@ class Ui_KCC(object):
self.ClearButton = QtWidgets.QPushButton(self.Form) self.ClearButton = QtWidgets.QPushButton(self.Form)
self.ClearButton.setGeometry(QtCore.QRect(160, 160, 91, 32)) self.ClearButton.setGeometry(QtCore.QRect(160, 160, 91, 32))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("DejaVu Sans")
font.setPointSize(8) font.setPointSize(8)
self.ClearButton.setFont(font) self.ClearButton.setFont(font)
self.ClearButton.setFocusPolicy(QtCore.Qt.NoFocus) self.ClearButton.setFocusPolicy(QtCore.Qt.NoFocus)
@@ -141,92 +80,88 @@ class Ui_KCC(object):
icon4.addPixmap(QtGui.QPixmap(":/Other/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon4.addPixmap(QtGui.QPixmap(":/Other/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.ClearButton.setIcon(icon4) self.ClearButton.setIcon(icon4)
self.ClearButton.setObjectName("ClearButton") self.ClearButton.setObjectName("ClearButton")
self.OptionsBasic = QtWidgets.QFrame(self.Form) self.Options = QtWidgets.QFrame(self.Form)
self.OptionsBasic.setGeometry(QtCore.QRect(1, 230, 421, 41)) self.Options.setGeometry(QtCore.QRect(10, 237, 401, 70))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("DejaVu Sans")
font.setPointSize(9) font.setPointSize(9)
self.OptionsBasic.setFont(font) self.Options.setFont(font)
self.OptionsBasic.setObjectName("OptionsBasic") self.Options.setObjectName("Options")
self.MangaBox = QtWidgets.QCheckBox(self.OptionsBasic) self.gridLayout = QtWidgets.QGridLayout(self.Options)
self.MangaBox.setGeometry(QtCore.QRect(9, 10, 130, 18)) self.gridLayout.setContentsMargins(0, 0, 0, 0)
font = QtGui.QFont() self.gridLayout.setHorizontalSpacing(25)
font.setFamily("DejaVu Sans") self.gridLayout.setVerticalSpacing(4)
self.MangaBox.setFont(font) self.gridLayout.setObjectName("gridLayout")
self.MangaBox = QtWidgets.QCheckBox(self.Options)
self.MangaBox.setFocusPolicy(QtCore.Qt.NoFocus) self.MangaBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.MangaBox.setObjectName("MangaBox") self.MangaBox.setObjectName("MangaBox")
self.QualityBox = QtWidgets.QCheckBox(self.OptionsBasic) self.gridLayout.addWidget(self.MangaBox, 2, 0, 1, 1)
self.QualityBox.setGeometry(QtCore.QRect(282, 10, 135, 18)) self.RotateBox = QtWidgets.QCheckBox(self.Options)
font = QtGui.QFont()
font.setFamily("DejaVu Sans")
self.QualityBox.setFont(font)
self.QualityBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.QualityBox.setTristate(True)
self.QualityBox.setObjectName("QualityBox")
self.RotateBox = QtWidgets.QCheckBox(self.OptionsBasic)
self.RotateBox.setGeometry(QtCore.QRect(145, 10, 130, 18))
font = QtGui.QFont()
font.setFamily("DejaVu Sans")
self.RotateBox.setFont(font)
self.RotateBox.setFocusPolicy(QtCore.Qt.NoFocus) self.RotateBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.RotateBox.setTristate(True)
self.RotateBox.setObjectName("RotateBox") 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 = QtWidgets.QListWidget(self.Form)
self.JobList.setGeometry(QtCore.QRect(10, 50, 401, 101)) self.JobList.setGeometry(QtCore.QRect(10, 50, 401, 101))
font = QtGui.QFont()
font.setFamily("DejaVu Sans")
font.setPointSize(8)
font.setItalic(False)
self.JobList.setFont(font)
self.JobList.setFocusPolicy(QtCore.Qt.NoFocus) 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.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.setProperty("showDropIndicator", False)
self.JobList.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection) self.JobList.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection)
self.JobList.setIconSize(QtCore.QSize(18, 18)) self.JobList.setIconSize(QtCore.QSize(18, 18))
self.JobList.setObjectName("JobList") self.JobList.setObjectName("JobList")
self.BasicModeButton = QtWidgets.QPushButton(self.Form) self.OptionsGamma = QtWidgets.QFrame(self.Form)
self.BasicModeButton.setGeometry(QtCore.QRect(10, 10, 141, 32)) self.OptionsGamma.setEnabled(True)
self.OptionsGamma.setGeometry(QtCore.QRect(10, 305, 401, 35))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("DejaVu Sans")
font.setPointSize(9) font.setPointSize(9)
self.BasicModeButton.setFont(font) self.OptionsGamma.setFont(font)
self.BasicModeButton.setFocusPolicy(QtCore.Qt.NoFocus) self.OptionsGamma.setObjectName("OptionsGamma")
self.BasicModeButton.setObjectName("BasicModeButton") self.horizontalLayout = QtWidgets.QHBoxLayout(self.OptionsGamma)
self.AdvModeButton = QtWidgets.QPushButton(self.Form) self.horizontalLayout.setSpacing(15)
self.AdvModeButton.setGeometry(QtCore.QRect(260, 10, 151, 32)) self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
font = QtGui.QFont() self.horizontalLayout.setObjectName("horizontalLayout")
font.setFamily("DejaVu Sans") self.GammaLabel = QtWidgets.QLabel(self.OptionsGamma)
font.setPointSize(9)
self.AdvModeButton.setFont(font)
self.AdvModeButton.setFocusPolicy(QtCore.Qt.NoFocus)
self.AdvModeButton.setObjectName("AdvModeButton")
self.OptionsAdvancedGamma = QtWidgets.QFrame(self.Form)
self.OptionsAdvancedGamma.setEnabled(True)
self.OptionsAdvancedGamma.setGeometry(QtCore.QRect(10, 305, 401, 41))
font = QtGui.QFont()
font.setFamily("DejaVu Sans")
font.setPointSize(9)
self.OptionsAdvancedGamma.setFont(font)
self.OptionsAdvancedGamma.setObjectName("OptionsAdvancedGamma")
self.GammaLabel = QtWidgets.QLabel(self.OptionsAdvancedGamma)
self.GammaLabel.setGeometry(QtCore.QRect(15, 0, 100, 40))
font = QtGui.QFont()
font.setFamily("DejaVu Sans")
self.GammaLabel.setFont(font)
self.GammaLabel.setObjectName("GammaLabel") self.GammaLabel.setObjectName("GammaLabel")
self.GammaSlider = QtWidgets.QSlider(self.OptionsAdvancedGamma) self.horizontalLayout.addWidget(self.GammaLabel)
self.GammaSlider.setGeometry(QtCore.QRect(110, 10, 275, 22)) self.GammaSlider = QtWidgets.QSlider(self.OptionsGamma)
font = QtGui.QFont()
font.setFamily("DejaVu Sans")
self.GammaSlider.setFont(font)
self.GammaSlider.setFocusPolicy(QtCore.Qt.ClickFocus) self.GammaSlider.setFocusPolicy(QtCore.Qt.ClickFocus)
self.GammaSlider.setMaximum(500) self.GammaSlider.setMaximum(500)
self.GammaSlider.setSingleStep(5) self.GammaSlider.setSingleStep(5)
self.GammaSlider.setOrientation(QtCore.Qt.Horizontal) self.GammaSlider.setOrientation(QtCore.Qt.Horizontal)
self.GammaSlider.setObjectName("GammaSlider") self.GammaSlider.setObjectName("GammaSlider")
self.horizontalLayout.addWidget(self.GammaSlider)
self.ProgressBar = QtWidgets.QProgressBar(self.Form) self.ProgressBar = QtWidgets.QProgressBar(self.Form)
self.ProgressBar.setGeometry(QtCore.QRect(10, 10, 401, 31)) self.ProgressBar.setGeometry(QtCore.QRect(10, 10, 401, 31))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("DejaVu Sans")
font.setPointSize(10) font.setPointSize(10)
font.setBold(True) font.setBold(True)
font.setWeight(75) font.setWeight(75)
@@ -235,74 +170,47 @@ class Ui_KCC(object):
self.ProgressBar.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter) self.ProgressBar.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter)
self.ProgressBar.setFormat("") self.ProgressBar.setFormat("")
self.ProgressBar.setObjectName("ProgressBar") self.ProgressBar.setObjectName("ProgressBar")
self.OptionsExpert = QtWidgets.QFrame(self.Form) self.OptionsCustom = QtWidgets.QFrame(self.Form)
self.OptionsExpert.setGeometry(QtCore.QRect(1, 337, 421, 41)) self.OptionsCustom.setGeometry(QtCore.QRect(10, 336, 401, 25))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("DejaVu Sans")
font.setPointSize(9) font.setPointSize(9)
self.OptionsExpert.setFont(font) self.OptionsCustom.setFont(font)
self.OptionsExpert.setObjectName("OptionsExpert") self.OptionsCustom.setObjectName("OptionsCustom")
self.ColorBox = QtWidgets.QCheckBox(self.OptionsExpert) self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.OptionsCustom)
self.ColorBox.setGeometry(QtCore.QRect(9, 11, 130, 18)) self.horizontalLayout_2.setSpacing(10)
font = QtGui.QFont() self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
font.setFamily("DejaVu Sans") self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.ColorBox.setFont(font) self.wLabel = QtWidgets.QLabel(self.OptionsCustom)
self.ColorBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.ColorBox.setObjectName("ColorBox")
self.OptionsExpertInternal = QtWidgets.QFrame(self.OptionsExpert)
self.OptionsExpertInternal.setGeometry(QtCore.QRect(105, 0, 295, 40))
font = QtGui.QFont()
font.setFamily("DejaVu Sans")
self.OptionsExpertInternal.setFont(font)
self.OptionsExpertInternal.setObjectName("OptionsExpertInternal")
self.gridLayout_2 = QtWidgets.QGridLayout(self.OptionsExpertInternal)
self.gridLayout_2.setObjectName("gridLayout_2")
self.wLabel = QtWidgets.QLabel(self.OptionsExpertInternal)
font = QtGui.QFont()
font.setFamily("DejaVu Sans")
self.wLabel.setFont(font)
self.wLabel.setObjectName("wLabel") self.wLabel.setObjectName("wLabel")
self.gridLayout_2.addWidget(self.wLabel, 0, 0, 1, 1) self.horizontalLayout_2.addWidget(self.wLabel)
self.customWidth = QtWidgets.QLineEdit(self.OptionsExpertInternal) self.customWidth = QtWidgets.QLineEdit(self.OptionsCustom)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0) sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0) sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.customWidth.sizePolicy().hasHeightForWidth()) sizePolicy.setHeightForWidth(self.customWidth.sizePolicy().hasHeightForWidth())
self.customWidth.setSizePolicy(sizePolicy) self.customWidth.setSizePolicy(sizePolicy)
self.customWidth.setMaximumSize(QtCore.QSize(40, 16777215))
font = QtGui.QFont()
font.setFamily("DejaVu Sans")
self.customWidth.setFont(font)
self.customWidth.setFocusPolicy(QtCore.Qt.ClickFocus) self.customWidth.setFocusPolicy(QtCore.Qt.ClickFocus)
self.customWidth.setAcceptDrops(False) self.customWidth.setAcceptDrops(False)
self.customWidth.setMaxLength(4) self.customWidth.setMaxLength(4)
self.customWidth.setObjectName("customWidth") self.customWidth.setObjectName("customWidth")
self.gridLayout_2.addWidget(self.customWidth, 0, 1, 1, 1) self.horizontalLayout_2.addWidget(self.customWidth)
self.hLabel = QtWidgets.QLabel(self.OptionsExpertInternal) self.hLabel = QtWidgets.QLabel(self.OptionsCustom)
font = QtGui.QFont()
font.setFamily("DejaVu Sans")
self.hLabel.setFont(font)
self.hLabel.setObjectName("hLabel") self.hLabel.setObjectName("hLabel")
self.gridLayout_2.addWidget(self.hLabel, 0, 2, 1, 1) self.horizontalLayout_2.addWidget(self.hLabel)
self.customHeight = QtWidgets.QLineEdit(self.OptionsExpertInternal) self.customHeight = QtWidgets.QLineEdit(self.OptionsCustom)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0) sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0) sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.customHeight.sizePolicy().hasHeightForWidth()) sizePolicy.setHeightForWidth(self.customHeight.sizePolicy().hasHeightForWidth())
self.customHeight.setSizePolicy(sizePolicy) self.customHeight.setSizePolicy(sizePolicy)
self.customHeight.setMaximumSize(QtCore.QSize(40, 16777215))
font = QtGui.QFont()
font.setFamily("DejaVu Sans")
self.customHeight.setFont(font)
self.customHeight.setFocusPolicy(QtCore.Qt.ClickFocus) self.customHeight.setFocusPolicy(QtCore.Qt.ClickFocus)
self.customHeight.setAcceptDrops(False) self.customHeight.setAcceptDrops(False)
self.customHeight.setMaxLength(4) self.customHeight.setMaxLength(4)
self.customHeight.setObjectName("customHeight") self.customHeight.setObjectName("customHeight")
self.gridLayout_2.addWidget(self.customHeight, 0, 3, 1, 1) self.horizontalLayout_2.addWidget(self.customHeight)
self.EditorButton = QtWidgets.QPushButton(self.Form) self.EditorButton = QtWidgets.QPushButton(self.Form)
self.EditorButton.setGeometry(QtCore.QRect(160, 10, 91, 32)) self.EditorButton.setGeometry(QtCore.QRect(10, 10, 200, 32))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("DejaVu Sans")
font.setPointSize(9) font.setPointSize(9)
self.EditorButton.setFont(font) self.EditorButton.setFont(font)
self.EditorButton.setFocusPolicy(QtCore.Qt.NoFocus) self.EditorButton.setFocusPolicy(QtCore.Qt.NoFocus)
@@ -310,10 +218,19 @@ class Ui_KCC(object):
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.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) KCC.setCentralWidget(self.Form)
self.statusBar = QtWidgets.QStatusBar(KCC) self.statusBar = QtWidgets.QStatusBar(KCC)
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("DejaVu Sans")
font.setPointSize(8) font.setPointSize(8)
self.statusBar.setFont(font) self.statusBar.setFont(font)
self.statusBar.setSizeGripEnabled(False) self.statusBar.setSizeGripEnabled(False)
@@ -338,18 +255,6 @@ class Ui_KCC(object):
def retranslateUi(self, KCC): def retranslateUi(self, KCC):
_translate = QtCore.QCoreApplication.translate _translate = QtCore.QCoreApplication.translate
KCC.setWindowTitle(_translate("KCC", "Kindle Comic Converter")) KCC.setWindowTitle(_translate("KCC", "Kindle Comic Converter"))
self.ProcessingBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Disable image optimizations.<br/><span style=\" font-weight:600;\">Input images must be already resized.</span></p></body></html>"))
self.ProcessingBox.setText(_translate("KCC", "No optimisation"))
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 WebToons.</p></body></html>"))
self.WebtoonBox.setText(_translate("KCC", "Webtoon 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.NoDitheringBox.setText(_translate("KCC", "PNG output"))
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.NoRotateBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Disable page splitting and rotation.</p></body></html>"))
self.NoRotateBox.setText(_translate("KCC", "No split/rotate"))
self.DeviceBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Target device.</p></body></html>")) 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.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.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Shift+Click to select the output directory.</p></body></html>"))
@@ -361,15 +266,23 @@ class Ui_KCC(object):
self.ClearButton.setText(_translate("KCC", "Clear list")) 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.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.MangaBox.setText(_translate("KCC", "Manga mode"))
self.QualityBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Quality of Panel View/zoom. Highly impact size of output file.<br/><span style=\" font-weight:600;\">This option control only quality of magnification!</span></p></body></html>")) 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.QualityBox.setText(_translate("KCC", "High/Ultra quality")) self.RotateBox.setText(_translate("KCC", "Spread splitter"))
self.RotateBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Disable splitting of two-page spreads.<br/>They will be rotated instead.</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.RotateBox.setText(_translate("KCC", "Horizontal mode")) self.QualityBox.setText(_translate("KCC", "HQ zoom"))
self.BasicModeButton.setText(_translate("KCC", "Basic")) self.GammaBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Disable automatic gamma correction.</p></body></html>"))
self.AdvModeButton.setText(_translate("KCC", "Advanced")) self.GammaBox.setText(_translate("KCC", "Custom gamma"))
self.GammaLabel.setText(_translate("KCC", "Gamma: Auto")) 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.ColorBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Don\'t convert images to grayscale.</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.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.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.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.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>"))
@@ -379,6 +292,7 @@ class Ui_KCC(object):
self.customHeight.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>")) 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.customHeight.setInputMask(_translate("KCC", "0000"))
self.EditorButton.setText(_translate("KCC", "Editor")) self.EditorButton.setText(_translate("KCC", "Editor"))
self.WikiButton.setText(_translate("KCC", "Wiki"))
self.ActionBasic.setText(_translate("KCC", "Basic")) self.ActionBasic.setText(_translate("KCC", "Basic"))
self.ActionAdvanced.setText(_translate("KCC", "Advanced")) self.ActionAdvanced.setText(_translate("KCC", "Advanced"))

View File

@@ -1,9 +1,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/Users/pawelj/Documents/KCC/gui/KCC-OSX.ui' # Form implementation generated from reading ui file 'KCC-OSX.ui'
# #
# Created: Sun Feb 8 12:37:33 2015 # Created by: PyQt5 UI code generator 5.5.1
# by: PyQt5 UI code generator 5.4
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
@@ -12,11 +11,11 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_KCC(object): class Ui_KCC(object):
def setupUi(self, KCC): def setupUi(self, KCC):
KCC.setObjectName("KCC") KCC.setObjectName("KCC")
KCC.resize(420, 397) KCC.resize(420, 390)
KCC.setMinimumSize(QtCore.QSize(420, 397)) KCC.setMinimumSize(QtCore.QSize(420, 390))
KCC.setMaximumSize(QtCore.QSize(420, 397)) KCC.setMaximumSize(QtCore.QSize(420, 390))
font = QtGui.QFont() font = QtGui.QFont()
font.setPointSize(9) font.setPointSize(11)
KCC.setFont(font) 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)
@@ -24,86 +23,23 @@ class Ui_KCC(object):
KCC.setLocale(QtCore.QLocale(QtCore.QLocale.C, QtCore.QLocale.AnyCountry)) KCC.setLocale(QtCore.QLocale(QtCore.QLocale.C, QtCore.QLocale.AnyCountry))
self.Form = QtWidgets.QWidget(KCC) self.Form = QtWidgets.QWidget(KCC)
self.Form.setObjectName("Form") self.Form.setObjectName("Form")
self.OptionsAdvanced = QtWidgets.QFrame(self.Form)
self.OptionsAdvanced.setEnabled(True)
self.OptionsAdvanced.setGeometry(QtCore.QRect(4, 253, 421, 61))
font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(9)
self.OptionsAdvanced.setFont(font)
self.OptionsAdvanced.setObjectName("OptionsAdvanced")
self.gridLayout = QtWidgets.QGridLayout(self.OptionsAdvanced)
self.gridLayout.setObjectName("gridLayout")
self.ProcessingBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(12)
self.ProcessingBox.setFont(font)
self.ProcessingBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.ProcessingBox.setObjectName("ProcessingBox")
self.gridLayout.addWidget(self.ProcessingBox, 1, 0, 1, 1)
self.UpscaleBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(12)
self.UpscaleBox.setFont(font)
self.UpscaleBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.UpscaleBox.setTristate(True)
self.UpscaleBox.setObjectName("UpscaleBox")
self.gridLayout.addWidget(self.UpscaleBox, 1, 1, 1, 1)
self.WebtoonBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(12)
self.WebtoonBox.setFont(font)
self.WebtoonBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.WebtoonBox.setObjectName("WebtoonBox")
self.gridLayout.addWidget(self.WebtoonBox, 3, 1, 1, 1)
self.NoDitheringBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(12)
self.NoDitheringBox.setFont(font)
self.NoDitheringBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.NoDitheringBox.setObjectName("NoDitheringBox")
self.gridLayout.addWidget(self.NoDitheringBox, 3, 2, 1, 1)
self.BorderBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(12)
self.BorderBox.setFont(font)
self.BorderBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.BorderBox.setTristate(True)
self.BorderBox.setObjectName("BorderBox")
self.gridLayout.addWidget(self.BorderBox, 3, 0, 1, 1)
self.NoRotateBox = QtWidgets.QCheckBox(self.OptionsAdvanced)
font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(12)
self.NoRotateBox.setFont(font)
self.NoRotateBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.NoRotateBox.setObjectName("NoRotateBox")
self.gridLayout.addWidget(self.NoRotateBox, 1, 2, 1, 1)
self.DeviceBox = QtWidgets.QComboBox(self.Form) self.DeviceBox = QtWidgets.QComboBox(self.Form)
self.DeviceBox.setGeometry(QtCore.QRect(8, 201, 151, 34)) self.DeviceBox.setGeometry(QtCore.QRect(8, 204, 151, 26))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(11) font.setPointSize(11)
self.DeviceBox.setFont(font) self.DeviceBox.setFont(font)
self.DeviceBox.setFocusPolicy(QtCore.Qt.NoFocus) self.DeviceBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.DeviceBox.setObjectName("DeviceBox") self.DeviceBox.setObjectName("DeviceBox")
self.FormatBox = QtWidgets.QComboBox(self.Form) self.FormatBox = QtWidgets.QComboBox(self.Form)
self.FormatBox.setGeometry(QtCore.QRect(262, 201, 152, 34)) self.FormatBox.setGeometry(QtCore.QRect(264, 204, 150, 26))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(11) font.setPointSize(11)
self.FormatBox.setFont(font) self.FormatBox.setFont(font)
self.FormatBox.setFocusPolicy(QtCore.Qt.NoFocus) self.FormatBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.FormatBox.setObjectName("FormatBox") self.FormatBox.setObjectName("FormatBox")
self.ConvertButton = QtWidgets.QPushButton(self.Form) self.ConvertButton = QtWidgets.QPushButton(self.Form)
self.ConvertButton.setGeometry(QtCore.QRect(160, 200, 101, 41)) self.ConvertButton.setGeometry(QtCore.QRect(159, 200, 104, 41))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(11) font.setPointSize(11)
font.setBold(True) font.setBold(True)
font.setWeight(75) font.setWeight(75)
@@ -114,9 +50,8 @@ class Ui_KCC(object):
self.ConvertButton.setIcon(icon1) self.ConvertButton.setIcon(icon1)
self.ConvertButton.setObjectName("ConvertButton") self.ConvertButton.setObjectName("ConvertButton")
self.DirectoryButton = QtWidgets.QPushButton(self.Form) self.DirectoryButton = QtWidgets.QPushButton(self.Form)
self.DirectoryButton.setGeometry(QtCore.QRect(5, 160, 156, 41)) self.DirectoryButton.setGeometry(QtCore.QRect(4, 160, 158, 41))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(11) font.setPointSize(11)
self.DirectoryButton.setFont(font) self.DirectoryButton.setFont(font)
self.DirectoryButton.setFocusPolicy(QtCore.Qt.NoFocus) self.DirectoryButton.setFocusPolicy(QtCore.Qt.NoFocus)
@@ -127,7 +62,6 @@ class Ui_KCC(object):
self.FileButton = QtWidgets.QPushButton(self.Form) self.FileButton = QtWidgets.QPushButton(self.Form)
self.FileButton.setGeometry(QtCore.QRect(260, 160, 157, 41)) self.FileButton.setGeometry(QtCore.QRect(260, 160, 157, 41))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(11) font.setPointSize(11)
self.FileButton.setFont(font) self.FileButton.setFont(font)
self.FileButton.setFocusPolicy(QtCore.Qt.NoFocus) self.FileButton.setFocusPolicy(QtCore.Qt.NoFocus)
@@ -136,9 +70,8 @@ class Ui_KCC(object):
self.FileButton.setIcon(icon3) self.FileButton.setIcon(icon3)
self.FileButton.setObjectName("FileButton") self.FileButton.setObjectName("FileButton")
self.ClearButton = QtWidgets.QPushButton(self.Form) self.ClearButton = QtWidgets.QPushButton(self.Form)
self.ClearButton.setGeometry(QtCore.QRect(160, 160, 101, 41)) self.ClearButton.setGeometry(QtCore.QRect(159, 160, 104, 41))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(11) font.setPointSize(11)
self.ClearButton.setFont(font) self.ClearButton.setFont(font)
self.ClearButton.setFocusPolicy(QtCore.Qt.NoFocus) self.ClearButton.setFocusPolicy(QtCore.Qt.NoFocus)
@@ -146,103 +79,94 @@ class Ui_KCC(object):
icon4.addPixmap(QtGui.QPixmap(":/Other/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon4.addPixmap(QtGui.QPixmap(":/Other/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.ClearButton.setIcon(icon4) self.ClearButton.setIcon(icon4)
self.ClearButton.setObjectName("ClearButton") self.ClearButton.setObjectName("ClearButton")
self.OptionsBasic = QtWidgets.QFrame(self.Form) self.Options = QtWidgets.QFrame(self.Form)
self.OptionsBasic.setGeometry(QtCore.QRect(5, 233, 421, 41)) self.Options.setGeometry(QtCore.QRect(10, 237, 401, 70))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("Lucida Grande") font.setPointSize(11)
font.setPointSize(12) self.Options.setFont(font)
self.OptionsBasic.setFont(font) self.Options.setObjectName("Options")
self.OptionsBasic.setObjectName("OptionsBasic") self.gridLayout = QtWidgets.QGridLayout(self.Options)
self.MangaBox = QtWidgets.QCheckBox(self.OptionsBasic) self.gridLayout.setContentsMargins(0, 0, 0, 0)
self.MangaBox.setGeometry(QtCore.QRect(9, 10, 130, 18)) self.gridLayout.setHorizontalSpacing(31)
font = QtGui.QFont() self.gridLayout.setVerticalSpacing(5)
font.setFamily("Lucida Grande") self.gridLayout.setObjectName("gridLayout")
font.setPointSize(12) self.MangaBox = QtWidgets.QCheckBox(self.Options)
self.MangaBox.setFont(font)
self.MangaBox.setFocusPolicy(QtCore.Qt.NoFocus) self.MangaBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.MangaBox.setObjectName("MangaBox") self.MangaBox.setObjectName("MangaBox")
self.QualityBox = QtWidgets.QCheckBox(self.OptionsBasic) self.gridLayout.addWidget(self.MangaBox, 2, 0, 1, 1)
self.QualityBox.setGeometry(QtCore.QRect(282, 10, 135, 18)) self.RotateBox = QtWidgets.QCheckBox(self.Options)
font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(12)
self.QualityBox.setFont(font)
self.QualityBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.QualityBox.setTristate(True)
self.QualityBox.setObjectName("QualityBox")
self.RotateBox = QtWidgets.QCheckBox(self.OptionsBasic)
self.RotateBox.setGeometry(QtCore.QRect(145, 10, 130, 18))
font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(12)
self.RotateBox.setFont(font)
self.RotateBox.setFocusPolicy(QtCore.Qt.NoFocus) self.RotateBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.RotateBox.setTristate(True)
self.RotateBox.setObjectName("RotateBox") 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 = QtWidgets.QListWidget(self.Form)
self.JobList.setGeometry(QtCore.QRect(10, 50, 401, 101)) self.JobList.setGeometry(QtCore.QRect(10, 50, 401, 101))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(11) font.setPointSize(11)
self.JobList.setFont(font) self.JobList.setFont(font)
self.JobList.setFocusPolicy(QtCore.Qt.NoFocus) 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.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.setProperty("showDropIndicator", False)
self.JobList.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection) self.JobList.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection)
self.JobList.setIconSize(QtCore.QSize(15, 15))
self.JobList.setVerticalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel) self.JobList.setVerticalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel)
self.JobList.setHorizontalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel) self.JobList.setHorizontalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel)
self.JobList.setObjectName("JobList") self.JobList.setObjectName("JobList")
self.BasicModeButton = QtWidgets.QPushButton(self.Form) self.OptionsGamma = QtWidgets.QFrame(self.Form)
self.BasicModeButton.setGeometry(QtCore.QRect(5, 10, 156, 41)) self.OptionsGamma.setEnabled(True)
self.OptionsGamma.setGeometry(QtCore.QRect(10, 305, 401, 35))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("Lucida Grande") font.setPointSize(11)
font.setPointSize(12) self.OptionsGamma.setFont(font)
font.setBold(False) self.OptionsGamma.setObjectName("OptionsGamma")
font.setWeight(50) self.horizontalLayout = QtWidgets.QHBoxLayout(self.OptionsGamma)
self.BasicModeButton.setFont(font) self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.BasicModeButton.setFocusPolicy(QtCore.Qt.NoFocus) self.horizontalLayout.setSpacing(15)
self.BasicModeButton.setObjectName("BasicModeButton") self.horizontalLayout.setObjectName("horizontalLayout")
self.AdvModeButton = QtWidgets.QPushButton(self.Form) self.GammaLabel = QtWidgets.QLabel(self.OptionsGamma)
self.AdvModeButton.setGeometry(QtCore.QRect(260, 10, 156, 41))
font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(12)
font.setBold(False)
font.setWeight(50)
self.AdvModeButton.setFont(font)
self.AdvModeButton.setFocusPolicy(QtCore.Qt.NoFocus)
self.AdvModeButton.setObjectName("AdvModeButton")
self.OptionsAdvancedGamma = QtWidgets.QFrame(self.Form)
self.OptionsAdvancedGamma.setEnabled(True)
self.OptionsAdvancedGamma.setGeometry(QtCore.QRect(5, 303, 401, 41))
font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(9)
self.OptionsAdvancedGamma.setFont(font)
self.OptionsAdvancedGamma.setObjectName("OptionsAdvancedGamma")
self.GammaLabel = QtWidgets.QLabel(self.OptionsAdvancedGamma)
self.GammaLabel.setGeometry(QtCore.QRect(20, 0, 100, 40))
font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(12)
font.setBold(False)
font.setWeight(50)
self.GammaLabel.setFont(font)
self.GammaLabel.setObjectName("GammaLabel") self.GammaLabel.setObjectName("GammaLabel")
self.GammaSlider = QtWidgets.QSlider(self.OptionsAdvancedGamma) self.horizontalLayout.addWidget(self.GammaLabel)
self.GammaSlider.setGeometry(QtCore.QRect(110, 10, 290, 22)) self.GammaSlider = QtWidgets.QSlider(self.OptionsGamma)
font = QtGui.QFont()
font.setFamily("Lucida Grande")
self.GammaSlider.setFont(font)
self.GammaSlider.setFocusPolicy(QtCore.Qt.ClickFocus) self.GammaSlider.setFocusPolicy(QtCore.Qt.ClickFocus)
self.GammaSlider.setMaximum(500) self.GammaSlider.setMaximum(500)
self.GammaSlider.setSingleStep(5) self.GammaSlider.setSingleStep(5)
self.GammaSlider.setOrientation(QtCore.Qt.Horizontal) self.GammaSlider.setOrientation(QtCore.Qt.Horizontal)
self.GammaSlider.setObjectName("GammaSlider") self.GammaSlider.setObjectName("GammaSlider")
self.horizontalLayout.addWidget(self.GammaSlider)
self.ProgressBar = QtWidgets.QProgressBar(self.Form) self.ProgressBar = QtWidgets.QProgressBar(self.Form)
self.ProgressBar.setGeometry(QtCore.QRect(10, 10, 401, 29)) self.ProgressBar.setGeometry(QtCore.QRect(10, 10, 401, 31))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("Lucida Grande") font.setPointSize(11)
font.setPointSize(10)
font.setBold(True) font.setBold(True)
font.setWeight(75) font.setWeight(75)
self.ProgressBar.setFont(font) self.ProgressBar.setFont(font)
@@ -250,95 +174,81 @@ class Ui_KCC(object):
self.ProgressBar.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter) self.ProgressBar.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter)
self.ProgressBar.setFormat("") self.ProgressBar.setFormat("")
self.ProgressBar.setObjectName("ProgressBar") self.ProgressBar.setObjectName("ProgressBar")
self.OptionsExpert = QtWidgets.QFrame(self.Form) self.OptionsCustom = QtWidgets.QFrame(self.Form)
self.OptionsExpert.setGeometry(QtCore.QRect(5, 335, 421, 41)) self.OptionsCustom.setGeometry(QtCore.QRect(10, 337, 401, 25))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("Lucida Grande") font.setPointSize(11)
font.setPointSize(9) self.OptionsCustom.setFont(font)
self.OptionsExpert.setFont(font) self.OptionsCustom.setObjectName("OptionsCustom")
self.OptionsExpert.setObjectName("OptionsExpert") self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.OptionsCustom)
self.ColorBox = QtWidgets.QCheckBox(self.OptionsExpert) self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
self.ColorBox.setGeometry(QtCore.QRect(9, 11, 130, 18)) self.horizontalLayout_2.setSpacing(5)
font = QtGui.QFont() self.horizontalLayout_2.setObjectName("horizontalLayout_2")
font.setFamily("Lucida Grande") self.wLabel = QtWidgets.QLabel(self.OptionsCustom)
font.setPointSize(12)
self.ColorBox.setFont(font)
self.ColorBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.ColorBox.setObjectName("ColorBox")
self.OptionsExpertInternal = QtWidgets.QFrame(self.OptionsExpert)
self.OptionsExpertInternal.setGeometry(QtCore.QRect(95, 0, 315, 40))
font = QtGui.QFont()
font.setFamily("Lucida Grande")
self.OptionsExpertInternal.setFont(font)
self.OptionsExpertInternal.setObjectName("OptionsExpertInternal")
self.gridLayout_2 = QtWidgets.QGridLayout(self.OptionsExpertInternal)
self.gridLayout_2.setObjectName("gridLayout_2")
self.wLabel = QtWidgets.QLabel(self.OptionsExpertInternal)
font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(12)
font.setBold(False)
font.setWeight(50)
self.wLabel.setFont(font)
self.wLabel.setObjectName("wLabel") self.wLabel.setObjectName("wLabel")
self.gridLayout_2.addWidget(self.wLabel, 0, 0, 1, 1) self.horizontalLayout_2.addWidget(self.wLabel)
self.customWidth = QtWidgets.QLineEdit(self.OptionsExpertInternal) self.customWidth = QtWidgets.QLineEdit(self.OptionsCustom)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0) sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0) sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.customWidth.sizePolicy().hasHeightForWidth()) sizePolicy.setHeightForWidth(self.customWidth.sizePolicy().hasHeightForWidth())
self.customWidth.setSizePolicy(sizePolicy) self.customWidth.setSizePolicy(sizePolicy)
self.customWidth.setMaximumSize(QtCore.QSize(45, 16777215))
font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(12)
self.customWidth.setFont(font)
self.customWidth.setFocusPolicy(QtCore.Qt.ClickFocus) self.customWidth.setFocusPolicy(QtCore.Qt.ClickFocus)
self.customWidth.setAcceptDrops(False) self.customWidth.setAcceptDrops(False)
self.customWidth.setMaxLength(4) self.customWidth.setMaxLength(4)
self.customWidth.setObjectName("customWidth") self.customWidth.setObjectName("customWidth")
self.gridLayout_2.addWidget(self.customWidth, 0, 1, 1, 1) self.horizontalLayout_2.addWidget(self.customWidth)
self.hLabel = QtWidgets.QLabel(self.OptionsExpertInternal) self.hLabel = QtWidgets.QLabel(self.OptionsCustom)
font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(12)
font.setBold(False)
font.setWeight(50)
self.hLabel.setFont(font)
self.hLabel.setObjectName("hLabel") self.hLabel.setObjectName("hLabel")
self.gridLayout_2.addWidget(self.hLabel, 0, 2, 1, 1) self.horizontalLayout_2.addWidget(self.hLabel)
self.customHeight = QtWidgets.QLineEdit(self.OptionsExpertInternal) self.customHeight = QtWidgets.QLineEdit(self.OptionsCustom)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0) sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0) sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.customHeight.sizePolicy().hasHeightForWidth()) sizePolicy.setHeightForWidth(self.customHeight.sizePolicy().hasHeightForWidth())
self.customHeight.setSizePolicy(sizePolicy) self.customHeight.setSizePolicy(sizePolicy)
self.customHeight.setMaximumSize(QtCore.QSize(45, 16777215))
font = QtGui.QFont()
font.setFamily("Lucida Grande")
font.setPointSize(12)
self.customHeight.setFont(font)
self.customHeight.setFocusPolicy(QtCore.Qt.ClickFocus) self.customHeight.setFocusPolicy(QtCore.Qt.ClickFocus)
self.customHeight.setAcceptDrops(False) self.customHeight.setAcceptDrops(False)
self.customHeight.setMaxLength(4) self.customHeight.setMaxLength(4)
self.customHeight.setObjectName("customHeight") self.customHeight.setObjectName("customHeight")
self.gridLayout_2.addWidget(self.customHeight, 0, 3, 1, 1) self.horizontalLayout_2.addWidget(self.customHeight)
self.EditorButton = QtWidgets.QPushButton(self.Form) self.EditorButton = QtWidgets.QPushButton(self.Form)
self.EditorButton.setGeometry(QtCore.QRect(160, 10, 101, 41)) self.EditorButton.setGeometry(QtCore.QRect(4, 10, 210, 41))
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("Lucida Grande") font.setPointSize(11)
font.setPointSize(12)
self.EditorButton.setFont(font) self.EditorButton.setFont(font)
self.EditorButton.setFocusPolicy(QtCore.Qt.NoFocus) self.EditorButton.setFocusPolicy(QtCore.Qt.NoFocus)
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.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) KCC.setCentralWidget(self.Form)
self.statusBar = QtWidgets.QStatusBar(KCC) self.statusBar = QtWidgets.QStatusBar(KCC)
font = QtGui.QFont() font = QtGui.QFont()
font.setFamily("Aharoni") font.setPointSize(11)
font.setPointSize(8)
self.statusBar.setFont(font) self.statusBar.setFont(font)
self.statusBar.setSizeGripEnabled(False) self.statusBar.setSizeGripEnabled(False)
self.statusBar.setObjectName("statusBar") self.statusBar.setObjectName("statusBar")
@@ -347,7 +257,7 @@ class Ui_KCC(object):
self.ActionBasic.setCheckable(True) self.ActionBasic.setCheckable(True)
self.ActionBasic.setChecked(False) self.ActionBasic.setChecked(False)
font = QtGui.QFont() font = QtGui.QFont()
font.setPointSize(9) font.setPointSize(11)
self.ActionBasic.setFont(font) self.ActionBasic.setFont(font)
self.ActionBasic.setObjectName("ActionBasic") self.ActionBasic.setObjectName("ActionBasic")
self.ActionAdvanced = QtWidgets.QAction(KCC) self.ActionAdvanced = QtWidgets.QAction(KCC)
@@ -363,18 +273,6 @@ class Ui_KCC(object):
def retranslateUi(self, KCC): def retranslateUi(self, KCC):
_translate = QtCore.QCoreApplication.translate _translate = QtCore.QCoreApplication.translate
KCC.setWindowTitle(_translate("KCC", "Kindle Comic Converter")) KCC.setWindowTitle(_translate("KCC", "Kindle Comic Converter"))
self.ProcessingBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Disable image optimizations.<br/><span style=\" font-weight:600;\">Input images must be already resized.</span></p></body></html>"))
self.ProcessingBox.setText(_translate("KCC", "No optimisation"))
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 WebToons.</p></body></html>"))
self.WebtoonBox.setText(_translate("KCC", "Webtoon 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.NoDitheringBox.setText(_translate("KCC", "PNG output"))
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.NoRotateBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Disable page splitting and rotation.</p></body></html>"))
self.NoRotateBox.setText(_translate("KCC", "No split/rotate"))
self.DeviceBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Target device.</p></body></html>")) 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.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.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Shift+Click to select the output directory.</p></body></html>"))
@@ -386,15 +284,23 @@ class Ui_KCC(object):
self.ClearButton.setText(_translate("KCC", "Clear list")) 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.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.MangaBox.setText(_translate("KCC", "Manga mode"))
self.QualityBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Quality of Panel View/zoom. Highly impact size of output file.<br/><span style=\" font-weight:600;\">This option control only quality of magnification!</span></p></body></html>")) 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.QualityBox.setText(_translate("KCC", "High/Ultra quality")) self.RotateBox.setText(_translate("KCC", "Spread splitter"))
self.RotateBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Disable splitting of two-page spreads.<br/>They will be rotated instead.</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.RotateBox.setText(_translate("KCC", "Horizontal mode")) self.QualityBox.setText(_translate("KCC", "HQ zoom"))
self.BasicModeButton.setText(_translate("KCC", "Basic")) self.GammaBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Disable automatic gamma correction.</p></body></html>"))
self.AdvModeButton.setText(_translate("KCC", "Advanced")) self.GammaBox.setText(_translate("KCC", "Custom gamma"))
self.GammaLabel.setText(_translate("KCC", "Gamma: Auto")) 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.ColorBox.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Don\'t convert images to grayscale.</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.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.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.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.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>"))
@@ -404,6 +310,7 @@ class Ui_KCC(object):
self.customHeight.setToolTip(_translate("KCC", "<html><head/><body><p style=\'white-space:pre\'>Resolution of target device.</p></body></html>")) 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.customHeight.setInputMask(_translate("KCC", "0000"))
self.EditorButton.setText(_translate("KCC", "Editor")) self.EditorButton.setText(_translate("KCC", "Editor"))
self.WikiButton.setText(_translate("KCC", "Wiki"))
self.ActionBasic.setText(_translate("KCC", "Basic")) self.ActionBasic.setText(_translate("KCC", "Basic"))
self.ActionAdvanced.setText(_translate("KCC", "Advanced")) self.ActionAdvanced.setText(_translate("KCC", "Advanced"))

View File

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

View File

@@ -22,7 +22,10 @@ from zipfile import is_zipfile, ZipFile
from subprocess import STDOUT, PIPE from subprocess import STDOUT, PIPE
from psutil import Popen from psutil import Popen
from shutil import move, copy from shutil import move, copy
from scandir import walk try:
from scandir import walk
except ImportError:
walk = os.walk
from . import rarfile from . import rarfile
from .shared import check7ZFile as is_7zfile, saferReplace from .shared import check7ZFile as is_7zfile, saferReplace
@@ -71,7 +74,7 @@ class CBxArchive:
copy(self.origFileName, os.path.join(os.path.dirname(self.origFileName), 'TMP_KCC_TMP')) copy(self.origFileName, os.path.join(os.path.dirname(self.origFileName), 'TMP_KCC_TMP'))
self.origFileName = os.path.join(os.path.dirname(self.origFileName), 'TMP_KCC_TMP') self.origFileName = os.path.join(os.path.dirname(self.origFileName), 'TMP_KCC_TMP')
output = Popen('7za x "' + self.origFileName + '" -xr!__MACOSX -xr!.DS_Store -xr!thumbs.db -xr!Thumbs.db -o"' + output = Popen('7za x "' + self.origFileName + '" -xr!__MACOSX -xr!.DS_Store -xr!thumbs.db -xr!Thumbs.db -o"' +
targetdir + '"', stdout=PIPE, stderr=STDOUT, shell=True) targetdir + '"', stdout=PIPE, stderr=STDOUT, stdin=PIPE, shell=True)
extracted = False extracted = False
for line in output.stdout: for line in output.stdout:
if b"Everything is Ok" in line: if b"Everything is Ok" in line:

File diff suppressed because it is too large Load Diff

View File

@@ -24,12 +24,15 @@ from shutil import rmtree, copytree, move
from optparse import OptionParser, OptionGroup from optparse import OptionParser, OptionGroup
from multiprocessing import Pool from multiprocessing import Pool
from PIL import Image, ImageStat, ImageOps from PIL import Image, ImageStat, ImageOps
from scandir import walk
from .shared import getImageFileName, walkLevel, walkSort from .shared import getImageFileName, walkLevel, walkSort
try: try:
from PyQt5 import QtCore from PyQt5 import QtCore
except ImportError: except ImportError:
QtCore = None QtCore = None
try:
from scandir import walk
except ImportError:
walk = os.walk
def mergeDirectoryTick(output): def mergeDirectoryTick(output):
@@ -229,7 +232,7 @@ def main(argv=None, qtGUI=None):
GUI = None GUI = None
if len(args) != 1: if len(args) != 1:
parser.print_help() parser.print_help()
return return 1
if options.height > 0: if options.height > 0:
options.sourceDir = args[0] options.sourceDir = args[0]
options.targetDir = args[0] + "-Splitted" options.targetDir = args[0] + "-Splitted"
@@ -241,7 +244,7 @@ def main(argv=None, qtGUI=None):
splitWorkerOutput = [] splitWorkerOutput = []
splitWorkerPool = Pool() splitWorkerPool = Pool()
if options.merge: if options.merge:
print("\nMerging images...") print("Merging images...")
directoryNumer = 1 directoryNumer = 1
mergeWork = [] mergeWork = []
mergeWorkerOutput = [] mergeWorkerOutput = []
@@ -265,7 +268,7 @@ def main(argv=None, qtGUI=None):
if len(mergeWorkerOutput) > 0: if len(mergeWorkerOutput) > 0:
rmtree(options.targetDir, True) rmtree(options.targetDir, True)
raise RuntimeError("One of workers crashed. Cause: " + mergeWorkerOutput[0]) raise RuntimeError("One of workers crashed. Cause: " + mergeWorkerOutput[0])
print("\nSplitting images...") print("Splitting images...")
for root, dirs, files in walk(options.targetDir, False): for root, dirs, files in walk(options.targetDir, False):
for name in files: for name in files:
if getImageFileName(name) is not None: if getImageFileName(name) is not None:

View File

@@ -20,7 +20,6 @@ import os
from io import BytesIO from io import BytesIO
from urllib.request import Request, urlopen from urllib.request import Request, urlopen
from urllib.parse import quote from urllib.parse import quote
from functools import reduce
from PIL import Image, ImageOps, ImageStat, ImageChops from PIL import Image, ImageOps, ImageStat, ImageChops
from .shared import md5Checksum from .shared import md5Checksum
from . import __version__ from . import __version__
@@ -94,75 +93,169 @@ class ProfileData:
} }
class ComicPage: class ComicPageParser:
def __init__(self, source, options, original=None): def __init__(self, source, options):
try:
self.profile_label, self.size, self.palette, self.gamma, self.panelviewsize = options.profileData
except KeyError:
raise RuntimeError('Unexpected output device %s' % options.profileData)
self.origFileName = source
self.filename = os.path.basename(self.origFileName)
self.image = Image.open(source)
self.image = self.image.convert('RGB')
self.opt = options self.opt = options
if original: self.source = source
self.second = True self.size = self.opt.profileData[1]
self.rotated = original.rotated self.payload = []
self.border = original.border self.image = Image.open(os.path.join(source[0], source[1])).convert('RGB')
self.noHPV = original.noHPV self.color = self.colorCheck()
self.noVPV = original.noVPV self.fill = self.fillCheck()
self.noPV = original.noPV self.splitCheck()
self.noHQ = original.noHQ if self.opt.hqmode:
self.fill = original.fill self.sizeCheck()
self.color = original.color
if self.rotated:
self.image = self.image.rotate(90, Image.BICUBIC, True)
self.opt.quality = 0
else:
self.second = False
self.rotated = None
self.border = None
self.noHPV = None
self.noVPV = None
self.noPV = None
self.fill = None
self.noHQ = False
if options.webtoon:
self.color = True
else:
self.color = self.isImageColor()
def saveToDir(self, targetdir): def getImageHistogram(self, image):
histogram = image.histogram()
if histogram[0] == 0:
return -1
elif histogram[255] == 0:
return 1
else:
return 0
def splitCheck(self):
width, height = self.image.size
dstwidth, dstheight = self.size
# Only split if origin is not oriented the same as target
if (width > height) != (dstwidth > dstheight) and not self.opt.webtoon:
if self.opt.splitter != 1:
if width > height:
# Source is landscape, so split by the width
leftbox = (0, 0, int(width / 2), height)
rightbox = (int(width / 2), 0, width, height)
else:
# Source is portrait and target is landscape, so split by the height
leftbox = (0, 0, width, int(height / 2))
rightbox = (0, int(height / 2), width, height)
if self.opt.righttoleft:
pageone = self.image.crop(rightbox)
pagetwo = self.image.crop(leftbox)
else:
pageone = self.image.crop(leftbox)
pagetwo = self.image.crop(rightbox)
self.payload.append(['S1', self.source, pageone, self.color, self.fill])
self.payload.append(['S2', self.source, pagetwo, self.color, self.fill])
if self.opt.splitter > 0:
self.payload.append(['R', self.source, self.image.rotate(90, Image.BICUBIC, True),
self.color, self.fill])
else:
self.payload.append(['N', self.source, self.image, self.color, self.fill])
def colorCheck(self):
if self.opt.webtoon:
return True
else:
img = self.image.copy()
bands = img.getbands()
if bands == ('R', 'G', 'B') or bands == ('R', 'G', 'B', 'A'):
thumb = img.resize((40, 40))
SSE, bias = 0, [0, 0, 0]
bias = ImageStat.Stat(thumb).mean[:3]
bias = [b - sum(bias) / 3 for b in bias]
for pixel in thumb.getdata():
mu = sum(pixel) / 3
SSE += sum((pixel[i] - mu - bias[i]) * (pixel[i] - mu - bias[i]) for i in [0, 1, 2])
MSE = float(SSE) / (40 * 40)
if MSE > 22:
return True
else:
return False
else:
return False
def fillCheck(self):
if self.opt.bordersColor:
return self.opt.bordersColor
else:
bw = self.image.convert('L').point(lambda x: 0 if x < 128 else 255, '1')
imageBoxA = bw.getbbox()
imageBoxB = ImageChops.invert(bw).getbbox()
if imageBoxA is None or imageBoxB is None:
surfaceB, surfaceW = 0, 0
diff = 0
else:
surfaceB = (imageBoxA[2] - imageBoxA[0]) * (imageBoxA[3] - imageBoxA[1])
surfaceW = (imageBoxB[2] - imageBoxB[0]) * (imageBoxB[3] - imageBoxB[1])
diff = ((max(surfaceB, surfaceW) - min(surfaceB, surfaceW)) / min(surfaceB, surfaceW)) * 100
if diff > 0.5:
if surfaceW < surfaceB:
return 'white'
elif surfaceW > surfaceB:
return 'black'
else:
fill = 0
startY = 0
while startY < bw.size[1]:
if startY + 5 > bw.size[1]:
startY = bw.size[1] - 5
fill += self.getImageHistogram(bw.crop((0, startY, bw.size[0], startY + 5)))
startY += 5
startX = 0
while startX < bw.size[0]:
if startX + 5 > bw.size[0]:
startX = bw.size[0] - 5
fill += self.getImageHistogram(bw.crop((startX, 0, startX + 5, bw.size[1])))
startX += 5
if fill > 0:
return 'black'
else:
return 'white'
def sizeCheck(self):
additionalPayload = []
width, height = self.image.size
dstwidth, dstheight = self.size
for work in self.payload:
if width > dstwidth and height > dstheight:
additionalPayload.append([work[0] + '+', work[1], work[2].copy(), work[3], work[4]])
self.payload = self.payload + additionalPayload
class ComicPage:
def __init__(self, mode, path, image, color, fill, options):
self.opt = options
_, self.size, self.palette, self.gamma, self.panelviewsize = self.opt.profileData
self.image = image
self.color = color
self.fill = fill
self.rotated = False
self.orgPath = os.path.join(path[0], path[1])
if '+' in mode:
self.hqMode = True
else:
self.hqMode = False
if 'N' in mode:
self.targetPath = os.path.join(path[0], os.path.splitext(path[1])[0]) + '-KCC'
elif 'R' in mode:
self.targetPath = os.path.join(path[0], os.path.splitext(path[1])[0]) + '-KCC-A'
self.rotated = True
elif 'S1' in mode:
self.targetPath = os.path.join(path[0], os.path.splitext(path[1])[0]) + '-KCC-B'
elif 'S2' in mode:
self.targetPath = os.path.join(path[0], os.path.splitext(path[1])[0]) + '-KCC-C'
def saveToDir(self):
try: try:
flags = [] flags = []
filename = os.path.join(targetdir, os.path.splitext(self.filename)[0]) + '-KCC'
if not self.opt.forcecolor and not self.opt.forcepng: if not self.opt.forcecolor and not self.opt.forcepng:
self.image = self.image.convert('L') self.image = self.image.convert('L')
if self.rotated: if self.rotated:
flags.append('Rotated') flags.append('Rotated')
if self.noPV:
flags.append('NoPanelView')
else:
if self.noHPV:
flags.append('NoHorizontalPanelView')
if self.noVPV:
flags.append('NoVerticalPanelView')
if self.border:
flags.append('Margins-' + str(self.border[0]) + '-' + str(self.border[1]) + '-' +
str(self.border[2]) + '-' + str(self.border[3]))
if self.fill != 'white': if self.fill != 'white':
flags.append('BlackFill') flags.append('BlackFill')
if self.opt.quality == 2: if self.hqMode:
filename += '-HQ' self.targetPath += '-HQ'
if self.opt.forcepng: if self.opt.forcepng:
filename += '.png' self.targetPath += '.png'
self.image.save(filename, 'PNG', optimize=1) self.image.save(self.targetPath, 'PNG', optimize=1)
else: else:
filename += '.jpg' self.targetPath += '.jpg'
self.image.save(filename, 'JPEG', optimize=1, quality=80) self.image.save(self.targetPath, 'JPEG', optimize=1, quality=80)
return [md5Checksum(filename), flags] return [md5Checksum(self.targetPath), flags, self.orgPath]
except IOError as e: except IOError:
raise RuntimeError('Cannot write image in directory %s: %s' % (targetdir, e)) raise RuntimeError('Cannot save image.')
def autocontrastImage(self): def autocontrastImage(self):
gamma = self.opt.gamma gamma = self.opt.gamma
@@ -186,127 +279,42 @@ class ComicPage:
# Quantize is deprecated but new function call it internally anyway... # Quantize is deprecated but new function call it internally anyway...
self.image = self.image.quantize(palette=palImg) self.image = self.image.quantize(palette=palImg)
def calculateBorder(self):
if self.noPV:
self.border = [0.0, 0.0, 0.0, 0.0]
return
if self.fill == 'white':
border = ImageChops.invert(self.image).getbbox()
else:
border = self.image.getbbox()
if self.opt.quality == 2:
multiplier = 1.0
else:
multiplier = 1.5
if border is not None:
self.border = [round(float(border[0]) / float(self.image.size[0]) * 150, 3),
round(float(border[1]) / float(self.image.size[1]) * 150, 3),
round(float(self.image.size[0] - border[2]) / float(self.image.size[0]) * 150, 3),
round(float(self.image.size[1] - border[3]) / float(self.image.size[1]) * 150, 3)]
if int((border[2] - border[0]) * multiplier) < self.size[0] + 10:
self.noHPV = True
if int((border[3] - border[1]) * multiplier) < self.size[1] + 10:
self.noVPV = True
else:
self.border = [0.0, 0.0, 0.0, 0.0]
self.noHPV = True
self.noVPV = True
def resizeImage(self): def resizeImage(self):
if self.opt.bordersColor: if self.hqMode:
fill = self.opt.bordersColor
else:
fill = self.fill
# Set target size
if self.opt.quality == 0:
size = (self.size[0], self.size[1])
elif self.opt.quality == 1 and not self.opt.stretch and not self.opt.upscale and self.image.size[0] <=\
self.size[0] and self.image.size[1] <= self.size[1]:
size = (self.size[0], self.size[1])
elif self.opt.quality == 1:
# Forcing upscale to make sure that margins will be not too big
if not self.opt.stretch:
self.opt.upscale = True
size = (self.panelviewsize[0], self.panelviewsize[1]) size = (self.panelviewsize[0], self.panelviewsize[1])
elif self.opt.quality == 2 and not self.opt.stretch and not self.opt.upscale and self.image.size[0] <=\ if self.image.size[0] > size[0] or self.image.size[1] > size[1]:
self.size[0] and self.image.size[1] <= self.size[1]: self.image.thumbnail(size, Image.LANCZOS)
# HQ version will not be needed
self.noHQ = True
return
else: else:
size = (self.panelviewsize[0], self.panelviewsize[1]) size = (self.size[0], self.size[1])
# If stretching is on - Resize without other considerations
if self.opt.stretch:
if self.image.size[0] <= size[0] and self.image.size[1] <= size[1]: if self.image.size[0] <= size[0] and self.image.size[1] <= size[1]:
method = Image.BICUBIC method = Image.BICUBIC
else: else:
method = Image.LANCZOS method = Image.LANCZOS
self.image = self.image.resize(size, method) if self.opt.stretch:
return self.image = self.image.resize(size, method)
# If image is smaller than target resolution and upscale is off - Just expand it by adding margins elif self.image.size[0] <= size[0] and self.image.size[1] <= size[1] and not self.opt.upscale:
if self.image.size[0] <= size[0] and self.image.size[1] <= size[1] and not self.opt.upscale: if self.opt.format == 'CBZ':
borderw = int((size[0] - self.image.size[0]) / 2) borderw = int((size[0] - self.image.size[0]) / 2)
borderh = int((size[1] - self.image.size[1]) / 2) borderh = int((size[1] - self.image.size[1]) / 2)
# PV is disabled when source image is smaller than device screen and upscale is off self.image = ImageOps.expand(self.image, border=(borderw, borderh), fill=self.fill)
if self.image.size[0] <= self.size[0] and self.image.size[1] <= self.size[1]: if self.image.size[0] != size[0] or self.image.size[1] != size[1]:
self.noPV = True self.image = ImageOps.fit(self.image, size, method=Image.BICUBIC, centering=(0.5, 0.5))
self.image = ImageOps.expand(self.image, border=(borderw, borderh), fill=fill)
# Border can't be float so sometimes image might be 1px too small/large
if self.image.size[0] != size[0] or self.image.size[1] != size[1]:
self.image = ImageOps.fit(self.image, size, method=Image.BICUBIC, centering=(0.5, 0.5))
return
# Otherwise - Upscale/Downscale
ratioDev = float(size[0]) / float(size[1])
if (float(self.image.size[0]) / float(self.image.size[1])) < ratioDev:
diff = int(self.image.size[1] * ratioDev) - self.image.size[0]
self.image = ImageOps.expand(self.image, border=(int(diff / 2), 0), fill=fill)
elif (float(self.image.size[0]) / float(self.image.size[1])) > ratioDev:
diff = int(self.image.size[0] / ratioDev) - self.image.size[1]
self.image = ImageOps.expand(self.image, border=(0, int(diff / 2)), fill=fill)
if self.image.size[0] <= size[0] and self.image.size[1] <= size[1]:
method = Image.BICUBIC
else:
method = Image.LANCZOS
self.image = ImageOps.fit(self.image, size, method=method, centering=(0.5, 0.5))
return
def splitPage(self, targetdir):
width, height = self.image.size
dstwidth, dstheight = self.size
# Only split if origin is not oriented the same as target
if (width > height) != (dstwidth > dstheight):
if self.opt.rotate:
self.image = self.image.rotate(90, Image.BICUBIC, True)
self.rotated = True
return None
else: else:
self.rotated = False if self.opt.format == 'CBZ':
if width > height: ratioDev = float(size[0]) / float(size[1])
# Source is landscape, so split by the width if (float(self.image.size[0]) / float(self.image.size[1])) < ratioDev:
leftbox = (0, 0, int(width / 2), height) diff = int(self.image.size[1] * ratioDev) - self.image.size[0]
rightbox = (int(width / 2), 0, width, height) self.image = ImageOps.expand(self.image, border=(int(diff / 2), 0), fill=self.fill)
elif (float(self.image.size[0]) / float(self.image.size[1])) > ratioDev:
diff = int(self.image.size[0] / ratioDev) - self.image.size[1]
self.image = ImageOps.expand(self.image, border=(0, int(diff / 2)), fill=self.fill)
self.image = ImageOps.fit(self.image, size, method=method, centering=(0.5, 0.5))
else: else:
# Source is portrait and target is landscape, so split by the height hpercent = size[1] / float(self.image.size[1])
leftbox = (0, 0, width, int(height / 2)) wsize = int((float(self.image.size[0]) * float(hpercent)))
rightbox = (0, int(height / 2), width, height) self.image = self.image.resize((wsize, size[1]), method)
filename = os.path.splitext(self.filename)[0] if self.image.size[0] > size[0] or self.image.size[1] > size[1]:
fileone = targetdir + '/' + filename + '-AAA.png' self.image.thumbnail(size, Image.LANCZOS)
filetwo = targetdir + '/' + filename + '-BBB.png'
try:
if self.opt.righttoleft:
pageone = self.image.crop(rightbox)
pagetwo = self.image.crop(leftbox)
else:
pageone = self.image.crop(leftbox)
pagetwo = self.image.crop(rightbox)
pageone.save(fileone, 'PNG', optimize=1)
pagetwo.save(filetwo, 'PNG', optimize=1)
except IOError as e:
raise RuntimeError('Cannot write image in directory %s: %s' % (targetdir, e))
return fileone, filetwo
else:
self.rotated = False
return None
def cutPageNumber(self): def cutPageNumber(self):
if ImageChops.invert(self.image).getbbox() is not None: if ImageChops.invert(self.image).getbbox() is not None:
@@ -397,71 +405,6 @@ class ComicPage:
diff -= delta diff -= delta
self.image = self.image.crop((0, 0, widthImg - diff, heightImg)) self.image = self.image.crop((0, 0, widthImg - diff, heightImg))
def getImageHistogram(self, image):
histogram = image.histogram()
if histogram[0] == 0:
return -1
elif histogram[255] == 0:
return 1
else:
return 0
def getImageFill(self):
bw = self.image.convert('L').point(lambda x: 0 if x < 128 else 255, '1')
imageBoxA = bw.getbbox()
imageBoxB = ImageChops.invert(bw).getbbox()
if imageBoxA is None or imageBoxB is None:
surfaceB, surfaceW = 0, 0
diff = 0
else:
surfaceB = (imageBoxA[2] - imageBoxA[0]) * (imageBoxA[3] - imageBoxA[1])
surfaceW = (imageBoxB[2] - imageBoxB[0]) * (imageBoxB[3] - imageBoxB[1])
diff = ((max(surfaceB, surfaceW) - min(surfaceB, surfaceW)) / min(surfaceB, surfaceW)) * 100
if diff > 0.5:
if surfaceW < surfaceB:
self.fill = 'white'
elif surfaceW > surfaceB:
self.fill = 'black'
else:
fill = 0
startY = 0
while startY < bw.size[1]:
if startY + 5 > bw.size[1]:
startY = bw.size[1] - 5
fill += self.getImageHistogram(bw.crop((0, startY, bw.size[0], startY + 5)))
startY += 5
startX = 0
while startX < bw.size[0]:
if startX + 5 > bw.size[0]:
startX = bw.size[0] - 5
fill += self.getImageHistogram(bw.crop((startX, 0, startX + 5, bw.size[1])))
startX += 5
if fill > 0:
self.fill = 'black'
else:
self.fill = 'white'
def isImageColor(self):
img = self.image.copy()
bands = img.getbands()
if bands == ('R', 'G', 'B') or bands == ('R', 'G', 'B', 'A'):
thumb = img.resize((40, 40))
SSE, bias = 0, [0, 0, 0]
bias = ImageStat.Stat(thumb).mean[:3]
bias = [b - sum(bias) / 3 for b in bias]
for pixel in thumb.getdata():
mu = sum(pixel) / 3
SSE += sum((pixel[i] - mu - bias[i]) * (pixel[i] - mu - bias[i]) for i in [0, 1, 2])
MSE = float(SSE) / (40 * 40)
if MSE <= 22:
return False
else:
return True
elif len(bands) == 1:
return False
else:
return False
class Cover: class Cover:
def __init__(self, source, target, opt, tomeNumber): def __init__(self, source, target, opt, tomeNumber):
@@ -510,3 +453,11 @@ class Cover:
self.image.save(self.target, "JPEG", optimize=1, quality=80) self.image.save(self.target, "JPEG", optimize=1, quality=80)
except IOError: except IOError:
raise RuntimeError('Failed to process downloaded cover.') raise RuntimeError('Failed to process downloaded cover.')
def saveToKindle(self, kindle, asin):
self.image = self.image.resize((300, 470), Image.ANTIALIAS).convert('L')
try:
self.image.save(os.path.join(kindle.path.split('documents')[0], 'system', 'thumbnails',
'thumbnail_' + asin + '_EBOK_portrait.jpg'), 'JPEG')
except IOError:
raise RuntimeError('Failed to upload cover.')

42
kcc/kindle.py Normal file
View File

@@ -0,0 +1,42 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2013-2015 Pawel Jastrzebski <pawelj@iosphe.re>
#
# Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the
# above copyright notice and this permission notice appear in all
# copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
# WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
# AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
# DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
# OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
import os.path
import psutil
class Kindle:
def __init__(self):
self.path = self.findDevice()
if self.path:
self.coverSupport = self.checkThumbnails()
else:
self.coverSupport = False
def findDevice(self):
for drive in psutil.disk_partitions(False):
if 'removable' in drive[3] or 'vfat' in drive[2] or 'msdos' in drive[2]:
if os.path.isdir(os.path.join(drive[1], 'system')) and \
os.path.isdir(os.path.join(drive[1], 'documents')):
return drive[1]
return False
def checkThumbnails(self):
if os.path.isdir(os.path.join(self.path, 'system', 'thumbnails')):
return True
return False

View File

@@ -68,19 +68,19 @@ class MetadataParser:
workdir = mkdtemp('', 'KCC-') workdir = mkdtemp('', 'KCC-')
tmpXML = os.path.join(workdir, 'ComicInfo.xml') tmpXML = os.path.join(workdir, 'ComicInfo.xml')
output = Popen('7za e "' + self.source + '" ComicInfo.xml -o"' + workdir + '"', output = Popen('7za e "' + self.source + '" ComicInfo.xml -o"' + workdir + '"',
stdout=PIPE, stderr=STDOUT, shell=True) stdout=PIPE, stderr=STDOUT, stdin=PIPE, shell=True)
extracted = False extracted = False
for line in output.stdout: for line in output.stdout:
if b"Everything is Ok" in line or b"No files to process" in line: if b"Everything is Ok" in line or b"No files to process" in line:
extracted = True extracted = True
if not extracted: if not extracted:
rmtree(workdir) rmtree(workdir)
raise OSError raise OSError('Failed to extract 7ZIP file.')
if os.path.isfile(tmpXML): if os.path.isfile(tmpXML):
self.rawdata = parse(tmpXML) self.rawdata = parse(tmpXML)
rmtree(workdir) rmtree(workdir)
else: else:
raise OSError raise OSError('Failed to detect archive format.')
if self.rawdata: if self.rawdata:
self.parseXML() self.parseXML()
@@ -161,12 +161,13 @@ class MetadataParser:
elif rarfile.is_rarfile(self.source): elif rarfile.is_rarfile(self.source):
raise NotImplementedError raise NotImplementedError
elif is_7zfile(self.source): elif is_7zfile(self.source):
output = Popen('7za a "' + self.source + '" "' + tmpXML + '"', stdout=PIPE, stderr=STDOUT, shell=True) output = Popen('7za a "' + self.source + '" "' + tmpXML + '"',
stdout=PIPE, stderr=STDOUT, stdin=PIPE, shell=True)
extracted = False extracted = False
for line in output.stdout: for line in output.stdout:
if b"Everything is Ok" in line: if b"Everything is Ok" in line:
extracted = True extracted = True
if not extracted: if not extracted:
rmtree(workdir) rmtree(workdir)
raise OSError raise OSError('Failed to modify 7ZIP file.')
rmtree(workdir) rmtree(workdir)

View File

@@ -17,11 +17,12 @@
# #
import os import os
from sys import version_info
from hashlib import md5 from hashlib import md5
from html.parser import HTMLParser from html.parser import HTMLParser
from distutils.version import StrictVersion from distutils.version import StrictVersion
from time import sleep from time import sleep
from shutil import rmtree, move from shutil import rmtree, copy
from tempfile import mkdtemp from tempfile import mkdtemp
from zipfile import ZipFile, ZIP_DEFLATED from zipfile import ZipFile, ZIP_DEFLATED
from re import split from re import split
@@ -29,7 +30,7 @@ from traceback import format_tb
try: try:
from scandir import walk from scandir import walk
except ImportError: except ImportError:
walk = None walk = os.walk
class HTMLStripper(HTMLParser): class HTMLStripper(HTMLParser):
@@ -96,11 +97,23 @@ def check7ZFile(filePath):
def saferReplace(old, new): def saferReplace(old, new):
for x in range(5): for x in range(50):
try: try:
os.replace(old, new) os.replace(old, new)
except PermissionError: except PermissionError:
sleep(5) sleep(0.1)
else:
break
else:
raise PermissionError
def saferRemove(target):
for x in range(50):
try:
os.remove(target)
except PermissionError:
sleep(0.1)
else: else:
break break
else: else:
@@ -116,9 +129,17 @@ 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))
move(tempname, zipfname) for x in range(50):
try:
copy(tempname, zipfname)
except PermissionError:
sleep(0.1)
else:
break
else:
raise PermissionError
finally: finally:
rmtree(tempdir) rmtree(tempdir, True)
def sanitizeTrace(traceback): def sanitizeTrace(traceback):
@@ -133,35 +154,36 @@ 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.4.0') > StrictVersion(qtVersion()): if StrictVersion('5.2.1') > StrictVersion(qtVersion()):
missing.append('PyQt 5.4.0+') missing.append('PyQt 5.2.1+')
except ImportError: except ImportError:
missing.append('PyQt 5.4.0+') missing.append('PyQt 5.2.1+')
if level > 1: if level > 1:
try: try:
from psutil import __version__ as psutilVersion from psutil import __version__ as psutilVersion
if StrictVersion('3.0.0') > StrictVersion(psutilVersion): if StrictVersion('3.2.2') > StrictVersion(psutilVersion):
missing.append('psutil 3.0.0+') missing.append('psutil 3.2.2+')
except ImportError: except ImportError:
missing.append('psutil 3.0.0+') missing.append('psutil 3.2.2+')
try: try:
from slugify import __version__ as slugifyVersion from slugify import __version__ as slugifyVersion
if StrictVersion('1.1.3') > StrictVersion(slugifyVersion): if StrictVersion('1.1.4') > StrictVersion(slugifyVersion):
missing.append('python-slugify 1.1.3+') missing.append('python-slugify 1.1.4+')
except ImportError: except ImportError:
missing.append('python-slugify 1.1.3+') missing.append('python-slugify 1.1.4+')
try: try:
from PIL import PILLOW_VERSION as pillowVersion from PIL import PILLOW_VERSION as pillowVersion
if StrictVersion('2.8.2') > StrictVersion(pillowVersion): if StrictVersion('3.0.0') > StrictVersion(pillowVersion):
missing.append('Pillow 2.8.2+') missing.append('Pillow 3.0.0+')
except ImportError: except ImportError:
missing.append('Pillow 2.8.2+') missing.append('Pillow 3.0.0+')
try: if version_info[1] < 5:
from scandir import __version__ as scandirVersion try:
if StrictVersion('1.1') > StrictVersion(scandirVersion): from scandir import __version__ as scandirVersion
if StrictVersion('1.1') > StrictVersion(scandirVersion):
missing.append('scandir 1.1+')
except ImportError:
missing.append('scandir 1.1+') missing.append('scandir 1.1+')
except ImportError:
missing.append('scandir 1.1+')
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

@@ -0,0 +1,4 @@
kindlecomicconverter: statically-linked-binary 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: file-missing-in-md5sums usr/share/doc/kindlecomicconverter/changelog.Debian.gz

View File

@@ -0,0 +1,11 @@
[Desktop Entry]
Type=Application
Version=1.0
Name=Kindle Comic Converter
GenericName=Kindle Comic Converter
Comment=Comic and Manga converter for e-book readers
Icon=/usr/share/kindlecomicconverter/comic2ebook.png
Exec=/usr/bin/kcc
Terminal=false
Categories=Graphics;
MimeType=application/zip;application/x-rar;application/x-7z-compressed;

47
other/osx/Info.plist Normal file
View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>Kindle Comic Converter</string>
<key>CFBundleExecutable</key>
<string>MacOS/Kindle Comic Converter</string>
<key>CFBundleGetInfoString</key>
<string>KindleComicConverter 5.0, written 2012-2015 by Ciro Mattia Gonano and Pawel Jastrzebski</string>
<key>CFBundleIconFile</key>
<string>comic2ebook.icns</string>
<key>CFBundleIdentifier</key>
<string>com.kindlecomicconverter.KindleComicConverter</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Kindle Comic Converter</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>5.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>5.0.0</string>
<key>LSEnvironment</key>
<dict>
<key>PATH</key>
<string>./../Resources:/usr/local/bin:/usr/bin:/bin</string>
</dict>
<key>LSHasLocalizedDisplayName</key>
<false/>
<key>LSMinimumSystemVersion</key>
<string>10.9.0</string>
<key>NSAppleScriptEnabled</key>
<false/>
<key>NSHumanReadableCopyright</key>
<string>ISC License (ISCL)</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>

View File

@@ -1,3 +0,0 @@
; Qt Configuration file
[Paths]
Plugins = PlugIns

241
setup.py
View File

@@ -1,161 +1,136 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
""" """
pip/py2exe/py2app build script for KCC. pip/pyinstaller build script for KCC.
Usage (Windows): Usage (Windows):
py -3.4 setup.py py2exe py -3 setup.py build_binary
Usage (Linux): Usage (Linux/OS X):
python3 setup.py make_pyz or python3 setup.py install python3 setup.py build_binary or python3 setup.py build_binary --pyz
Usage (Mac OS X):
python3 setup.py py2app
""" """
from sys import platform, version_info, argv
import os
import sys
import shutil
import setuptools
import distutils.cmd
from distutils.command.build import build
from kcc import __version__ from kcc import __version__
if version_info[0] != 3:
print('ERROR: This is Python 3 script!')
exit(1)
NAME = 'KindleComicConverter' NAME = 'KindleComicConverter'
VERSION = __version__
MAIN = 'kcc.py' MAIN = 'kcc.py'
extra_options = {} VERSION = __version__
OPTIONS = {}
if platform == 'darwin':
from setuptools import setup
from os import chmod, makedirs, system
from shutil import copyfile
extra_options = dict(
setup_requires=['py2app'],
app=[MAIN],
options=dict(
py2app=dict(
argv_emulation=True,
iconfile='icons/comic2ebook.icns',
includes=['sip'],
resources=['LICENSE.txt', 'other/qt.conf', 'other/Additional-LICENSE.txt', 'other/unrar', 'other/7za'],
plist=dict(
CFBundleName='Kindle Comic Converter',
CFBundleShortVersionString=VERSION,
CFBundleGetInfoString=NAME + ' ' + VERSION +
', written 2012-2015 by Ciro Mattia Gonano and Pawel Jastrzebski',
CFBundleExecutable=NAME,
CFBundleDocumentTypes=[
dict(
CFBundleTypeExtensions=['cbz', 'cbr', 'cb7', 'zip', 'rar', '7z', 'pdf'],
CFBundleTypeName='Comics',
CFBundleTypeIconFile='comic2ebook.icns',
CFBundleTypeRole='Editor',
)
],
LSMinimumSystemVersion='10.8.0',
LSEnvironment=dict(
PATH='./../Resources:/usr/local/bin:/usr/bin:/bin'
),
NSHumanReadableCopyright='ISC License (ISCL)'
)
)
)
)
elif platform == 'win32':
import py2exe
from platform import architecture
from distutils.core import setup
if architecture()[0] == '64bit':
suffix = '_64'
else:
suffix = ''
additional_files = [('platforms', ['C:\Python34' + suffix +
'\Lib\site-packages\PyQt5\plugins\platforms\qwindows.dll']),
('', ['LICENSE.txt',
'other\\7za.exe',
'other\\UnRAR.exe',
'other\\Additional-LICENSE.txt',
'C:\Python34' + suffix + '\Lib\site-packages\PyQt5\libGLESv2.dll',
'C:\Python34' + suffix + '\Lib\site-packages\PyQt5\libEGL.dll'])]
extra_options = dict(
options={'py2exe': {'bundle_files': 1,
'dist_dir': 'dist' + suffix,
'compressed': True,
'includes': ['sip'],
'excludes': ['tkinter'],
'optimize': 2}},
windows=[{'script': MAIN,
'dest_base': 'KCC',
'version': VERSION,
'copyright': 'Ciro Mattia Gonano, Pawel Jastrzebski © 2012-2015',
'legal_copyright': 'ISC License (ISCL)',
'product_version': VERSION,
'product_name': 'Kindle Comic Converter',
'file_description': 'Kindle Comic Converter',
'icon_resources': [(1, 'icons\comic2ebook.ico')]}],
zipfile=None,
data_files=additional_files)
else:
if len(argv) > 1 and argv[1] == 'make_pyz':
from os import system
script = '''
cp kcc.py __main__.py
zip kcc.zip __main__.py kcc/*.py
echo "#!/usr/bin/env python3" > kcc-bin
cat kcc.zip >> kcc-bin
chmod +x kcc-bin
cp kcc-c2e.py __main__.py class BuildBinaryCommand(distutils.cmd.Command):
zip kcc-c2e.zip __main__.py kcc/*.py description = 'build binary release'
echo "#!/usr/bin/env python3" > kcc-c2e-bin user_options = [
cat kcc-c2e.zip >> kcc-c2e-bin ('pyz', None, 'build PYZ package'),
chmod +x kcc-c2e-bin ]
cp kcc-c2p.py __main__.py def initialize_options(self):
zip kcc-c2p.zip __main__.py kcc/*.py # noinspection PyAttributeOutsideInit
echo "#!/usr/bin/env python3" > kcc-c2p-bin self.pyz = False
cat kcc-c2p.zip >> kcc-c2p-bin
chmod +x kcc-c2p-bin
tar --xform s:^.*/:: --xform s/LICENSE.txt/LICENSE/ --xform s/kcc-bin/kcc/ --xform s/kcc-c2p-bin/kcc-c2p/ \ def finalize_options(self):
--xform s/kcc-c2e-bin/kcc-c2e/ --xform s/comic2ebook/kcc/ -czf KindleComicConverter_linux_'''\ pass
+ VERSION + '''.tar.gz kcc-bin kcc-c2e-bin kcc-c2p-bin LICENSE.txt README.md icons/comic2ebook.png
rm __main__.py kcc.zip kcc-c2e.zip kcc-c2p.zip kcc-bin kcc-c2e-bin kcc-c2p-bin def run(self):
''' if sys.platform == 'darwin':
system("bash -c '%s'" % script) os.system('pyinstaller -y -F -i icons/comic2ebook.icns -n "Kindle Comic Converter" -w -s kcc.py')
exit(0) shutil.copy('other/osx/7za', 'dist/Kindle Comic Converter.app/Contents/Resources')
else: shutil.copy('other/osx/unrar', 'dist/Kindle Comic Converter.app/Contents/Resources')
from setuptools import setup shutil.copy('other/osx/Info.plist', 'dist/Kindle Comic Converter.app/Contents')
from os import makedirs shutil.copy('LICENSE.txt', 'dist/Kindle Comic Converter.app/Contents/Resources')
from shutil import copyfile shutil.copy('other/windows/Additional-LICENSE.txt', 'dist/Kindle Comic Converter.app/Contents/Resources')
makedirs('build/_scripts/', exist_ok=True) os.chmod('dist/Kindle Comic Converter.app/Contents/Resources/unrar', 0o777)
copyfile('kcc.py', 'build/_scripts/kcc') os.chmod('dist/Kindle Comic Converter.app/Contents/Resources/7za', 0o777)
copyfile('kcc-c2e.py', 'build/_scripts/kcc-c2e') if os.path.isfile('setup.sh'):
copyfile('kcc-c2p.py', 'build/_scripts/kcc-c2p') os.system('./setup.sh')
extra_options = dict( os.system('appdmg kcc.json dist/KindleComicConverter_osx_' + VERSION + '.dmg')
scripts=['build/_scripts/kcc', 'build/_scripts/kcc-c2e', 'build/_scripts/kcc-c2p'], exit(0)
elif sys.platform == 'win32':
os.system('pyinstaller -y -F -i icons\comic2ebook.ico -n KCC -w kcc.py')
if os.path.isfile('setup.bat'):
os.system('setup.bat ' + VERSION)
exit(0)
else:
if self.pyz:
script = '''
cp kcc.py __main__.py
zip kcc.zip __main__.py kcc/*.py
echo "#!/usr/bin/env python3" > kcc-bin
cat kcc.zip >> kcc-bin
chmod +x kcc-bin
cp kcc-c2e.py __main__.py
zip kcc-c2e.zip __main__.py kcc/*.py
echo "#!/usr/bin/env python3" > kcc-c2e-bin
cat kcc-c2e.zip >> kcc-c2e-bin
chmod +x kcc-c2e-bin
cp kcc-c2p.py __main__.py
zip kcc-c2p.zip __main__.py kcc/*.py
echo "#!/usr/bin/env python3" > kcc-c2p-bin
cat kcc-c2p.zip >> kcc-c2p-bin
chmod +x kcc-c2p-bin
mkdir dist
tar --xform s:^.*/:: \
--xform s/LICENSE.txt/LICENSE/ \
--xform s/kcc-bin/kcc/ \
--xform s/kcc-c2p-bin/kcc-c2p/ \
--xform s/kcc-c2e-bin/kcc-c2e/ \
--xform s/comic2ebook/kcc/ \
-czf dist/KindleComicConverter_linux_''' + VERSION + '''.tar.gz \
kcc-bin kcc-c2e-bin kcc-c2p-bin LICENSE.txt README.md icons/comic2ebook.png
rm __main__.py kcc.zip kcc-c2e.zip kcc-c2p.zip kcc-bin kcc-c2e-bin kcc-c2p-bin
'''
os.system("bash -c '%s'" % script)
exit(0)
else:
os.system('docker build --no-cache -t kcc . && docker run --rm -v ' + os.getcwd() +
':/out kcc && docker rmi kcc')
exit(0)
class BuildCommand(build):
def run(self):
os.makedirs('build/_scripts/', exist_ok=True)
shutil.copyfile('kcc.py', 'build/_scripts/kcc')
shutil.copyfile('kcc-c2e.py', 'build/_scripts/kcc-c2e')
shutil.copyfile('kcc-c2p.py', 'build/_scripts/kcc-c2p')
# noinspection PyShadowingNames
OPTIONS = dict(
scripts=['build/_scripts/kcc',
'build/_scripts/kcc-c2e',
'build/_scripts/kcc-c2p'],
packages=['kcc'], packages=['kcc'],
install_requires=[ install_requires=[
'Pillow>=2.8.2', 'Pillow>=3.0.0',
'psutil>=3.0.0', 'psutil>=3.2.2',
'python-slugify>=1.1.3', 'python-slugify>=1.1.4',
'scandir>=1.1.0',
], ],
zip_safe=False, zip_safe=False,
) )
if sys.version_info[1] < 5:
OPTIONS['install_requires'].append('scandir>=1.1.0')
build.run(self)
setup(
setuptools.setup(
cmdclass={
'build_binary': BuildBinaryCommand,
'build': BuildCommand,
},
name=NAME, name=NAME,
version=VERSION, version=VERSION,
author='Ciro Mattia Gonano, Pawel Jastrzebski', author='Ciro Mattia Gonano, Pawel Jastrzebski',
author_email='ciromattia@gmail.com, pawelj@iosphe.re', author_email='ciromattia@gmail.com, pawelj@iosphe.re',
description='Comic and manga converter for E-Book readers.', description='Comic and Manga converter for e-book readers.',
license='ISC License (ISCL)', license='ISC License (ISCL)',
keywords='kindle comic mobipocket mobi cbz cbr manga', keywords='kindle comic mobipocket mobi cbz cbr manga',
url='http://github.com/ciromattia/kcc', url='http://github.com/ciromattia/kcc',
**extra_options **OPTIONS
) )
if platform == 'darwin':
makedirs('dist/Kindle Comic Converter.app/Contents/PlugIns/platforms', exist_ok=True)
copyfile('other/libqcocoa.dylib', 'dist/Kindle Comic Converter.app/Contents/PlugIns/platforms/libqcocoa.dylib')
chmod('dist/Kindle Comic Converter.app/Contents/Resources/unrar', 0o777)
chmod('dist/Kindle Comic Converter.app/Contents/Resources/7za', 0o777)
system('appdmg setup.json dist/KindleComicConverter_osx_' + VERSION + '.dmg')