diff --git a/.gitignore b/.gitignore index f70eeb7..2697b03 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,116 @@ books/* *.json *.pyc content.opf -.vscode/.editorconfig +.vscode data/catalogue.db + +# Standard Python gitignore below +# Created by https://www.gitignore.io/api/python +# Edit at https://www.gitignore.io/?templates=python + +### Python ### +# 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/ +pip-wheel-metadata/ +share/python-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/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# Mr Developer +.mr.developer.cfg +.project +.pydevproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# End of https://www.gitignore.io/api/python diff --git a/.ipynb_checkpoints/scratchpad-checkpoint.ipynb b/.ipynb_checkpoints/scratchpad-checkpoint.ipynb deleted file mode 100644 index b6061a6..0000000 --- a/.ipynb_checkpoints/scratchpad-checkpoint.ipynb +++ /dev/null @@ -1,69 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 35, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\n" - ] - } - ], - "source": [ - "from library import Catalogue\n", - "import zipfile\n", - "import pprint as pp\n", - "import re\n", - "\n", - "Catalogue = Catalogue()\n", - "book_list = Catalogue.filter_books(1)\n", - "unpacked = []\n", - "\n", - "for book in book_list:\n", - " book = zipfile.ZipFile(book, 'r')\n", - " with book as bookzip:\n", - " try:\n", - " content_opf = bookzip.open('content.opf')\n", - " print(content_opf)\n", - " except KeyError as e:\n", - " expanded = bookzip.infolist()\n", - " regx1 = re.compile(r'\\.opf|^cover')\n", - " for i in expanded:\n", - " if re.search(regx1, str(i)) == True: pp.pprint(i.filename); print(res)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.7.4" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100755 index 7be0ae1..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "python.testing.unittestArgs": [ - "-v", - "-s", - "./tests", - "-p", - "test_*.py" - ], - "python.testing.pytestEnabled": false, - "python.testing.nosetestsEnabled": false, - "python.testing.unittestEnabled": true, - "python.pythonPath": "/home/raelon/.virtualenvs/pyShelf/bin/python" -} \ No newline at end of file diff --git a/__pycache__/config.cpython-37.pyc b/__pycache__/config.cpython-37.pyc deleted file mode 100644 index e408d83..0000000 Binary files a/__pycache__/config.cpython-37.pyc and /dev/null differ diff --git a/conf/settings.json b/conf/settings.json deleted file mode 100755 index e69de29..0000000 diff --git a/scratchpad.ipynb b/scratchpad.ipynb deleted file mode 100644 index b6061a6..0000000 --- a/scratchpad.ipynb +++ /dev/null @@ -1,69 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 35, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "\n" - ] - } - ], - "source": [ - "from library import Catalogue\n", - "import zipfile\n", - "import pprint as pp\n", - "import re\n", - "\n", - "Catalogue = Catalogue()\n", - "book_list = Catalogue.filter_books(1)\n", - "unpacked = []\n", - "\n", - "for book in book_list:\n", - " book = zipfile.ZipFile(book, 'r')\n", - " with book as bookzip:\n", - " try:\n", - " content_opf = bookzip.open('content.opf')\n", - " print(content_opf)\n", - " except KeyError as e:\n", - " expanded = bookzip.infolist()\n", - " regx1 = re.compile(r'\\.opf|^cover')\n", - " for i in expanded:\n", - " if re.search(regx1, str(i)) == True: pp.pprint(i.filename); print(res)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.7.4" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/scratchpad.py b/scratchpad.py deleted file mode 100644 index 8894cef..0000000 --- a/scratchpad.py +++ /dev/null @@ -1,29 +0,0 @@ -# To add a new cell, type '#%%' -# To add a new markdown cell, type '#%% [markdown]' -#%% -from library import Catalogue -import zipfile -import pprint as pp -import re - -Catalogue = Catalogue() -book_list = Catalogue.filter_books(1) -unpacked = [] - -for book in book_list: - book = zipfile.ZipFile(book, 'r') - with book as bookzip: - try: - content_opf = bookzip.open('content.opf') - print(content_opf) - except KeyError as e: - expanded = bookzip.infolist() - regx1 = re.compile(r'\.opf|^cover') - for i in expanded: - if re.search(regx1, str(i)) == True: pp.pprint(i.filename); print(res) - - -#%% - - - diff --git a/tests/__pycache__/test_library.cpython-37.pyc b/tests/__pycache__/test_library.cpython-37.pyc deleted file mode 100644 index 267b0ba..0000000 Binary files a/tests/__pycache__/test_library.cpython-37.pyc and /dev/null differ diff --git a/tests/__pycache__/test_sysio.cpython-37.pyc b/tests/__pycache__/test_sysio.cpython-37.pyc deleted file mode 100644 index 268cb5f..0000000 Binary files a/tests/__pycache__/test_sysio.cpython-37.pyc and /dev/null differ