mirror of
https://github.com/ciromattia/kcc
synced 2025-12-12 17:26:23 +00:00
Add CBZ/CBR handling to droplet
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/*.cbz
|
||||
/*.cbr
|
||||
Binary file not shown.
81
LICENSE_unrar.txt
Normal file
81
LICENSE_unrar.txt
Normal file
@@ -0,0 +1,81 @@
|
||||
ACKNOWLEDGMENTS
|
||||
|
||||
* RAR text compression algorithm is based on Dmitry Shkarin PPMII
|
||||
and Dmitry Subbotin carryless rangecoder public domain source code.
|
||||
You may find it in ftp.elf.stuba.sk/pub/pc/pack.
|
||||
|
||||
* RAR encryption includes parts of code from Szymon Stefanek
|
||||
and Brian Gladman AES implementations also as Steve Reid SHA-1 source.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
Copyright (c) 2002, Dr Brian Gladman < >, Worcester, UK.
|
||||
All rights reserved.
|
||||
|
||||
LICENSE TERMS
|
||||
|
||||
The free distribution and use of this software in both source and binary
|
||||
form is allowed (with or without changes) provided that:
|
||||
|
||||
1. distributions of this source code include the above copyright
|
||||
notice, this list of conditions and the following disclaimer;
|
||||
|
||||
2. distributions in binary form include the above copyright
|
||||
notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other associated materials;
|
||||
|
||||
3. the copyright holder's name is not used to endorse products
|
||||
built using this software without specific written permission.
|
||||
|
||||
ALTERNATIVELY, provided that this notice is retained in full, this product
|
||||
may be distributed under the terms of the GNU General Public License (GPL),
|
||||
in which case the provisions of the GPL apply INSTEAD OF those given above.
|
||||
|
||||
DISCLAIMER
|
||||
|
||||
This software is provided 'as is' with no explicit or implied warranties
|
||||
in respect of its properties, including, but not limited to, correctness
|
||||
and/or fitness for purpose.
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Source code of this package also as other cryptographic technology
|
||||
and computing project related links are available on Brian Gladman's
|
||||
web site: http://www.gladman.me.uk
|
||||
|
||||
* RAR uses CRC32 function based on Intel Slicing-by-8 algorithm.
|
||||
Original Intel Slicing-by-8 code is available here:
|
||||
|
||||
http://sourceforge.net/projects/slicing-by-8/
|
||||
|
||||
Original Intel Slicing-by-8 code is licensed under BSD License
|
||||
available at http://www.opensource.org/licenses/bsd-license.html
|
||||
|
||||
Copyright (c) 2004-2006 Intel Corporation.
|
||||
All Rights Reserved
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with
|
||||
the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
* Useful hints provided by Alexander Khoroshev and Bulat Ziganshin allowed
|
||||
to significantly improve RAR compression and speed.
|
||||
40
README.md
40
README.md
@@ -4,26 +4,26 @@
|
||||
|
||||
## REQUIREMENTS
|
||||
- Python (included in MacOS and Linux, follow the [official documentation](http://www.python.org/getit/windows/) to install on Windows)
|
||||
- `kindlegen` in /usr/local/bin/
|
||||
- `kindlegen` in /usr/local/bin/
|
||||
|
||||
### for standalone `comic2ebook.py` script:
|
||||
- [unrar](http://www.rarlab.com/download.htm) and [rarfile.py](http://developer.berlios.de/project/showfiles.php?group_id=5373&release_id=18844) for `calibre2ebook.py` automatic CBR extracting.
|
||||
- `comic2ebook.py` can optionally use the [Python Imaging Library](http://www.pythonware.com/products/pil/) to correctly set the image resolution on OPF file, please refer to official documentation for installing into your system.
|
||||
|
||||
The app and the standalone `comic2ebook.py` script can optionally use the [Python Imaging Library](http://www.pythonware.com/products/pil/) to correctly set the image resolution on OPF file, please refer to official documentation for installing into your system.
|
||||
|
||||
## USAGE
|
||||
Drop a folder over the droplet, after a while you'll get a comic-type .mobi to sideload on your Kindle.
|
||||
The script takes care of calling `comic2ebook.py`, `kindlegen` and `kindlestrip.py`.
|
||||
Drop a folder or a CBZ/CBR file over the droplet, after a while you'll get a comic-type .mobi to sideload on your Kindle.
|
||||
The script takes care of calling `comic2ebook.py`, `kindlegen` and `kindlestrip.py`.
|
||||
|
||||
**WARNING:** at the moment the script does not perform image manipulation. Image optimization and resizing (HD Kindles want 758x1024, non-HD ones 600x800) is up to you.
|
||||
|
||||
## USAGE (standalone `comic2ebook.py`)
|
||||
### standalone `comic2ebook.py` usage:
|
||||
1. Prepare image folder resizing the images to 758x1024 for HD or 600x800 for non-HD readers, in .png or .jpg formats
|
||||
2. Organize the images into the folders (Use leading 0's to avoid file ordering problems). For example,
|
||||
|
||||
> Legs Weaver/
|
||||
> Legs Weaver/51/
|
||||
> Legs Weaver/51/001.png
|
||||
> Legs Weaver/51/002.png
|
||||
> Legs Weaver/52/
|
||||
> Legs Weaver/52/001.png
|
||||
> Legs Weaver/52/002.png
|
||||
> Legs Weaver 51/
|
||||
> Legs Weaver 51/001.png
|
||||
> Legs Weaver 51/002.png
|
||||
> etc...
|
||||
|
||||
3. Launch
|
||||
@@ -37,12 +37,16 @@ The script takes care of calling `comic2ebook.py`, `kindlegen` and `kindlestrip.
|
||||
|
||||
## CREDITS
|
||||
This script exists as a cross-platform alternative to `KindleComicParser` by **Dc5e**
|
||||
(published in [this mobileread forum thread](http://www.mobileread.com/forums/showthread.php?t=192783))
|
||||
(published in [this mobileread forum thread](http://www.mobileread.com/forums/showthread.php?t=192783))
|
||||
|
||||
This droplet relies on and includes `KindleStrip` (C) by **Paul Durrant** and released in public domain
|
||||
|
||||
The app relies and includes the following scripts/binaries:
|
||||
|
||||
- the `KindleStrip` script © 2010-2012 by **Paul Durrant** and released in public domain
|
||||
([mobileread forum thread](http://www.mobileread.com/forums/showthread.php?t=96903))
|
||||
|
||||
The icon for the droplet is by **Nikolay Verin** ([http://ncrow.deviantart.com/](http://ncrow.deviantart.com/)) and released under [CC Attribution-NonCommercial-ShareAlike 3.0 Unported](http://creativecommons.org/licenses/by-nc-sa/3.0/) License
|
||||
- the `rarfile.py` script © 2005-2011 **Marko Kreen** <markokr@gmail.com>, released with ISC License
|
||||
- the free version `unrar` executable (downloadable from [here](http://www.rarlab.com/rar_add.htm), refer to `LICENSE_unrar.txt` for further details)
|
||||
- the icon is by **Nikolay Verin** ([http://ncrow.deviantart.com/](http://ncrow.deviantart.com/)) and released under [CC Attribution-NonCommercial-ShareAlike 3.0 Unported](http://creativecommons.org/licenses/by-nc-sa/3.0/) License
|
||||
|
||||
Also, you need to have `kindlegen` v2.7 (with KF8 support) which is downloadable from Amazon website
|
||||
and installed in `/usr/local/bin/`
|
||||
@@ -51,9 +55,9 @@ and installed in `/usr/local/bin/`
|
||||
## CHANGELOG
|
||||
- 1.00 - Initial version
|
||||
- 1.10 - Added support for CBZ/CBR files in comic2ebook.py
|
||||
- 1.11 - Added support for CBZ/CBR files in KindleComicConverter
|
||||
|
||||
### TODO
|
||||
- add transparent support for CBZ/CBR archives
|
||||
## TODO
|
||||
- bundle a script to manipulate images (to get rid of Mangle/E-nki/whatsoever)
|
||||
|
||||
#### calibre2ebook.py
|
||||
|
||||
Reference in New Issue
Block a user