1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-27 09:18:43 +00:00
dockerfiles/urlwatch/README.md

85 lines
1.8 KiB
Markdown
Raw Normal View History

2015-07-07 07:44:11 +00:00
urlwatch
========
2015-07-07 09:06:08 +00:00
[urlwatch][1] is a tool for monitoring webpages for updates.
```
cron: triggered every 15 minutes
2015-07-07 09:44:22 +00:00
-> make: generate urls.txt from urls.yml
-> urlwatch: fetch webpages
-> hooks.py: extract info
-> email: send via smtp
-> (^_^)
2015-07-07 09:06:08 +00:00
```
2015-07-07 07:44:11 +00:00
2015-07-07 08:04:30 +00:00
## docker-compose.yml
2015-07-07 09:44:22 +00:00
```
2015-07-07 08:04:30 +00:00
urlwatch:
image: vimagick/urlwatch
volumes:
- urlwatch/Makefile:/root/.urlwatch/Makefile
- urlwatch/urls.yml:/root/.urlwatch/urls.yml
restart: always
```
## Makefile
2015-07-07 11:16:15 +00:00
```
SHELL = /bin/sh
2015-07-07 08:04:30 +00:00
PATH := /usr/local/bin:$(PATH)
2016-05-01 01:06:20 +00:00
SMTP = smtp.easypi.info:587
FROM = urlwatch@easypi.info
2015-07-07 08:04:30 +00:00
PASS = password
2016-05-01 01:06:20 +00:00
TO = noreply@easypi.info
2015-07-07 08:04:30 +00:00
all: setup urls.txt
urlwatch -s $(SMTP) -f $(FROM) -t $(TO) -A -T
urls.txt: urls.yml
python lib/hooks.py
setup:
python -c 'import keyring; keyring.set_password("$(SMTP)", "$(FROM)", "$(PASS)")'
```
2015-07-07 09:06:08 +00:00
> Please change `STMP`/`FROM`/`PASS`/`TO` to correct value.
2015-07-07 08:04:30 +00:00
## urls.yml
2015-07-07 09:44:22 +00:00
```
2015-07-07 08:04:30 +00:00
python:
url: https://www.python.org/downloads/
exp: //div[@class="download-unknown"]/p[@class]/a[1]/text()
ubuntu:
url: http://www.ubuntu.com/download/server
exp: //div[contains(@class, "row-hero")]//h2/text()
2015-07-08 03:34:43 +00:00
coreos:
url: https://coreos.com
exp: //div[@class="co-p-homepage-release-text"]/text()
2015-07-07 08:04:30 +00:00
urlwatch:
url: https://github.com/thp/urlwatch/releases
exp: //ul[@class="release-timeline-tags"]/li[1]//span[@class="tag-name"]/text()
```
2015-07-08 03:34:43 +00:00
## Email alert
```
***************************************************************************
CHANGED: https://coreos.com#coreos
***************************************************************************
--- @ Tue, 07 Jul 2015 17:15:01 +0000
+++ @ Tue, 07 Jul 2015 20:00:01 +0000
@@ -1 +1 @@
-coreos: 723.1.0
+coreos: 735.0.0
***************************************************************************
```
2015-07-07 07:44:11 +00:00
[1]: thp.io/2008/urlwatch/