diff --git a/.gitignore b/.gitignore index 2697b03..c3f95da 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,8 @@ dist/ downloads/ eggs/ .eggs/ -lib/ +# pyShelf uses its own `lib` directory, don't ignore it. +# lib/ lib64/ parts/ sdist/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..fefb2fa --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,12 @@ +repos: + # Meta housekeeping to keep pre-commit operating correctly + - repo: meta + hooks: + - id: check-hooks-apply + - id: check-useless-excludes + + # General housekeeping and auto-fixers + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v1.3.0 + hooks: + - id: trailing-whitespace diff --git a/README.md b/README.md index afe905a..ba8a6b7 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,22 @@ A simple terminal based ebook server Frustrated with Calibre being my only option for hosting my eBook collection, I have decided to spin up my own. Calibre is a great organizational tool for your books, however not having a terminal based option for running and maintaining -a server is cumbersome when running on a headless server. +a server is cumbersome when running on a headless server. Calibre does have a console based server solution, However there is currently no way to create, and manage your library in a headless enviroment. Thus I am creating pyShelf and I hope to be able to provide all the functionality required to organize and host all your ebooks. I am open to and hoping for community help in the design and execution of this program. + +## Development +pyShelf uses [`pre-commit`](https://pre-commit.com/) to automate some tasks. +Before developing, run `pre-commit install`. +See the [documentation](https://pre-commit.com/) for more information. + ## Configuration All configuration is done in config.py. The only currently required configuration is to set book_path to the location of your books. + ## Current Features Currently pyShelf will recursively scan your collection, extract and store some metadata in the sqlite database. The basic template system is in place, as well as a template mockup. This can be seen hosted on port 8000 @@ -21,7 +28,7 @@ The basic template system is in place, as well as a template mockup. This can be * HTML Frontend for file transfers * HTML Backend for catalogue maintenance * Terminal Backend for catalogue maintenance -* Calculate page count from total characters +* Calculate page count from total characters * (Thanks to @Fireblend for the idea) https://github.com/th3r00t/pyShelf/issues/3 * Move towards sqlAlchemy and enable user to specify desired storage system * (Thanks to Sarcism) over on r/opensource for this idea! diff --git a/lib/pyShelf.py b/lib/pyShelf.py index a2f529c..25f42d6 100755 --- a/lib/pyShelf.py +++ b/lib/pyShelf.py @@ -111,7 +111,7 @@ class BookDisplay: class BookServer: """ - HTTP server functions required to display e-books + HTTP server functions required to display e-books """ def __init__(self): diff --git a/static/css/main.css b/static/css/main.css index be4b28b..e3371a8 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -25,7 +25,7 @@ body{ font-size: 25px; text-align: start; } -.shadow{ +.shadow{ text-shadow: #4c5c68 -5px 3px 5px; } .app_subhdr{ @@ -61,7 +61,7 @@ body{ grid-area: right_col } .python_logo{ - + } #python_logo{ height: 50px;