mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Add standard Python .gitignore entries
Additionally, remove files that should have been ignored by the updates here.
This commit is contained in:
113
.gitignore
vendored
113
.gitignore
vendored
@@ -2,5 +2,116 @@ books/*
|
|||||||
*.json
|
*.json
|
||||||
*.pyc
|
*.pyc
|
||||||
content.opf
|
content.opf
|
||||||
.vscode/.editorconfig
|
.vscode
|
||||||
data/catalogue.db
|
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
|
||||||
|
|||||||
@@ -1,69 +0,0 @@
|
|||||||
{
|
|
||||||
"cells": [
|
|
||||||
{
|
|
||||||
"cell_type": "code",
|
|
||||||
"execution_count": 35,
|
|
||||||
"metadata": {},
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"<zipfile.ZipExtFile name='content.opf' mode='r' compress_type=deflate>\n",
|
|
||||||
"<zipfile.ZipExtFile name='content.opf' mode='r' compress_type=deflate>\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
|
|
||||||
}
|
|
||||||
13
.vscode/settings.json
vendored
13
.vscode/settings.json
vendored
@@ -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"
|
|
||||||
}
|
|
||||||
Binary file not shown.
@@ -1,69 +0,0 @@
|
|||||||
{
|
|
||||||
"cells": [
|
|
||||||
{
|
|
||||||
"cell_type": "code",
|
|
||||||
"execution_count": 35,
|
|
||||||
"metadata": {},
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"<zipfile.ZipExtFile name='content.opf' mode='r' compress_type=deflate>\n",
|
|
||||||
"<zipfile.ZipExtFile name='content.opf' mode='r' compress_type=deflate>\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
|
|
||||||
}
|
|
||||||
@@ -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)
|
|
||||||
|
|
||||||
|
|
||||||
#%%
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user