Skip to content

Latest commit

 

History

81 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Book_Icon Library Project

Python Flask SQLite

Your personal online library

Library Project is a web application for storing and reading book PDFs on a server for a local network or personal device.

  • Upload books and search your library for specific titles, authors, or genres.
  • Abilities to add, delete, and update book information.
  • Upload custom book covers for further personalization.
  • View and read book PDFs from any device (including mobile) when hosted openly on a local network.
  • Bookmark a page and pick up right where you left off.
  • Easy local/offline use when ran directly on personal computer.

Motivation

I was inspired to make this project when I wanted the ability to digitalize my personal library. After tinkering with a Raspberry Pi, I was motivated to set up a server where I would have the ability to read my store of books from anywhere in my house.

Built With

  • Backend: Sqlite3, Flask, Python

  • Frontend: HTML, CSS, JS

  • PDF Handling: PDF.js, PyMuPDF

The project is built with flask and sqlite, PDF.js and PyMuPDF for PDF rendering and processing, with HTML jinja templates with JS for the frontend.

  1. Sqlite table stores filepaths of Book PDFs and covers, preserving fast speed.
  2. Flask routes for serving book information, saving and serving bookmarks, and more.

Setup

1. Clone the repository into working directory

git clone https://github.com/AustinN-Tech/Library_Project.git

2. Create virtual environment:

python -m venv .venv

3. Activate virtual environment

Linux/macOS:

source .venv/bin/activate

Windows:

.venv\Scripts\activate

4. Install required modules:

pip install -r requirements.txt

5. Run run.py:

python run.py

To have the database accessible to other devices on the local network and act as a local server, change this line in the run.py file:

app.run(debug=False)

to

app.run(host="0.0.0.0", port=5000, debug=False)

This allows other devices on the same local network to access the application, letting other devices access the same library webpage and books.

Usage

Library Project can be run on a host computer (such as a raspberry pi) for other devices on the network to access or it can be run locally on a single computer.
Read your favorite books on your laptop, desktop, or even your tablet on your bed.

Screenshots:

Screenshot 1: Laptop View, home screen

Screenshot 2: Laptop View, add book

Screenshot 3: Laptop View, read book

Note: This project was designed for personal devices or small local networks, it is not designed to be publicly deployed.

Raspberry Pi Deployment

Using a Raspberry Pi, it is easy to setup Library Project to act as personal library for devices on your local network.

Steps:

  1. Clone the git repository onto the Raspberry Pi, as shown in "Setup"
  2. Open flask to accept traffic from all devices on the network, as shown in "Setup"
  3. Start the run.py file directly in terminal or create a tmux session to manage the terminal process in the background

Roadmap

  • Mobile viewing
  • Page Saving
  • Multiple bookmarks per page
  • Favorite Books

Credits

About

Library Project is a web application for storing and reading book PDFs on a server for a local network or personal device.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages