Skip to content

Animatory/LibraryHelpBot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

338 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Library Help Bot


Purpose of the application

This is the implementation of Library Management System (LMS). LMSs are used in libraries to track the different items in the library. The system contains all information about books, magazines, audio/video materials, as well as people allowed to check out the materials or those in charge of the management. LMS is implemented as a Telegram bot.

How it works

  1. Bot package sends request to Telegram via API and as a response it gets messages from users exploiting the bot.
  2. Bot analyzes the response and sends commands to the controller which executes the command and makes according changes in the database.

Dependencies

  • python
  • python-telegram-bot
  • pytest
  • sqlite3

Installation

Requirements
  1. python3
  2. pip3
  3. git
Preparing
  1. Install all libraries stated in the requirements.txt by typing the command below in command line.
    pip3 install -r requirements.txt
  1. Install MariaDB from official site
  2. Downlaod the repository from Github
  • First way is to download zip archive and then unzip it to the work directory.
  • Second way is to clone repository to the work directory via
    git clone https://github.com/LibrinnoTeam/LibraryHelpBot.git
  1. Change password in database-schema.sql
  2. Execute database-schema.sql in MariaDB
    source path/to/work/directory/AdminSite/database-schema.sql
  1. Create file configs.py in work directory
    token                  = '*' # Token for telegram bot https://core.telegram.org/bots
    site_login_databse     = 'admin_site' # login for MariaDB
    site_password_database = '*' # password for MariaDB
    site_database          = 'librarian_site' # Name of Database in MariaDB
Running
  1. To run the application with default parameters just typing the command below in command line.
   python3 main.py
  1. General view of the command that starts a bot
    python3 main.py -t -c --log_file=<filelog> --database=<filedb> --cleanup_database
  • Argument -t means that the command runs the tests
  • Argument -c means that the application will write logs into console
  • Argument --log_file= means that the application will write logs into file with name in parameter
  • Argument --database= means that the application will use bd in file with name in parameter
  • Argument --cleanup_database means that the application will drop tables in database

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 68.5%
  • JavaScript 23.2%
  • HTML 4.3%
  • CSS 4.0%