mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Use pre-commit
[pre-commit](https://pre-commit.com/) automatically runs tools like linters and fixers to make development easier. This change adds a simple pre-commit config file with an example trailing whitespace fixer and applies it to the existing project. Additionally, don't ignore the lib directory (an error introduced in #8).
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -26,7 +26,8 @@ dist/
|
|||||||
downloads/
|
downloads/
|
||||||
eggs/
|
eggs/
|
||||||
.eggs/
|
.eggs/
|
||||||
lib/
|
# pyShelf uses its own `lib` directory, don't ignore it.
|
||||||
|
# lib/
|
||||||
lib64/
|
lib64/
|
||||||
parts/
|
parts/
|
||||||
sdist/
|
sdist/
|
||||||
|
|||||||
12
.pre-commit-config.yaml
Normal file
12
.pre-commit-config.yaml
Normal file
@@ -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
|
||||||
@@ -10,9 +10,16 @@ Calibre does have a console based server solution, However there is currently no
|
|||||||
Thus I am creating pyShelf and I hope to be able to provide all the functionality required to organize and host all your ebooks.
|
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.
|
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
|
## Configuration
|
||||||
All configuration is done in config.py.
|
All configuration is done in config.py.
|
||||||
The only currently required configuration is to set book_path to the location of your books.
|
The only currently required configuration is to set book_path to the location of your books.
|
||||||
|
|
||||||
## Current Features
|
## Current Features
|
||||||
Currently pyShelf will recursively scan your collection, extract and store some metadata in the sqlite database.
|
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
|
The basic template system is in place, as well as a template mockup. This can be seen hosted on port 8000
|
||||||
|
|||||||
Reference in New Issue
Block a user