Telegram Bot that uses dexonline.ro's API to search Romanian words definitions. The bot currently runs as @DexRoBot.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You need to install Homebrew by running:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Clone the project and install the dependencies by running:
cd /desired/location/path
git clone https://github.com/revolter/DexRoBot.git
cd DexRoBot
curl https://pyenv.run | bash
export PATH="$HOME/.pyenv/bin:$PATH"
sudo apt update
sudo apt install make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
pyenv install 3.9.0
pyenv global 3.9.0
curl -sSL https://install.python-poetry.org | python -
poetry shell
poetry install
cd src
cp config_sample.cfg config.cfg
On Linux, you might need to install the development package of Python by running:
sudo apt install python3-dev
before trying to install the dependencies using pipenv
.
Then, edit the file named config.cfg
inside the src
folder with the correct
values and run it using ./main.py --debug
.
Use exit
to close the virtual environment.
You can easily deploy this to a cloud machine using Fabric:
cd /project/location/path
poetry shell
cp fabfile_sample.cfg fabfile.cfg
Then, edit the file named fabfile.cfg
inside the root folder with the correct
values and run Fabric using:
fab setup
fab deploy
You can also deploy a single file using fab deploy --filename=main.py
or fab deploy --filename=pyproject.toml
.