/ERPBot

Primary LanguagePython

SADABot

address of bot: https://telegram.me/guilan_sada_bot

How to run

  1. Install python(3), pip, virtualenv, MySQL, phantomjs (add it to path variable) in your system.
  2. Clone the project https://github.com/armgham/ERPBot.
  3. Make development environment ready using commands below;
git clone https://github.com/armgham/ERPBot && cd ERPBot
virtualenv .venv
source .venv/bin/activate
pip install -r requirements.txt
  1. in the app folder, rename the config.py.sample to config.py and do proper changes.
  2. db configs are in config.py. Create the db and grant all access to the specified user with specified password.
  3. Run python app/app.py

Run On Windows

If You're On A Windows Machine , Make Environment Ready By Following Steps Below:

  1. Install python(3), pip, virtualenv, MySQL, phantomjs (add it to path variable).
  2. Clone the project using: git clone https://github.com/armgham/ERPBot.
  3. Make Environment Ready Like This:
cd ERPBot
virutalenv -p "PATH\TO\Python.exe" build # Give Full Path To python.exe
build\Scripts\activate # Activate The Virutal Environment
pip install -r requirements.txt
  1. in the app folder, rename the config.py.sample to config.py and do proper changes.
  2. db configs are in config.py. Create the db and grant all access to the specified user with specified password.
  3. Run python app/app.py

Example of creating db and granting access:

Note: this is just a sample. You have to find your own systems commands.

create database sadasql;
create user 'sadasql'@'localhost' identified by 'sadasql';
grant all privileges on sadasql.* to 'sadasql'@'localhost';
flush privileges;
use sadasql;

create table USER_DATA (user_id INT, data VARCHAR(10000));
create table CHAT_DATA (chat_id INT, data VARCHAR(100));
create table CONVERSATIONS (conversation_name VARCHAR(50));
create table PROXY (proxy VARCHAR(50));

TODO

  • flush command handler
  • fix bugs! (when press get the edited table first time, ...)
  • make phantomjs lighter and faster
  • send logs to users.
  • handle urllib3.connection.HTTPConnection(urllib3.exceptions.ProtocolError) error
  • find a way for debtor students
  • use requests for web-scrapping
  • memory management while using matplotlib
  • add_proxy command to use Iran_proxy_server (or pptp vpn) (to remove proxy use /addproxy without argument).
  • add button to select other terms!
  • show error of connection to user. (without Iran_proxy:[x] or maybe with proxy:[ ])
  • handle 'time_column_index' problem. (when table is empty)
  • show error of evalution
  • add a feature to fill evalList
  • add a command to switch between http and https(https: /sp s, http: /sw)