songy

telegram bot as a songbook
git clone git://git.relim.de/songy.git
Log | Files | Refs | README | LICENSE

commit d37b280847f08a02fbce09560d4f4ea50818b0be
parent 99182755e5e58e07871b412a168e39fdfabbf906
Author: Robin <kroekerrobin@gmail.com>
Date:   Sat, 11 Feb 2023 22:58:15 +0100

Add README.md

Diffstat:
A.editorconfig | 7+++++++
AREADME.md | 35+++++++++++++++++++++++++++++++++++
Dsrc/.editorconfig | 3---
3 files changed, 42 insertions(+), 3 deletions(-)

diff --git a/.editorconfig b/.editorconfig @@ -0,0 +1,7 @@ +[*.rs] +indent_style = tab +indent_size = 2 + +[README.md] +indent_style = tab +indent_size = 2 diff --git a/README.md b/README.md @@ -0,0 +1,35 @@ +# songs + +This is a telegram bot written in [rust](https://www.rust-lang.org/) using the [frankenstein](https://github.com/ayrat555/frankenstein) telegram bot library. + +## what does it do? + +This bot provides an interface to files. It is meant to be used as a digital songbook. + +## installation + +1. Download the [latest release](https://github.com/devrobinkroeker/songs/releases) executable +2. Decide about the configuration + 1. [Create a telegram bot](https://telegram.me/BotFather) to obtain the bot api token (--token) + 2. Which language do you want the bot to speak? english, german or moldovan (--lang) + 3. Where do you store the files that the bot uses? (--songs-path) +3. Start the bot: `./songs --token <api_token> --lang <en|de|md> --songs-path <full/path/to/songs/folder>` + +### setup systemd service under linux + +As the bot has to run endlessly you probably want to create some sort of background service. Here's a simple solution I use. + +1. `sudo touch /etc/systemd/system/songs.service` +2. Copy this into `songs.service` +``` +[Unit] +Description=Digital song book + +[Service] +ExecStart=/full/path/to/songs/executable --token <api_token> --songs-path <full/path/to/songs/folder> --lang <en|de|md> +Restart=on-failure + +[Install] +WantedBy=default.target +``` +3. `systemctl start songs` diff --git a/src/.editorconfig b/src/.editorconfig @@ -1,3 +0,0 @@ -[*.rs] -indent_style = tab -indent_size = 2