diff --git a/.github/contributing.md b/.github/contributing.md deleted file mode 100644 index 36c4eaa..0000000 --- a/.github/contributing.md +++ /dev/null @@ -1,84 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our community include: - -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -* Focusing on what is best not just for us as individuals, but for the overall community - -Examples of unacceptable behavior include: - -* The use of sexualized language or imagery, and sexual attention or - advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email - address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [enforcement@pyshelf.com](mailto:enforcement@pyshelf.com). All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series of actions. - -**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the project community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, -available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. - -Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see the FAQ at -https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. diff --git a/.gitignore b/.gitignore index b53eaff..7d5c28b 100755 --- a/.gitignore +++ b/.gitignore @@ -129,3 +129,6 @@ create_db.sql uwsgi.ini installer.log pyshelf_nginx.conf +tags +TAGS +config.json diff --git a/.tern-config b/.tern-config new file mode 100644 index 0000000..158d9f4 --- /dev/null +++ b/.tern-config @@ -0,0 +1,6 @@ +{ + “plugins”: + { + “node”: {} + } +} diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 index b8ab274..00cd8f1 --- a/README.md +++ b/README.md @@ -1,20 +1,22 @@ -# pyShelf 0.4.1 +# pyShelf 0.5.0

Terminal based ebook server. Open source & Lightweight.

+

Having used Calibre for hosting my eBook collection in the past, I found myself frustrated having to install X on my server, or manage my library externally, Thus I have decided to spin up my own.

+

https://pyshelf.com

