Revised program setup routine to work within the constrains of the

docker setup.
This commit is contained in:
Raelon Masters
2020-08-03 13:02:57 -04:00
parent 8bece1853c
commit 1f08dd6d44
4 changed files with 52 additions and 22 deletions

View File

@@ -20,11 +20,12 @@ Follow or influence development @ <p align="center"><b>
## Current Features ## Current Features
* Recursive Scanning * Recursive Scanning
* Fast database access * Library Stored in PostgreSql database
* [Django](https://www.djangoproject.com/) based frontend * [Django](https://www.djangoproject.com/) based frontend
* Basic seaching via a SearchVector of author, title, & file_name fields. * Basic seaching via a SearchVector of author, title, & file_name fields.
* Ebook Downloading * Ebook Downloading
* Collections * Collections
* User System
## Currently Supported Formats ## Currently Supported Formats
@@ -35,7 +36,7 @@ Follow or influence development @ <p align="center"><b>
# New Features # New Features
* .mobi Yep mobis are now a thing! * .mobi Support
* Result set ordering * Result set ordering
* You can now choose to order your results: * You can now choose to order your results:
* Title * Title
@@ -53,16 +54,15 @@ Follow or influence development @ <p align="center"><b>
* Ascending / Descending result set * Ascending / Descending result set
* Display of the result set count, and your current position in the set. * Display of the result set count, and your current position in the set.
* A pop over layer to hold things like * A pop over layer to hold things like
* [ ] User login * [x] User login & Registration
* [ ] Control panel * [x] Control panel
* [ ] Book details * [x] Book details
* Whatever else :)
## Installation Example ## Installation Example
<a href="https://vimeo.com/382292764" target="_blank">pyShelf Installation Video</a> <a href="https://vimeo.com/382292764" target="_blank">pyShelf Installation Video</a>
## Further Installation & Support Information ## Installation & Support Information
* [SUPPORT.md](https://github.com/th3r00t/pyShelf/blob/development/.github/SUPPORT.md) * [SUPPORT.md](https://github.com/th3r00t/pyShelf/blob/development/.github/SUPPORT.md)
@@ -74,24 +74,25 @@ Follow or influence development @ <p align="center"><b>
# Installation # Installation
This project is currently targeted towards Network Administrators, and other home This project is targeted towards Network Administrators, and home enthusiasts whom I assume will know how to setup a [Django](https://www.djangoproject.com/) app, and a
enthusiasts whom I assume will know how to setup a [Django](https://www.djangoproject.com/) app, and a
[PostgreSQL](https://www.postgresql.org/) server. [PostgreSQL](https://www.postgresql.org/) server.
Once your environment is ready very little is required to get the system up and running: Once your environment is ready very little is required to get the system up and running:
* From the main directory * From the main directory
* setup configurations as discussed in [SUPPORT.md](https://github.com/th3r00t/pyShelf/blob/development/.github/SUPPORT.md) * setup configurations as discussed in [SUPPORT.md](https://github.com/th3r00t/pyShelf/blob/development/.github/SUPPORT.md)
* `pip install -r requirements.txt` * Run the following commands
* `cd src` `
* `python manage.py migrate` pip install -r requirements.txt
* `cd ..` cd src
* `./importbooks` python manage.py makemigrations
* `./makecollections` python manage.py makemigration interface
* Browse to the site as defined in your apache | nginx config python manage.py migrate
python manage.py migrate interface
## Installation & Support Information cd ..
./configure
* [SUPPORT.md](https://github.com/th3r00t/pyShelf/blob/development/.github/SUPPORT.md) ./importBooks
`
Browse to the site as defined in your apache | nginx config
## Development ## Development

View File

@@ -9,5 +9,5 @@
"PASSWORD": "pyshelf", "PASSWORD": "pyshelf",
"BOOKSHELF": "data/shelf.json", "BOOKSHELF": "data/shelf.json",
"ALLOWED_HOSTS": "*", "ALLOWED_HOSTS": "*",
"SECRET": "r0m#@$d(cs^si9_jmm)z-z#6-4-(snoctd)l(4becso9k=dwvs" "SECRET": ""
} }

25
configure vendored Executable file
View File

@@ -0,0 +1,25 @@
#!/usr/bin/env python3
import json
from django.core.management.utils import get_random_secret_key
def load_config():
with open('config.json',"r") as file:
config = json.load(file)
file.close()
return config
def write_config(config):
with open('config.json',"w") as file:
json.dump(config, file)
file.close()
def set_secret(config=load_config()):
if config["SECRET"] == "":
config["SECRET"] = get_random_secret_key()
write_config(config)
print(config["SECRET"])
else:
print(config["SECRET"])
set_secret()

View File

@@ -45,3 +45,7 @@ class Config:
with open(str(_cp), "r") as read_file: with open(str(_cp), "r") as read_file:
data = json.load(read_file) data = json.load(read_file)
return data return data
def django_secret(self, _data):
pass