diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b989be6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,105 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +.static_storage/ +.media/ +local_settings.py + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ diff --git a/KindleUnpack/__init__.py b/lector/KindleUnpack/__init__.py similarity index 100% rename from KindleUnpack/__init__.py rename to lector/KindleUnpack/__init__.py diff --git a/KindleUnpack/compatibility_utils.py b/lector/KindleUnpack/compatibility_utils.py similarity index 100% rename from KindleUnpack/compatibility_utils.py rename to lector/KindleUnpack/compatibility_utils.py diff --git a/KindleUnpack/kindleunpack.py b/lector/KindleUnpack/kindleunpack.py similarity index 100% rename from KindleUnpack/kindleunpack.py rename to lector/KindleUnpack/kindleunpack.py diff --git a/KindleUnpack/mobi_cover.py b/lector/KindleUnpack/mobi_cover.py similarity index 100% rename from KindleUnpack/mobi_cover.py rename to lector/KindleUnpack/mobi_cover.py diff --git a/KindleUnpack/mobi_dict.py b/lector/KindleUnpack/mobi_dict.py similarity index 100% rename from KindleUnpack/mobi_dict.py rename to lector/KindleUnpack/mobi_dict.py diff --git a/KindleUnpack/mobi_header.py b/lector/KindleUnpack/mobi_header.py similarity index 100% rename from KindleUnpack/mobi_header.py rename to lector/KindleUnpack/mobi_header.py diff --git a/KindleUnpack/mobi_html.py b/lector/KindleUnpack/mobi_html.py similarity index 100% rename from KindleUnpack/mobi_html.py rename to lector/KindleUnpack/mobi_html.py diff --git a/KindleUnpack/mobi_index.py b/lector/KindleUnpack/mobi_index.py similarity index 100% rename from KindleUnpack/mobi_index.py rename to lector/KindleUnpack/mobi_index.py diff --git a/KindleUnpack/mobi_k8proc.py b/lector/KindleUnpack/mobi_k8proc.py similarity index 100% rename from KindleUnpack/mobi_k8proc.py rename to lector/KindleUnpack/mobi_k8proc.py diff --git a/KindleUnpack/mobi_k8resc.py b/lector/KindleUnpack/mobi_k8resc.py similarity index 100% rename from KindleUnpack/mobi_k8resc.py rename to lector/KindleUnpack/mobi_k8resc.py diff --git a/KindleUnpack/mobi_nav.py b/lector/KindleUnpack/mobi_nav.py similarity index 100% rename from KindleUnpack/mobi_nav.py rename to lector/KindleUnpack/mobi_nav.py diff --git a/KindleUnpack/mobi_ncx.py b/lector/KindleUnpack/mobi_ncx.py similarity index 100% rename from KindleUnpack/mobi_ncx.py rename to lector/KindleUnpack/mobi_ncx.py diff --git a/KindleUnpack/mobi_opf.py b/lector/KindleUnpack/mobi_opf.py similarity index 100% rename from KindleUnpack/mobi_opf.py rename to lector/KindleUnpack/mobi_opf.py diff --git a/KindleUnpack/mobi_pagemap.py b/lector/KindleUnpack/mobi_pagemap.py similarity index 100% rename from KindleUnpack/mobi_pagemap.py rename to lector/KindleUnpack/mobi_pagemap.py diff --git a/KindleUnpack/mobi_sectioner.py b/lector/KindleUnpack/mobi_sectioner.py similarity index 100% rename from KindleUnpack/mobi_sectioner.py rename to lector/KindleUnpack/mobi_sectioner.py diff --git a/KindleUnpack/mobi_split.py b/lector/KindleUnpack/mobi_split.py similarity index 100% rename from KindleUnpack/mobi_split.py rename to lector/KindleUnpack/mobi_split.py diff --git a/KindleUnpack/mobi_uncompress.py b/lector/KindleUnpack/mobi_uncompress.py similarity index 100% rename from KindleUnpack/mobi_uncompress.py rename to lector/KindleUnpack/mobi_uncompress.py diff --git a/KindleUnpack/mobi_utils.py b/lector/KindleUnpack/mobi_utils.py similarity index 100% rename from KindleUnpack/mobi_utils.py rename to lector/KindleUnpack/mobi_utils.py diff --git a/KindleUnpack/mobiml2xhtml.py b/lector/KindleUnpack/mobiml2xhtml.py similarity index 100% rename from KindleUnpack/mobiml2xhtml.py rename to lector/KindleUnpack/mobiml2xhtml.py diff --git a/KindleUnpack/unipath.py b/lector/KindleUnpack/unipath.py similarity index 100% rename from KindleUnpack/unipath.py rename to lector/KindleUnpack/unipath.py diff --git a/KindleUnpack/unpack_structure.py b/lector/KindleUnpack/unpack_structure.py similarity index 100% rename from KindleUnpack/unpack_structure.py rename to lector/KindleUnpack/unpack_structure.py diff --git a/__main__.py b/lector/__main__.py similarity index 100% rename from __main__.py rename to lector/__main__.py diff --git a/database.py b/lector/database.py similarity index 100% rename from database.py rename to lector/database.py diff --git a/definitionsdialog.py b/lector/definitionsdialog.py similarity index 100% rename from definitionsdialog.py rename to lector/definitionsdialog.py diff --git a/delegates.py b/lector/delegates.py similarity index 100% rename from delegates.py rename to lector/delegates.py diff --git a/ePub/__init__.py b/lector/ePub/__init__.py similarity index 100% rename from ePub/__init__.py rename to lector/ePub/__init__.py diff --git a/ePub/read_epub.py b/lector/ePub/read_epub.py similarity index 100% rename from ePub/read_epub.py rename to lector/ePub/read_epub.py diff --git a/library.py b/lector/library.py similarity index 100% rename from library.py rename to lector/library.py diff --git a/metadatadialog.py b/lector/metadatadialog.py similarity index 100% rename from metadatadialog.py rename to lector/metadatadialog.py diff --git a/models.py b/lector/models.py similarity index 100% rename from models.py rename to lector/models.py diff --git a/parsers/__init__.py b/lector/parsers/__init__.py similarity index 100% rename from parsers/__init__.py rename to lector/parsers/__init__.py diff --git a/parsers/cbr.py b/lector/parsers/cbr.py similarity index 100% rename from parsers/cbr.py rename to lector/parsers/cbr.py diff --git a/parsers/cbz.py b/lector/parsers/cbz.py similarity index 100% rename from parsers/cbz.py rename to lector/parsers/cbz.py diff --git a/parsers/epub.py b/lector/parsers/epub.py similarity index 100% rename from parsers/epub.py rename to lector/parsers/epub.py diff --git a/parsers/mobi.py b/lector/parsers/mobi.py similarity index 100% rename from parsers/mobi.py rename to lector/parsers/mobi.py diff --git a/rarfile/LICENSE b/lector/rarfile/LICENSE similarity index 100% rename from rarfile/LICENSE rename to lector/rarfile/LICENSE diff --git a/rarfile/__init__.py b/lector/rarfile/__init__.py similarity index 100% rename from rarfile/__init__.py rename to lector/rarfile/__init__.py diff --git a/rarfile/dumprar.py b/lector/rarfile/dumprar.py similarity index 100% rename from rarfile/dumprar.py rename to lector/rarfile/dumprar.py diff --git a/rarfile/rarfile.py b/lector/rarfile/rarfile.py similarity index 100% rename from rarfile/rarfile.py rename to lector/rarfile/rarfile.py diff --git a/resources/__init__.py b/lector/resources/__init__.py similarity index 100% rename from resources/__init__.py rename to lector/resources/__init__.py diff --git a/resources/about.html b/lector/resources/about.html similarity index 100% rename from resources/about.html rename to lector/resources/about.html diff --git a/resources/definitions.py b/lector/resources/definitions.py similarity index 100% rename from resources/definitions.py rename to lector/resources/definitions.py diff --git a/resources/mainwindow.py b/lector/resources/mainwindow.py similarity index 100% rename from resources/mainwindow.py rename to lector/resources/mainwindow.py diff --git a/resources/metadata.py b/lector/resources/metadata.py similarity index 100% rename from resources/metadata.py rename to lector/resources/metadata.py diff --git a/resources/pie_chart.py b/lector/resources/pie_chart.py similarity index 100% rename from resources/pie_chart.py rename to lector/resources/pie_chart.py diff --git a/resources/raw/NotFound.png b/lector/resources/raw/NotFound.png similarity index 100% rename from resources/raw/NotFound.png rename to lector/resources/raw/NotFound.png diff --git a/resources/raw/QMPlay2.svg b/lector/resources/raw/QMPlay2.svg similarity index 100% rename from resources/raw/QMPlay2.svg rename to lector/resources/raw/QMPlay2.svg diff --git a/resources/raw/blank.png b/lector/resources/raw/blank.png similarity index 100% rename from resources/raw/blank.png rename to lector/resources/raw/blank.png diff --git a/resources/raw/checkmark.svg b/lector/resources/raw/checkmark.svg similarity index 100% rename from resources/raw/checkmark.svg rename to lector/resources/raw/checkmark.svg diff --git a/resources/raw/color.svg b/lector/resources/raw/color.svg similarity index 100% rename from resources/raw/color.svg rename to lector/resources/raw/color.svg diff --git a/resources/raw/definition.ui b/lector/resources/raw/definition.ui similarity index 100% rename from resources/raw/definition.ui rename to lector/resources/raw/definition.ui diff --git a/resources/raw/error.svg b/lector/resources/raw/error.svg similarity index 100% rename from resources/raw/error.svg rename to lector/resources/raw/error.svg diff --git a/resources/raw/gray-shadow.png b/lector/resources/raw/gray-shadow.png similarity index 100% rename from resources/raw/gray-shadow.png rename to lector/resources/raw/gray-shadow.png diff --git a/resources/raw/main.ui b/lector/resources/raw/main.ui similarity index 100% rename from resources/raw/main.ui rename to lector/resources/raw/main.ui diff --git a/resources/raw/metadata.ui b/lector/resources/raw/metadata.ui similarity index 100% rename from resources/raw/metadata.ui rename to lector/resources/raw/metadata.ui diff --git a/resources/raw/resources.qrc b/lector/resources/raw/resources.qrc similarity index 100% rename from resources/raw/resources.qrc rename to lector/resources/raw/resources.qrc diff --git a/resources/raw/settings.ui b/lector/resources/raw/settings.ui similarity index 100% rename from resources/raw/settings.ui rename to lector/resources/raw/settings.ui diff --git a/resources/resources.py b/lector/resources/resources.py similarity index 100% rename from resources/resources.py rename to lector/resources/resources.py diff --git a/resources/settingswindow.py b/lector/resources/settingswindow.py similarity index 100% rename from resources/settingswindow.py rename to lector/resources/settingswindow.py diff --git a/settings.py b/lector/settings.py similarity index 100% rename from settings.py rename to lector/settings.py diff --git a/settingsdialog.py b/lector/settingsdialog.py similarity index 100% rename from settingsdialog.py rename to lector/settingsdialog.py diff --git a/sorter.py b/lector/sorter.py similarity index 100% rename from sorter.py rename to lector/sorter.py diff --git a/threaded.py b/lector/threaded.py similarity index 100% rename from threaded.py rename to lector/threaded.py diff --git a/toolbars.py b/lector/toolbars.py similarity index 100% rename from toolbars.py rename to lector/toolbars.py diff --git a/widgets.py b/lector/widgets.py similarity index 100% rename from widgets.py rename to lector/widgets.py diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..79bc678 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,5 @@ +[bdist_wheel] +# This flag says that the code is written to work on both Python 2 and Python +# 3. If at all possible, it is good practice to do this. If you cannot, you +# will need to generate wheels for each Python version that you support. +universal=1 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..bf9b22f --- /dev/null +++ b/setup.py @@ -0,0 +1,80 @@ +import codecs +from os import path +from setuptools import setup, find_packages + +HERE = path.abspath(path.dirname(__file__)) + +# Get the long description from the README file +with codecs.open(path.join(HERE, 'README.md'), encoding='utf-8') as f: + LONG_DESC = f.read() + +INSTALL_DEPS = ['PyQt5==5.10.1', + 'requests==2.18.4', + 'beautifulsoup4==4.6.0'] +TEST_DEPS = ['pytest', + 'unittest2'] +DEV_DEPS = [] + +setup( + name='lector', + + # https://pypi.python.org/pypi/setuptools_scm + use_scm_version=True, + + description='Qt-based ebook reader', + long_description=LONG_DESC, + + url='https://github.com/BasioMeusPuga/Lector', + + author='BasioMeusPuga', + author_email='disgruntled.mob@gmail.com', + + license='GPL v3.0', + + # See https://pypi.python.org/pypi?%3Aaction=list_classifiers + classifiers=[ + # How mature is this project? Common values are + # 3 - Alpha + # 4 - Beta + # 5 - Production/Stable + 'Development Status :: 3 - Alpha', + + 'Intended Audience :: End Users/Desktop', + + 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', + + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + ], + + # What does your project relate to? + keywords='qt ebook epub kindle', + + packages=find_packages(), + + entry_points={ + 'console_scripts': [ + 'lector = lector.__main__:main' + ] + }, + # List run-time dependencies here. These will be installed by pip when + # your project is installed. For an analysis of "install_requires" vs pip's + # requirements files see: + # https://packaging.python.org/en/latest/requirements.html + install_requires=INSTALL_DEPS, + + setup_requires=['setuptools_scm'], + + python_requires='>=3.4, <4.0', + + # List additional groups of dependencies here (e.g. development + # dependencies). You can install these using the following syntax, + # for example: + # $ pip install -e .[dev,test] + extras_require={ + 'dev': DEV_DEPS, + 'test': TEST_DEPS + }, +)