-[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D51ALZH) +![pyShelf 0.5.0 Collection 1](https://github.com/th3r00t/pyShelf/raw/development/preview_050.png) +![pyShelf 0.5.0 Collection 2](https://github.com/th3r00t/pyShelf/raw/development/preview_1_050.png) -Having used Calibre for hosting my eBook collection in the past, I found myself frustrated having to install X on my server, or manage my library externally, Thus I have decided to spin up my own. - -### Join the discussion: Discord [https://discord.gg/H9TbNJS](https://discord.gg/H9TbNJS) | IRC freenode.net @ #pyshelf +

Discord [https://discord.gg/H9TbNJS](https://discord.gg/H9TbNJS) | IRC freenode.net @ #pyshelf

## Current Features -* Custom Installer +* Custom Installer -- pre-req installs work on Arch Based Distros Only * Recursive Scanning * Fast database access * Django based frontend * Basic seaching via a SearchVector of author, title, & file_name fields. * Ebook Downloading +* Collections ## Currently Supported Formats * epub @@ -25,22 +27,39 @@ Having used Calibre for hosting my eBook collection in the past, I found myself ## Further Installation & Support Information * [SUPPORT.md](https://github.com/th3r00t/pyShelf/blob/development/.github/SUPPORT.md) -## 0.4.1 Patch Notes. -### Filename detection -Now using os.path.splitext to ensure proper formating of downloaded files +## 0.5.0 Patch Notes. -## 0.4.0 Patch Notes. -### The Installer Initiative +### Pre-req Dependencies +* gcc -- This will be installed by the new pre-installer script if its binary is not detected at /usr/bin/gcc +Users on distros other then Arch should install gcc via their systems package manager prior to +running the installer. +* Python3 +* pip +### New Features +* Collections +We are now categorizing your ebooks into collections based on the folder +structure used to store them. Any folder after the root book folder is now +considered as a collection. +#### books/forgotten realms/ -> Forgotten Realms Collection. +#### books/Dune/Prelude To Dune -> Dune, & Preluse To Dune Collections. -All work this time around was centered on creating an installer simple and inclusive enough to hopefully enable all -users to simply set it and forget it. I have debugged as much as I can with my setup. I am performing some simple file finding to determine which system installer is present, and setting it as the installer used by pyShelf. +In addition to the work on the collection system, a good deal of time was spent +on the installer, and the concept of having an installer in the first place. -This setup has been tested and is working flawlessly on arch based distros, and i have done what I can for debian, and centos based distros, If you do encounter installer issues please let me know if it isnt finding the system installer, or possibly isnt passing command line arguments to your installer. +I mainly wanted to make this project for Network Administrators, and other home +enthusiasts whom I assume will know how to setup a Django app, and a +Postgres server. Beyond that theres nothing the user has to do to make the +system work... -Also it should be noted that I am determining the presence of your postgresql, and nginx servers based on whether or not the -process is listed in the process list. +The installer will only run correctly on arch based distros. This could be +easily rectified to include other package managers, Members of the community +are welcome to dig into the installer source and patch in support +for other package managers. -At this time I would suggest stopping both your postgresql and nginx servers should you already have them and allowing the installer to do its work generating custom configurations and putting the nginx config files in place (/etc/nginx/sites-available, and symlinked to /etc/nginx/sites-enabled/) None of your existing configurations will be overwritten. +There is some support for detection of the aptitude package manager +installation already present in the source now, however it is not complete and +should not be relied upon to be present in future releases unless completed by +a member of the community, ## Development @@ -59,15 +78,24 @@ All configuration is now handled by the installer. Running via the Django test server might be possible, albeit not recomended. -## In Progress +### In Progress -* Organizational tools. -* Docker image for those who need it. -* Improved cover image storage, and acquisition. +#### Organizational tools. +- [x] Automated Collections +- [ ] Manual Collections +- [ ] Books Removal +- [ ] Access Restrictions +- [ ] Metadata Manipulation +- [ ] Others? +#### Improved cover image storage, and acquisition. +#### OPDS Support +#### Support for other formats +- [ ] .mobi +- [ ] .pdf +- [ ] .cbz +- [ ] .zip (Zipped book folders, is this a new idea? (Consider storing your library folders zipped and retrieving a book on demand)) -## Future Goals -* Support for other book formats (Currently only supporting EPUBS) -* Terminal Backend for catalogue maintenance -* Calculate page count from total characters +### Future Goals +#### Terminal Backend for catalogue maintenance +#### Calculate page count from total characters * (Thanks to @Fireblend for the idea) https://github.com/th3r00t/pyShelf/issues/3 -* Reader for easy integration with your catalogue diff --git a/config.json b/config.json old mode 100644 new mode 100755 index b83d7e3..71951be --- a/config.json +++ b/config.json @@ -1 +1 @@ -{"TITLE": "pyShelf E-Book Server", "VERSION": "0.4.1", "BOOKPATH": "", "DB_HOST": "localhost", "DB_PORT": "5432", "DATABASE": "pyshelf", "USER": "pyshelf", "PASSWORD": "pyshelf", "BOOKSHELF": "data/shelf.json", "ALLOWED_HOSTS": "*", "hostname": "localhost", "webport": "8000", "wsgiport": "8001"} +{"TITLE": "pyShelf E-Book Server", "VERSION": "0.5.0", "BOOKPATH": "", "DB_HOST": "localhost", "DB_PORT": "5432", "DATABASE": "pyshelf", "USER": "pyshelf", "PASSWORD": "pyshelf", "BOOKSHELF": "data/shelf.json", "ALLOWED_HOSTS": "*", "hostname": "localhost", "webport": "8000", "wsgiport": "8001"} diff --git a/data/.track_this_folder b/data/.track_this_folder old mode 100644 new mode 100755 diff --git a/docs/html/annotated.html b/docs/html/annotated.html old mode 100644 new mode 100755 diff --git a/docs/html/bc_s.png b/docs/html/bc_s.png old mode 100644 new mode 100755 diff --git a/docs/html/bdwn.png b/docs/html/bdwn.png old mode 100644 new mode 100755 diff --git a/docs/html/classes.html b/docs/html/classes.html old mode 100644 new mode 100755 diff --git a/docs/html/closed.png b/docs/html/closed.png old mode 100644 new mode 100755 diff --git a/docs/html/d0/d35/classsrc_1_1backend_1_1lib_1_1display_1_1TerminalDisplay.html b/docs/html/d0/d35/classsrc_1_1backend_1_1lib_1_1display_1_1TerminalDisplay.html old mode 100644 new mode 100755 diff --git a/docs/html/d1/dca/classsrc_1_1backend_1_1lib_1_1pyShelf_1_1InitFiles-members.html b/docs/html/d1/dca/classsrc_1_1backend_1_1lib_1_1pyShelf_1_1InitFiles-members.html old mode 100644 new mode 100755 diff --git a/docs/html/d3/d29/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Config.html b/docs/html/d3/d29/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Config.html old mode 100644 new mode 100755 index 585ec70..c9dc6cb --- a/docs/html/d3/d29/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Config.html +++ b/docs/html/d3/d29/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Config.html @@ -148,7 +148,7 @@ Public Attributes
Opens config.json and reads in configuration options
-
+

Reimplemented from src.backend.lib.config.Config.

diff --git a/docs/html/d3/d29/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Config.png b/docs/html/d3/d29/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Config.png old mode 100644 new mode 100755 diff --git a/docs/html/d3/d4a/classsrc_1_1backend_1_1lib_1_1config_1_1Config-members.html b/docs/html/d3/d4a/classsrc_1_1backend_1_1lib_1_1config_1_1Config-members.html old mode 100644 new mode 100755 diff --git a/docs/html/d3/d95/classsrc_1_1backend_1_1tests_1_1library__test_1_1TestCatalogue-members.html b/docs/html/d3/d95/classsrc_1_1backend_1_1tests_1_1library__test_1_1TestCatalogue-members.html old mode 100644 new mode 100755 diff --git a/docs/html/d4/d45/classsrc_1_1backend_1_1lib_1_1display_1_1TerminalDisplay-members.html b/docs/html/d4/d45/classsrc_1_1backend_1_1lib_1_1display_1_1TerminalDisplay-members.html old mode 100644 new mode 100755 diff --git a/docs/html/d5/da5/classsrc_1_1backend_1_1lib_1_1library_1_1Catalogue.html b/docs/html/d5/da5/classsrc_1_1backend_1_1lib_1_1library_1_1Catalogue.html old mode 100644 new mode 100755 index 9ed75d7..aad2433 --- a/docs/html/d5/da5/classsrc_1_1backend_1_1lib_1_1library_1_1Catalogue.html +++ b/docs/html/d5/da5/classsrc_1_1backend_1_1lib_1_1library_1_1Catalogue.html @@ -144,7 +144,7 @@ Public Attributes
Calls storage system, gets list of books stored and compares against files on disk
-
+
@@ -179,7 +179,7 @@ Public Attributes
Opens epub as zip file filters then stores as list any files matching opf_regx
-
+
@@ -214,7 +214,7 @@ Public Attributes
Opens epub as zip file filters then stores as list any files matching html_regx
-
+
@@ -249,7 +249,7 @@ Public Attributes
Opens epub as zip file filters then stores as list any files matching cover_regx
-
+
@@ -280,7 +280,7 @@ Public Attributes
Return extracted metadata and cover picture
 book['path'] == Full path to ebook file
 book['files'] == list of files from self.process_book(book)
-
+ @@ -302,7 +302,7 @@ book['files'] == list of files from self.process_book(book) Proceeds to call process_book :returns self._book_list_expanded: json string containing all book metadata - +

Reimplemented in src.backend.tests.library_test.Test_Catalogue.

@@ -335,7 +335,7 @@ Proceeds to call process_book
Main entry point for import operations.
 Gets a list of new files via compare_shelf_current.
 Iterates over list and inserts new books into database.
-
+ @@ -361,7 +361,7 @@ Iterates over list and inserts new books into database.
-
Return dictionary of epub file contents
+
Return dictionary of epub file contents
@@ -390,7 +390,7 @@ Iterates over list and inserts new books into database.
Scan folder by _path, allows recurisive scanning
-
+

The documentation for this class was generated from the following file: