Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/revolter/dexrobot

Telegram Bot that searches definitions for Romanian words using dexonline.ro
https://github.com/revolter/dexrobot

bot python python3 telegram telegram-bot

Last synced: 15 days ago
JSON representation

Telegram Bot that searches definitions for Romanian words using dexonline.ro

Awesome Lists containing this project

README

        

# Dex Bot

## Introduction

Telegram Bot that uses [dexonline.ro](https://dexonline.ro)'s API to search
Romanian words definitions. The bot currently runs as
[@DexRoBot](https://t.me/DexRoBot).

### Main functionality

Main screenshot 1Main screenshot 2Main screenshot 3

### Toggle links feature

Toggle links screenshot 1Toggle links screenshot 2Toggle
<br />links screenshot 3

### Word of the day feature

Word of the day screenshot

## Getting Started

These instructions will get you a copy of the project up and running on your
local machine for development and testing purposes.

### Prerequisites

You need to install [Homebrew](https://brew.sh) by running:

```sh
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```

### Installing

Clone the project and install the dependencies by running:

```sh
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:

```sh
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.

## Deploy

You can easily deploy this to a cloud machine using
[Fabric](http://fabfile.org):

```
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`.