Command-line library manager on SQLite. Search books, check them in/out, list active loans, and handle fines from a text menu.
- Python 3.10+
- Official Django release (At least ver 5.2.9)
- Packages:
sqlalchemy,pandas(sqlite3is stdlib)
Install extras:
pip install sqlalchemy pandas
python -m pip install Django- Hosted locally: http://127.0.0.1:8000/
database_normalizer.py– prompts for raw CSVs and normalizes them intonormalized_files/.database_creator.py– buildslibrary.dbfrom normalized CSVs.main.py– CLI entry point.db_*.py– feature modules (search, checkout, check-in, fines, loans, admin backdate).card_utils.py– normalizes Card IDs (acceptsID000123,000123, or123).
- Change directory to the location of baseGUI directory
cd baseGUImake sure to put the correct filepath to baseGUI
- Run python command: "python manage.py runserver" (make sure Django installed as at least above version)
python manage.py runserver- Go to a web browser (like Google Chrome, Firefox, etc.) and type:
http://127.0.0.1:8000/This will run the website locally.
- Prepare data (skip if
normalized_files/already exists):
python database_normalizer.py # follow prompts for books.csv (tab-separated) and borrowers.csv- Build the SQLite database:
python database_creator.py- Run the CLI :
python main.py1Search for Book: case-insensitive substring match on ISBN/Title/Author with availability.2Check Out Book: validates ISBN/card, max 3 active loans, no unpaid fines, and book availability.3Check In Book: search by ISBN, Card ID, or borrower name; pick entries to return.4Refresh Fines: recalculates fines for all late loans; leaves paid fines untouched.5View Fines: lists fines (optionally includes paid, marked(paid)).6Pay Fines: pays all unpaid fines for a Card ID if all fined books are returned.7List Checked Out Books: shows active loans, optionally filtered by Card ID.BBackdate Due Date (admin): set a new due date for the most recent loan of an ISBN.QQuit.
- Dates use
YYYY-MM-DD. - Fine rate is $0.25/day, rounded to cents. Paid fines are never overwritten when refreshing.
- Card IDs are normalized automatically to the
ID######format.