Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/borislavv/translator-telegram-bot

Translator telegram bot (en to ru and back, automaticaly detected), can store and send notifications, has a simple dashboard and CLI interface.
https://github.com/borislavv/translator-telegram-bot

architecture css docker docker-compose go golang grpc-server http-server js json mysql telegram telegram-bot tests translator

Last synced: 18 days ago
JSON representation

Translator telegram bot (en to ru and back, automaticaly detected), can store and send notifications, has a simple dashboard and CLI interface.

Awesome Lists containing this project

README

        

# Translator-telegram-bot

**Author**: Glazunov Boris

**Github**: github.com/Borislavv **|**
**Gitlab**: gitlab.com/Zendden

**Email**: [email protected] **|**
**Phone**: +7(904)-939-89-83 (Telegram)

# Installation and running (Actual)

1. Choose the target configuration file and fill it. Config files path: `root_app_dir/config` and also you need fill the .env.

2. Install the Docker (with compose, if you building it from source) if you have not.

3. Change directory to the project root.

4. Build images if you didn't it before and up containers:

    [Build and Up]: docker-compose up --build

    [Just Up]: docker-compose up

5. Now, you can use the bot and his lounch dashboard on http://localhost:8000/.

# Installation and running (Legacy)

1. Choose the target configuration file and fill it. Config files path: `root_app_dir/config`.

2. Install [golang](https://go.dev/doc/install) (optional, you can run you app with binary file), but you will need to run [migrations](https://github.com/golang-migrate/migrate), then install [it](https://github.com/golang-migrate/migrate/blob/master/cmd/migrate/README.md).

3. Migrations (database in: `utf8_general_ci`):

    UP : `migrate -database "mysql://user:pass@tcp(localhost:3306)/translatortelegrambot" -path migrations up`

    Down: `migrate -database "mysql://user:pass@tcp(localhost:3306)/translatortelegrambot" -path migrations down`

4. Compile executable file run it or just run the code (in the second case, binary file will be compiling and remove after all):

    4.1 Compile and run:

        Compiling:

            - `cd cmd/app`

            - `go build`

        Runnig:

            - `./main --config-path ./../../config/.env.dev.toml`

    4.2. Run without compiling (actualy 'with', but you will not see it):

        Running:

            - `go run cmd/app/main.go --config-path config/.env.dev.toml`