summaryrefslogtreecommitdiff
path: root/config_template.py
blob: f394e527c1bcfc28f7bc58464f40dcf1d092948b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import os.path

# Copyright: (2013-2014) Michael Till Beck <Debianguru@gmx.de>
# License: GPL-2.0+

#We collect xpath snippets at this place: <a href="https://github.com/Debianguru/MailWebsiteChanges/wiki/snippets">Snippet collection</a> - please feel free to add your own definitions!

sites = [

          {'shortname': 'mywebsite1',
           'uri': 'http://www.mywebsite1.com/info',
           'type': 'html',
           'titlexpath': '//h1',
           'contentxpath': '//div',
           'titleregex': '',
           'contentregex': '',
           'user-agent': 'Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0',
           'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
           'encoding': 'utf-8'},

          {'shortname': 'mywebsite2',
           'uri': 'http://www.mywebsite2.com/info',
           'type': 'html',
           'contentxpath': '//*[contains(concat(\' \', normalize-space(@class), \' \'), \' news-list-container \')]',
           'regex': '',
           'encoding': 'utf-8'},

          {'shortname': 'mywebsite3',
           'uri': 'http://www.mywebsite3.com/info',
           'type': 'text',
           'contentxpath': '',
           'contentregex': 'Version\"\:\d*\.\d*',
           'encoding': 'utf-8'},

          {'shortname': 'lscmd',
           'uri': 'cmd://ls -l /home/pi',
           'contentregex': '.*Desktop.*'
          }

]

subjectPostfix = 'A website has been updated!'

enableMailNotifications = True
maxMailsPerSession = -1
sender = 'me@mymail.com'
smtphost = 'mysmtpprovider.com'
useTLS = True
smtpport = 587
smtpusername = sender
smtppwd = 'mypassword'
receiver = 'me2@mymail.com'

os.chdir('/var/cache/mwc')

enableRSSFeed = True
rssfile = 'feed.xml'
maxFeeds = 100