The Intelligent Multi-User Library Platform is a Python-based application that allows users to manage personal libraries, share books in a public library, and provides an admin panel for managing users and their libraries. This system is designed for both individual and collaborative use, making it suitable for personal collections or shared library management.
- Registration: Create user accounts with secure password storage.
- Login: Authenticate users to access personal libraries.
- Admin Access: Manage all users and libraries with a root password.
- Personal Library:
- Add, delete, search, and list books.
- Public Library:
- Share books with the public, search and manage public collections.
- View and manage all registered users.
- Delete user accounts and their associated libraries.
- Python 3.7 or higher(for shlex)
shlex
,hashlib
, andjson
(default Python modules)
-
Clone the repository:
git clone https://github.com/zprolab/knowlib.git cd knowlib
-
Run the program:
python library.py [...]
-
On the first run, you will be prompted to set up an admin/root password.
-
Register:
register <username> <password>
Create a new user account. -
Login:
login <username> <password>
Access your personal library. -
Personal Library Operations:
add <title> <author>
: Add a book to your library.search <keyword>
: Search for books in your library.delete <title>
: Remove a book from your library.list
: List all books in your library.
add_public <title> <author>
: Add a book to the public library.search_public <keyword>
: Search for books in the public library.delete_public <title>
: Remove a book from the public library.list_public
: List all books in the public library.
admin_login <password>
: Log in as admin.list_users
: List all registered users.view_user_library <username>
: View a specific user's library.delete_user <username>
: Delete a user account and their library.
help
: Display the list of available commands.exit
: Save all changes and exit the program.
The system is structured into the following classes:
- Library: Manages personal libraries.
- PublicLibrary: Handles shared public book collections.
- UserManager: Provides user account management and secure authentication.
- AdministratorManager: Enables root-level management tools.
- LibraryShell: The main command-line interface for user interaction.
- Passwords are hashed using SHA-256 for secure storage.
- Separate data files are maintained for user accounts, admin credentials, and public library data.
- User Data: Stored in
dynamic/library_data.json
. - Public Library: Stored in
dynamic/public_library_data.json
. - Admin Credentials: Stored in
dynamic/admin_data.json
.
- Fork the repository.
- Create a feature branch:
git checkout -b username/new-feature
- Commit your changes:
git commit -m "Add new feature"
- Push the branch:
git push origin username/new-feature
- Open a pull request and call !
This project is licensed under the MIT License. See the LICENSE
file for details.