git clone https://github.com/alfieyfc/twro-rss.git
cd twro-rss/
touch news_record.txt
python main.py
docker run -v `pwd`/news_record.txt:/data/news_record.txt alfieyfc/twro-rss
You may change Timezone of your workload if that's what you want
# Dockefile
# Change timezone ENV if needed
ENV TZ=Asia/Taipei
docker build -t <IMAGE_NAME>[:TAG] .
docker run -v `pwd`/news_record.txt:/data/news_record.txt IMAGE_NAME:TAG
You may want to set up a crontab to check for news to feed every few minutes or so. I'm using Kubernetes CronJob for this. You should adjust to your own needs.
Edit cronjob.yaml
with your Line Notify token:
- env:
- name: LINE_TOKEN
value: __YOUR_TOKEN__
Edit cron schedule to your needs:
# Every 1, 6, 11, 16, 21, 26, 31, 36, 41, 46, 51 and 56th minute past every hour
schedule: 1/5 * * * *
kubectl apply -f cronjob.yaml
If directly using the YAML file from this repo, you will have to create your own Persistent Volume and bound pvc/twro-rss-pvc
to the PV. See docs for more info.