mirror of
https://github.com/ciromattia/kcc
synced 2025-12-15 10:46:40 +00:00
Merge branch 'master' into kcc-gamma
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -3,4 +3,6 @@
|
|||||||
*.cbr
|
*.cbr
|
||||||
.idea
|
.idea
|
||||||
build
|
build
|
||||||
KindleComicConverter.egg-info
|
KindleComicConverter.egg-info
|
||||||
|
awkcc
|
||||||
|
dist
|
||||||
@@ -31,6 +31,7 @@ from subprocess import call
|
|||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import stat
|
import stat
|
||||||
|
import traceback
|
||||||
|
|
||||||
|
|
||||||
class MainWindow:
|
class MainWindow:
|
||||||
@@ -177,8 +178,10 @@ class MainWindow:
|
|||||||
epub_path = comic2ebook.main(subargv)
|
epub_path = comic2ebook.main(subargv)
|
||||||
self.progress_file['value'] = 2
|
self.progress_file['value'] = 2
|
||||||
self.master.update()
|
self.master.update()
|
||||||
except Exception, err:
|
except Exception as err:
|
||||||
tkMessageBox.showerror('KCC Error', "Error on file %s:\n%s" % (subargv[-1], str(err)))
|
type_, value_, traceback_ = sys.exc_info()
|
||||||
|
tkMessageBox.showerror('KCC Error', "Error on file %s:\n%s\nTraceback:\n%s" %
|
||||||
|
(subargv[-1], str(err), traceback.format_tb(traceback_)))
|
||||||
errors = True
|
errors = True
|
||||||
continue
|
continue
|
||||||
if self.options['epub_only'] == 1:
|
if self.options['epub_only'] == 1:
|
||||||
|
|||||||
10
setup.py
10
setup.py
@@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
py2app/py2exe build script for MyApplication.
|
py2app/py2exe build script for KCC.
|
||||||
|
|
||||||
Will automatically ensure that all build prerequisites are available
|
Will automatically ensure that all build prerequisites are available
|
||||||
via ez_setup
|
via ez_setup
|
||||||
@@ -8,10 +8,10 @@ Usage (Mac OS X):
|
|||||||
python setup.py py2app
|
python setup.py py2app
|
||||||
|
|
||||||
Usage (Windows):
|
Usage (Windows):
|
||||||
python setup.py py2exe
|
python setup.py build
|
||||||
"""
|
"""
|
||||||
import ez_setup
|
from ez_setup import use_setuptools
|
||||||
ez_setup.use_setuptools()
|
use_setuptools()
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
@@ -71,7 +71,7 @@ setup(
|
|||||||
'Intended Audience :: End Users/Desktop',
|
'Intended Audience :: End Users/Desktop',
|
||||||
'Operating System :: OS Independent',
|
'Operating System :: OS Independent',
|
||||||
'Programming Language :: Python',
|
'Programming Language :: Python',
|
||||||
'Programming Language :: Python :: 3',
|
'Programming Language :: Python :: 2.7',
|
||||||
'Topic :: Multimedia :: Graphics :: Graphics Conversion',
|
'Topic :: Multimedia :: Graphics :: Graphics Conversion',
|
||||||
'Topic :: Utilities'
|
'Topic :: Utilities'
|
||||||
],
|
],
|
||||||
|
|||||||
14
setup_console.py
Normal file
14
setup_console.py
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
"""
|
||||||
|
py2app/py2exe build script for KCC No-GUI release.
|
||||||
|
|
||||||
|
Usage (Windows):
|
||||||
|
python setup.py py2exe
|
||||||
|
"""
|
||||||
|
from distutils.core import setup
|
||||||
|
import sys
|
||||||
|
import py2exe
|
||||||
|
sys.path.insert(0, 'kcc')
|
||||||
|
|
||||||
|
setup(
|
||||||
|
console=['kcc/comic2ebook.py', 'kcc/kindlestrip.py'],
|
||||||
|
)
|
||||||
86
setup_cx.py
86
setup_cx.py
@@ -1,86 +0,0 @@
|
|||||||
"""
|
|
||||||
py2app/py2exe build script for MyApplication.
|
|
||||||
|
|
||||||
Will automatically ensure that all build prerequisites are available
|
|
||||||
via ez_setup
|
|
||||||
|
|
||||||
Usage (Mac OS X):
|
|
||||||
python setup_cx.py bdist_dmg
|
|
||||||
|
|
||||||
Usage (Windows):
|
|
||||||
python setup_cx.py bdist_msi
|
|
||||||
"""
|
|
||||||
import sys
|
|
||||||
from cx_Freeze import setup, Executable
|
|
||||||
|
|
||||||
NAME='KindleComicConverter'
|
|
||||||
VERSION="2.4"
|
|
||||||
mainscript = 'kcc.py'
|
|
||||||
|
|
||||||
base = None
|
|
||||||
|
|
||||||
if sys.platform == 'darwin':
|
|
||||||
extra_options = dict(
|
|
||||||
bundle-iconfile='resources/comic2ebook.icns',
|
|
||||||
volume-label=NAME + " " + VERSION
|
|
||||||
app=[mainscript],
|
|
||||||
options=dict(
|
|
||||||
py2app=dict(
|
|
||||||
argv_emulation=True,
|
|
||||||
iconfile='resources/comic2ebook.icns',
|
|
||||||
plist=dict(
|
|
||||||
CFBundleName = NAME,
|
|
||||||
CFBundleShortVersionString = VERSION,
|
|
||||||
CFBundleGetInfoString = NAME + " " + VERSION + ", written 2012-2013 by Ciro Mattia Gonano",
|
|
||||||
CFBundleExecutable = NAME,
|
|
||||||
CFBundleIdentifier = 'com.github.ciromattia.kcc',
|
|
||||||
CFBundleSignature = 'dplt'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
elif sys.platform == 'win32':
|
|
||||||
base = "Win32GUI"
|
|
||||||
extra_options = dict(
|
|
||||||
upgrade-code = 'KindleComicConverter',
|
|
||||||
executables = [Executable("kcc.py", base=base)]
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
extra_options = dict(
|
|
||||||
# Normally unix-like platforms will use "setup.py install"
|
|
||||||
# and install the main script as such
|
|
||||||
scripts=[mainscript],
|
|
||||||
)
|
|
||||||
|
|
||||||
options = dict(
|
|
||||||
|
|
||||||
)
|
|
||||||
|
|
||||||
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",
|
|
||||||
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 :: 3',
|
|
||||||
'Topic :: Multimedia :: Graphics :: Graphics Conversion',
|
|
||||||
'Topic :: Utilities'
|
|
||||||
],
|
|
||||||
# make sure to add custom_fixers to the MANIFEST.in
|
|
||||||
include_package_data=True,
|
|
||||||
executables = [Executable("kcc.py", base=base)]),
|
|
||||||
**extra_options
|
|
||||||
)
|
|
||||||
Reference in New Issue
Block a user