mirror of
https://github.com/ciromattia/kcc
synced 2025-12-13 01:36:27 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -3,6 +3,5 @@
|
||||
*.cbr
|
||||
.idea
|
||||
build
|
||||
KindleComicConverter.egg-info
|
||||
awkcc
|
||||
dist
|
||||
.DS_Store
|
||||
|
||||
@@ -266,9 +266,7 @@ def applyImgOptimization(img, isSplit=False, toRight=False):
|
||||
|
||||
|
||||
def dirImgProcess(path):
|
||||
global options
|
||||
global splitCount
|
||||
splitCount = 0
|
||||
global options, splitCount
|
||||
if options.righttoleft:
|
||||
facing = "right"
|
||||
else:
|
||||
@@ -423,7 +421,7 @@ def Usage():
|
||||
|
||||
|
||||
def main(argv=None):
|
||||
global parser, options, epub_path
|
||||
global parser, options, epub_path, splitCount
|
||||
usage = "Usage: %prog [options] comic_file|comic_folder"
|
||||
parser = OptionParser(usage=usage, version=__version__)
|
||||
parser.add_option("-p", "--profile", action="store", dest="profile", default="KHD",
|
||||
@@ -462,6 +460,7 @@ def main(argv=None):
|
||||
path = getWorkFolder(args[0])
|
||||
if options.title == 'defaulttitle':
|
||||
options.title = os.path.splitext(os.path.basename(args[0]))[0]
|
||||
splitCount = 0
|
||||
if options.imgproc:
|
||||
print "Processing images..."
|
||||
dirImgProcess(path + "/OEBPS/Images/")
|
||||
|
||||
77
setup.py
77
setup.py
@@ -1,29 +1,28 @@
|
||||
"""
|
||||
py2app/py2exe build script for KCC.
|
||||
cx_freeze/py2app build script for KCC.
|
||||
|
||||
Will automatically ensure that all build prerequisites are available
|
||||
via ez_setup
|
||||
|
||||
Usage (Mac OS X):
|
||||
python setup.py py2app
|
||||
Will automatically ensure that all build prerequisites are available via ez_setup
|
||||
|
||||
Usage (Windows):
|
||||
python setup.py build
|
||||
|
||||
Usage (OS X):
|
||||
python setup.py py2app
|
||||
"""
|
||||
from ez_setup import use_setuptools
|
||||
use_setuptools()
|
||||
|
||||
import sys
|
||||
from setuptools import setup
|
||||
|
||||
NAME = 'KindleComicConverter'
|
||||
NAME = "KindleComicConverter"
|
||||
VERSION = "2.7"
|
||||
mainscript = 'kcc.py'
|
||||
MAIN = "kcc.py"
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
if sys.platform == "darwin":
|
||||
from setuptools import setup
|
||||
extra_options = dict(
|
||||
setup_requires=['py2app'],
|
||||
app=[mainscript],
|
||||
app=[MAIN],
|
||||
options=dict(
|
||||
py2app=dict(
|
||||
argv_emulation=True,
|
||||
@@ -39,50 +38,42 @@ if sys.platform == 'darwin':
|
||||
)
|
||||
)
|
||||
)
|
||||
elif sys.platform == 'win32':
|
||||
elif sys.platform == "win32":
|
||||
from cx_Freeze import setup, Executable
|
||||
base = "Win32GUI"
|
||||
extra_options = dict(
|
||||
executables=[Executable("kcc.py", base=base, icon='comic2ebook.ico',
|
||||
appendScriptToExe=True, appendScriptToLibrary=False)],
|
||||
options=dict(
|
||||
build_exe=dict(
|
||||
compressed=True
|
||||
)
|
||||
)
|
||||
options = {"build_exe": {"include_files": ["comic2ebook.ico"]}},
|
||||
executables=[Executable(MAIN, base=base, icon="comic2ebook.ico", appendScriptToExe=True, appendScriptToLibrary=False, compress=True)]
|
||||
)
|
||||
else:
|
||||
extra_options = dict(
|
||||
# Normally unix-like platforms will use "setup.py install"
|
||||
# and install the main script as such
|
||||
scripts=[mainscript],
|
||||
scripts=[MAIN],
|
||||
)
|
||||
|
||||
setup(
|
||||
name=NAME,
|
||||
version=VERSION,
|
||||
author="Ciro Mattia Gonano",
|
||||
author_email="ciromattia@gmail.com",
|
||||
description="A tool to convert comics (CBR/CBZ/PDFs/image folders) to Mobipocket.",
|
||||
license="ISC License (ISCL)",
|
||||
keywords="kindle comic mobipocket mobi cbz cbr manga",
|
||||
url="http://github.com/ciromattia/kcc",
|
||||
name = NAME,
|
||||
version = VERSION,
|
||||
author = "Ciro Mattia Gonano",
|
||||
author_email = "ciromattia@gmail.com",
|
||||
description = "A tool to convert comics (CBR/CBZ/PDFs/image folders) to MOBI.",
|
||||
license = "ISC License (ISCL)",
|
||||
keywords = "kindle comic mobipocket mobi cbz cbr manga",
|
||||
url = "http://github.com/ciromattia/kcc",
|
||||
classifiers=[
|
||||
'Development Status :: 4 - Beta'
|
||||
'License :: OSI Approved :: ISC License (ISCL)',
|
||||
'Environment :: Console',
|
||||
'Environment :: MacOS X',
|
||||
'Environment :: Win32 (MS Windows)',
|
||||
'Environment :: X11 Applications',
|
||||
'Intended Audience :: End Users/Desktop',
|
||||
'Operating System :: OS Independent',
|
||||
'Programming Language :: Python',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Topic :: Multimedia :: Graphics :: Graphics Conversion',
|
||||
'Topic :: Utilities'
|
||||
'Development Status :: 4 - Beta'
|
||||
'License :: OSI Approved :: ISC License (ISCL)',
|
||||
'Environment :: Console',
|
||||
'Environment :: MacOS X',
|
||||
'Environment :: Win32 (MS Windows)',
|
||||
'Environment :: X11 Applications',
|
||||
'Intended Audience :: End Users/Desktop',
|
||||
'Operating System :: OS Independent',
|
||||
'Programming Language :: Python',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Topic :: Multimedia :: Graphics :: Graphics Conversion',
|
||||
'Topic :: Utilities'
|
||||
],
|
||||
packages=['kcc'],
|
||||
# make sure to add custom_fixers to the MANIFEST.in
|
||||
include_package_data=True,
|
||||
**extra_options
|
||||
)
|
||||
|
||||
@@ -8,15 +8,15 @@ import sys
|
||||
from cx_Freeze import setup, Executable
|
||||
sys.path.insert(0, 'kcc')
|
||||
|
||||
setup( name = "KindleComicConverter",
|
||||
version = "2.7",
|
||||
author = "Ciro Mattia Gonano",
|
||||
author_email = "ciromattia@gmail.com",
|
||||
description = "A tool to convert comics (CBR/CBZ/PDFs/image folders) to MOBI.",
|
||||
license= " ISC License (ISCL)",
|
||||
keywords= "kindle comic mobipocket mobi cbz cbr manga",
|
||||
url = "http://github.com/ciromattia/kcc",
|
||||
options = {"build_exe": {}},
|
||||
executables = [Executable("kcc/comic2ebook.py", appendScriptToExe=True, appendScriptToLibrary=False),
|
||||
Executable("kcc/kindlestrip.py", appendScriptToExe=True, appendScriptToLibrary=False)]
|
||||
)
|
||||
setup(
|
||||
name = "KindleComicConverter",
|
||||
version = "2.7",
|
||||
author = "Ciro Mattia Gonano",
|
||||
author_email = "ciromattia@gmail.com",
|
||||
description = "A tool to convert comics (CBR/CBZ/PDFs/image folders) to MOBI.",
|
||||
license= "ISC License (ISCL)",
|
||||
keywords= "kindle comic mobipocket mobi cbz cbr manga",
|
||||
url = "http://github.com/ciromattia/kcc",
|
||||
executables = [Executable("kcc/comic2ebook.py", appendScriptToExe=True, appendScriptToLibrary=False),
|
||||
Executable("kcc/kindlestrip.py", appendScriptToExe=True, appendScriptToLibrary=False)]
|
||||
)
|
||||
Reference in New Issue
Block a user