# pyShelf 0.6.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

![pyShelf 0.6.0 newui](https://github.com/th3r00t/pyShelf/raw/development/src/interface/static/img/pyShelf_frontend_0_2_0.png) ### You dont need an X server to host a website, or your Movie & Tv collection, so why should you need one to host ebooks? _Other solutiions require you to have access to an X server to at the very least generate your book database, pyShelf doesnt.We aim to provide a fully featured ebook server with minimal requirements, and no reliance on X whatsoever._ Follow or influence development @

Discord | IRC | Matrix.org

## Current Features * Recursive Scanning * Fast database access * [Django](https://www.djangoproject.com/) based frontend * Basic seaching via a SearchVector of author, title, & file_name fields. * Ebook Downloading * Collections ## Currently Supported Formats * epub * mobi ## 0.6.0 Patch Notes. # New Features * .mobi Yep mobis are now a thing! * Result set ordering * You can now choose to order your results: * Title * Author * Categories * & Tags * Reworked UI/UX * More intuitive, less intrusive, & stays out of the way. caveat: I need to rework the placement of the next & previous page controls. While they do remain usable, I intend to have them follow the users position on the page in future releases. ![pyShelf 0.6.0 navbar](https://github.com/th3r00t/pyShelf/raw/development/src/interface/static/img/navbar.png) * New controls * Sort * Ascending / Descending result set * Display of the result set count, and your current position in the set. * A pop over layer to hold things like * [ ] User login * [ ] Control panel * [ ] Book details * Whatever else :) ## Installation Example pyShelf Installation Video ## Further Installation & Support Information * [SUPPORT.md](https://github.com/th3r00t/pyShelf/blob/development/.github/SUPPORT.md) ### Pre-req Dependencies * gcc * python3 * pip # Installation This project is currently targeted towards Network Administrators, and other home enthusiasts whom I assume will know how to setup a [Django](https://www.djangoproject.com/) app, and a [PostgreSQL](https://www.postgresql.org/) server. Once your environment is ready very little is required to get the system up and running: * From the main directory * setup configurations as discussed in [SUPPORT.md](https://github.com/th3r00t/pyShelf/blob/development/.github/SUPPORT.md) * `pip install -r requirements.txt` * `cd src` * `python manage.py migrate` * `cd ..` * `./importbooks` * `./makecollections` * Browse to the site as defined in your apache | nginx config ## Installation & Support Information * [SUPPORT.md](https://github.com/th3r00t/pyShelf/blob/development/.github/SUPPORT.md) ## Development * [`pre-commit`](https://pre-commit.com/) _Before developing, run `pre-commit install` See the [documentation](https://pre-commit.com/) for more information._ * ['Doxygen'](http://www.doxygen.nl/) _Any changes to source should be documented and have run doxygen doxygen.conf prior to commiting._ * ['sem-ver'](https://semver.org) _Before advancing version numbers be sure to set PROJECT_NUMBER in doxygen.conf accordingly._ ## Configuration Running via the [Django](https://www.djangoproject.com/) test server might be possible, albeit not recomended. ## Docker The official Docker image for pyShelf is [`pyshelf/pyshelf`](https://hub.docker.com/r/pyshelf/pyshelf). The easiest way to get pyShelf running is through `docker-compose`. Here is an example `docker-compose.yml`: ``` version: "3.7" services: db: image: "postgres" environment: - "POSTGRES_PASSWORD=pyshelf" - "POSTGRES_USER=pyshelf" - "POSTGRES_DB=pyshelf" volumes: - "pgdata:/var/lib/postgresql/data/" pyshelf: image: "pyshelf/pyshelf" ports: - "8080:8000" volumes: - "${LOCAL_BOOK_DIR}:/books" depends_on: - db volumes: pgdata: ``` You'll also need a `.env` file wich sets the `LOCAL_BOOK_DIR` variable, for example: ``` LOCAL_BOOK_DIR=/home/someone/books ``` The Docker image is still new, so there could still be some issues and missing features. Feel free to create a bug-issue when you encounter a bug. Development of the Docker image is discussed in https://github.com/th3r00t/pyShelf/pull/53 . Currently the database needs to be [PostgreSQL](https://www.postgresql.org/) with the account details shown in the example `docker-compose.yml` . ## In Progress ### 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 - [x] .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 ### Terminal Backend for catalogue maintenance ### Calculate page count from total characters * (Thanks to @Fireblend for the idea) https://github.com/th3r00t/pyShelf/issues/3