Remove stray ' character in initial message
[urlwatch.git] / share / man / man1 / urlwatch.1
blob1be63a8abd80706aeb08427475a2571c52a6e9e9
1 .TH URLWATCH "1" "August 2014" "urlwatch 1.17" "User Commands"
2 .SH NAME
3 urlwatch \- Watch web pages and arbitrary URLs for changes
4 .SH SYNOPSIS
5 .B urlwatch
6 [\fIoptions\fR]
7 .SH DESCRIPTION
8 urlwatch watches a list of URLs for changes and prints out unified
9 diffs of the changes. You can filter always-changing parts of websites
10 by providing a "hooks.py" script.
11 .SH OPTIONS
12 .TP
13 \fB\-\-version\fR
14 show program's version number and exit
15 .TP
16 \fB\-h\fR, \fB\-\-help\fR
17 show the help message and exit
18 .TP
19 \fB\-v\fR, \fB\-\-verbose\fR
20 Show debug/log output
21 .TP
22 \fB\-\-urls\fR=\fIFILE\fR
23 Read URLs from the specified file
24 .TP
25 \fB\-\-hooks\fR=\fIFILE\fR
26 Use specified file as hooks.py module
27 .TP
28 \fB\-e\fR, \fB\-\-display\-errors\fR
29 Include HTTP errors (404, etc..) in the output
30 .TP
31 \fB\-t\fR, \fB\-\-mailto\fR=\fIADDRESS\fR
32 Send results via e-mail to ADDRESS
33 .TP
34 \fB\-f\fR, \fB\-\-mailfrom\fR=\fIADDRESS\fR
35 Alternate From: address for e-mail (--mailto)
36 .TP
37 \fB\-s\fR, \fB\-\-smtp\fR=\fISERVER\fR
38 SMTP server for e-mail (--mailto)
39 .SH ADVANCED FEATURES
40 urlwatch includes some advanced features that you have to activate by creating
41 a hooks.py file that specifies for which URLs to use a specific feature. You
42 can also use the hooks.py file to filter trivially-varying elements of a web
43 page.
44 .SS ICALENDAR FILE PARSING
45 This module allows you to parse .ics files that are in iCalendar format and
46 provide a very simplified text-based format for the diffs. Use it like this
47 in your hooks.py file:
49   from urlwatch import ical2txt
51   def filter(url, data):
52       if url.endswith('.ics'):
53           return ical2txt.ical2text(data).encode('utf-8') + data
54       # ...you can add more hooks here...
55 .SS HTML TO TEXT CONVERSION
56 There are three methods of converting HTML to text in the current version of
57 urlwatch: "lynx" (default), "html2text" and "re". The former two use
58 command-line utilities of the same name to convert HTML to text, and the last
59 one uses a simple regex-based tag stripping method (needs no extra tools).
60 Here is an example of using it in your hooks.py file:
62   from urlwatch import html2txt
64   def filter(url, data):
65       if url.endswith('.html') or url.endswith('.htm'):
66           return html2txt.html2text(data, method='lynx')
67       # ...you can add more hooks here...
68 .SH "FILES"
69 .TP
70 .B ~/.urlwatch/urls.txt
71 A list of HTTP/FTP URLs to watch (one URL per line)
72 .TP
73 .B ~/.urlwatch/lib/hooks.py
74 A Python module that can be used to filter contents
75 .TP
76 .B ~/.urlwatch/cache/
77 The state of web pages is saved in this folder
78 .SH AUTHOR
79 Thomas Perl <thp.io/about>
80 .SH WEBSITE
81 http://thp.io/2008/urlwatch/