From b70d99618fab96d0ab203c55d36d0fea2fa65a68 Mon Sep 17 00:00:00 2001 From: Lynne Date: Tue, 13 Nov 2018 13:41:33 +1000 Subject: [PATCH 1/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a14bab7..5bdc913 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ hey look it's an ebooks bot python3 -install the requirements with `sudo pip3 install -r requirements` +install the requirements with `sudo pip3 install -r requirements.txt` make a bot (probably on bots in space) and follow the target accounts From e6a30416a06a10f0fb1d22c38312f50031508aaa Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Wed, 14 Nov 2018 00:38:07 -0600 Subject: [PATCH 2/4] Add a Dockerfile. --- Dockerfile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..eba278f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM python:3-alpine + +ADD requirements.txt /ebooks/ + +WORKDIR /ebooks/ +VOLUME /ebooks/data/ + +RUN apk add --virtual .build-deps gcc musl-dev libffi-dev openssl-dev \ + && pip install -r requirements.txt \ + && apk del --purge .build-deps \ + && ln -s data/config.json . \ + && ln -s data/toots.db . + +ADD *.py /ebooks/ + +RUN (echo "*/30 * * * * cd /ebooks/ && python gen.py"; \ + echo "5 */2 * * * cd /ebooks/ && python main.py"; \ + echo "@reboot cd /ebooks/ && python reply.py") | crontab - + +ENV ebooks_site=https://botsin.space + +CMD (test -f data/config.json || echo "{\"site\":\"${ebooks_site}\"}" > data/config.json) \ + && (test -f data/toots.db || (python main.py && exit)) \ + && exec crond -f -L /dev/stdout From b9736c71326aa2c597f120a3dd63743f5524b14d Mon Sep 17 00:00:00 2001 From: Lynne Date: Mon, 26 Nov 2018 15:46:19 +1000 Subject: [PATCH 3/4] use new link for ebooks guide thingy --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5bdc913..fdbc0d0 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This version makes quite a few changes from [the original](https://github.com/Je - Doesn't unecessarily redownload all toots every time ## Install/usage guide -An installation and usage guide is available for unix-based platforms (linux, macOS...) [here](https://cloud.lynnesbian.space/s/Qxxm2sYdMZaqWat). +An installation and usage guide is available for unix-based platforms (linux, macOS...) [here](https://cloud.lynnesbian.space/s/jozbRi69t4TpD95). ## Original README hey look it's an ebooks bot From 570f7d265e85359dc041965a851ae1ded04cf21d Mon Sep 17 00:00:00 2001 From: Lynne Date: Mon, 26 Nov 2018 15:47:34 +1000 Subject: [PATCH 4/4] better description for the guide --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fdbc0d0..45ddcb0 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This version makes quite a few changes from [the original](https://github.com/Je - Doesn't unecessarily redownload all toots every time ## Install/usage guide -An installation and usage guide is available for unix-based platforms (linux, macOS...) [here](https://cloud.lynnesbian.space/s/jozbRi69t4TpD95). +An installation and usage guide is available [here](https://cloud.lynnesbian.space/s/jozbRi69t4TpD95). It's primarily targeted at Linux, but it should be possible on BSD, macOS, etc. I've also put some effort into providing steps for Windows, but I can't make any guarantees as to its effectiveness. ## Original README hey look it's an ebooks bot