Skip to content

Borislavv/translator-telegram-bot

Repository files navigation

Translator-telegram-bot

Author: Glazunov Boris

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

Email: glazunov2142@gmail.com | 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 (optional, you can run you app with binary file), but you will need to run migrations, then install it.

  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

About

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

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages