From aae03b51ee3dc070455cd04a723e6e868bcbbe73 Mon Sep 17 00:00:00 2001 From: Alvie Rahman Date: Fri, 19 Mar 2021 14:32:40 +0000 Subject: [PATCH] update start script, readme --- .gitignore | 5 +---- readme.md | 11 +++++++++++ start.sh | 7 +++++++ 3 files changed, 19 insertions(+), 4 deletions(-) create mode 100755 start.sh diff --git a/.gitignore b/.gitignore index 3be968b..36c8cca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,4 @@ -config.json -tasks.json -db.json +config env __pycache__ -start.sh *.swp diff --git a/readme.md b/readme.md index 76069ce..349eb7e 100644 --- a/readme.md +++ b/readme.md @@ -3,3 +3,14 @@ under heavy development you must have a redis server installed + +## running +1. `python3 -m venv env` + +1. Create `config` file: + + ```bash + TOKEN="telegram bot token from bot father" + ``` + +1. `bash start.sh` diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..ae14667 --- /dev/null +++ b/start.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +source config + +# source env if not in docker container +[[ `grep 'docker' /proc/self/cgroup` ]] && source env/bin/activate +python src/bot.py "$TOKEN"