Skip to content

Personal Library Manager is a Python-based command-line tool that helps users manage their book collection. It allows adding, removing, searching, and displaying books, along with tracking reading progress. The app uses JSON file handling to save data persistently, so your library remains intact across sessions.

Notifications You must be signed in to change notification settings

Aligadit1/Library-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Personal Library Manager

πŸ“– About the Project

The Personal Library Manager is a command-line application that allows users to manage their personal book collection. With this tool, users can add, remove, search, and display books while also tracking their reading progress. The library data is saved persistently using JSON file handling to ensure that books remain stored even after the program is closed.

πŸ›  Features

βž• Add a book: Users can add new books by entering the title, author, publication year, genre, and read status.

πŸ—‘οΈ Remove a book: Users can remove a book from the library, with a confirmation step for unread books.

πŸ” Search for books: Books can be searched by title or author.

πŸ“š Display all books: Shows all books stored in the library along with details such as author, publication year, genre, and read status.

πŸ“Š View library statistics: Displays the total number of books and the percentage of books read.

πŸšͺ Persistent storage: Uses JSON file handling to save and load books from a file (library.txt).

πŸ“‚ Project Structure

|-- library.txt # JSON file storing the book data |-- library_manager.py # Python script for managing the library

πŸš€ How to Run the Project

Prerequisites

Install Python 3.x on your system.

Running the Program

Clone the repository:

git clone https://github.com/your-username/personal-library-manager.git cd personal-library-manager

Run the script:

python library_manager.py

πŸ“œ How It Works

The program loads the existing book data from library.txt.

The user is presented with a menu to choose an action.

The selected operation is performed (adding, removing, searching, displaying books, or viewing statistics).

The updated library is saved back to library.txt before exiting.

πŸ’Ύ Data Storage

The library data is stored in library.txt using JSON format.

Each book entry has the following structure:

[ { "title": "Book Title", "author": "Author Name", "publication_year": 2024, "genre": "Fiction", "read_status": true } ]

🎯 Example Usage

πŸŽ‰ Welcome to your Personal Library Manager! 1️⃣ βž• Add a book 2️⃣ πŸ—‘οΈ Remove a book 3️⃣ πŸ” Search for a book 4️⃣ πŸ“š Display all books 5️⃣ πŸ“ˆ Display statistics 6️⃣ πŸšͺ Exit and Save Enter your choice (1-6): 1 Enter book name: The Alchemist Enter writer name: Paulo Coelho Enter publication year: 1988 Enter genre: Fiction Have you read it? (yes/no): yes

βœ… Book added successfully!

πŸ›  Technologies Used

Python (for implementing the functionality)

JSON (for storing and retrieving data persistently)

πŸ“Œ Future Enhancements

Add a feature to update book details.

Implement a category-wise listing of books.

Create a graphical user interface (GUI) using Tkinter or PyQt.

Export book lists to a CSV file.

🀝 Contributing

If you'd like to contribute:

Fork the repository.

Create a new branch (git checkout -b feature-branch).

Commit your changes (git commit -m "Add new feature").

Push to the branch (git push origin feature-branch).

Open a pull request.

πŸ“ž Contact

If you have any questions, feel free to reach out via GitHub Issues!

Happy coding! πŸš€πŸ“š

About

Personal Library Manager is a Python-based command-line tool that helps users manage their book collection. It allows adding, removing, searching, and displaying books, along with tracking reading progress. The app uses JSON file handling to save data persistently, so your library remains intact across sessions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages