Merge branch 'master' of https://github.com/Lynnesbian/mstdn-ebooks
This commit is contained in:
commit
978308736a
|
@ -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
|
|
@ -8,14 +8,14 @@ This version makes quite a few changes from [the original](https://github.com/Je
|
||||||
- Doesn't unecessarily redownload all toots every time
|
- Doesn't unecessarily redownload all toots every time
|
||||||
|
|
||||||
## Install/usage guide
|
## 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 [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
|
## Original README
|
||||||
hey look it's an ebooks bot
|
hey look it's an ebooks bot
|
||||||
|
|
||||||
python3
|
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
|
make a bot (probably on bots in space) and follow the target accounts
|
||||||
|
|
||||||
|
|
Reference in New Issue