From d95fa1e048bf5528becc22eaa363d893d52ffd22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Tue, 2 Oct 2018 16:16:30 +0200 Subject: [PATCH] more cleanups --- delojza.py | 2 +- robot.sh | 2 +- update.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/delojza.py b/delojza.py index 480ec82..155db19 100755 --- a/delojza.py +++ b/delojza.py @@ -215,7 +215,7 @@ def main(): with open("initial.txt") as f: text = f.read() markov = markovify.NewlineText(text.lower()) - print(markov.make_sentence()) + logger.info("Sentence of the day: " + markov.make_sentence()) updater = Updater("***REMOVED***") diff --git a/robot.sh b/robot.sh index 7981c3a..2d8e617 100755 --- a/robot.sh +++ b/robot.sh @@ -2,5 +2,5 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd ${DIR} ./update.sh & -source ./venv/bin/activate +source ./.venv/bin/activate python3 delojza.py 2>&1 |tee -a delojza.log diff --git a/update.sh b/update.sh index efe7ba1..d89e9f4 100755 --- a/update.sh +++ b/update.sh @@ -2,6 +2,6 @@ while :;do NUM=$( grep 'INFO - Downloading' delojza.log|wc -l) echo $NUM - curl -s 'kunsaxan.sdbs.cz/counter.php?key=delojza7953713b19ef2ea055156c8dc175bf80&count='$NUM + curl -s 'https://kunsaxan.sdbs.cz/counter.php?key=delojza7953713b19ef2ea055156c8dc175bf80&count='$NUM sleep 300; done