URLWATCH-INTRO(7)
π NAME π
okay so bestie, this is urlwatch-intro β literally the intro to basic urlwatch usage π like your little welcome mat into the whole urlwatch universe.
β¨ QUICK START β¨
here's the get-you-going checklist, do these in order and you're iconic:
- Run
urlwatchonce to migrate your old data or start fresh - Use
urlwatch --editto customize jobs and filters (urls.yaml) - Use
urlwatch --edit-configto customize settings and reporters (urlwatch.yaml) - Add
urlwatchto your crontab (crontab -e) to monitor webpages periodically
the checking interval is defined by how often you run urlwatch. no cap, that's the whole thing. you can use e.g. crontab.guru (https://crontab.guru) to figure out the schedule expression for the checking interval, and we recommend not more often than 30 minutes (this would be */30 * * * *). if you have never used cron before, check out the crontab command help (https://www.computerhope.com/unix/ucrontab.htm) π«Ά
on Windows, cron is not installed by default. use the Windows Task Scheduler (https://en.wikipedia.org/wiki/Windows_Task_Scheduler) instead, or see this StackOverflow question (https://stackoverflow.com/q/132971/1047040) for alternatives π
πΈ HOW IT WORKS πΈ
every single time you run urlwatch(1), it does this lil routine:
- retrieves the output of each job and filters it
- compares it with the version retrieved the previous time ("diffing")
- if it finds any differences, it invokes enabled reporters (e.g. text reporter, e-mail reporter, ...) to notify you of the changes
it's giving glow-up-check but for webpages ππ₯
π JOBS AND FILTERS π
each website or shell command to be monitored constitutes a "job".
the instructions for each such job are contained in a config file in the YAML format (https://yaml.org/spec/). if you have more than one job, you separate them with a line containing only ---.
you can edit the job and filter configuration file using:
urlwatch --edit
if you get an error, set your $EDITOR (or $VISUAL) environment variable in your shell, for example:
export EDITOR=/bin/nano
while you can edit the YAML file manually, using --edit will do sanity checks before activating the new configuration file. it's the responsible queen move π
π¦ Kinds of Jobs π¦
each job must have exactly one of the following keys, which also defines the kind of job:
urlretrieves what is served by the web server (HTTP GET by default),navigateuses a headless browser to load web pages requiring JavaScript, andcommandruns a shell command.
each job can have an optional name key to define a user-visible name for the job.
you can then use optional keys to finely control various job's parameters.
see urlwatch-jobs(5) for detailed information on job configuration. iykyk β¨
π Filters π
you may use the filter key to select one or more Filters to apply to the data after it is retrieved, for example to:
- select HTML:
css,xpath,element-by-class,element-by-id,element-by-style,element-by-tag - make HTML more readable:
html2text,beautify - make PDFs readable:
pdf2text - make JSON more readable:
format-json - make iCal more readable:
ical2text - make binary readable:
hexdump - just detect changes:
sha1sum - edit text:
grep,grepi,strip,sort,striplines
these filters can be chained. as an example, after retrieving an HTML document by using the url key, you can extract a selection with the xpath filter, convert this to text with html2text, use grep to extract only lines matching a specific regular expression, and then sort them:
name: "Sample urlwatch job definition"
url: "https://example.dummy/"
https_proxy: "http://dummy.proxy/"
max_tries: 2
filter:
- xpath: '//section[@role="main"]'
- html2text:
method: pyhtml2text
unicode_snob: true
body_width: 0
inline_links: false
ignore_links: true
ignore_images: true
pad_tables: false
single_line_break: true
- grep: "lines I care about"
- sort:
---
see urlwatch-filters(5) for detailed information on filter configuration π
π«Ά REPORTERS π«Ά
urlwatch can be configured to do something with its report besides (or in addition to) the default of displaying it on the console.
reporters are configured in the global configuration file:
urlwatch --edit-config
examples of reporters:
- email (using SMTP)
- email using mailgun
- slack
- discord
- pushbullet
- telegram
- matrix
- pushover
- stdout
- xmpp
- shell
see urlwatch-reporters(5) for reporter configuration options π
β SEE ALSO β
urlwatch(1), urlwatch-jobs(5), urlwatch-filters(5), urlwatch-config(5), urlwatch-reporters(5), cron(8)
π COPYRIGHT π
2024 Thomas Perl
and that's the whole page bestie π this was urlwatch documentation, dated Oct 28, 2024 β go forth and monitor, no cap πΈππ¦
π¦ where this page comes from
- arch rolling: urlwatch 2.29-4 Β· BSD-3-Clause
- debian trixie: urlwatch 2.29-1 Β· BSD-3-Clause
- fedora 43: urlwatch 2.29-3.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: urlwatch 2.29-4.fc44 Β· LicenseRef-Callaway-BSD
- nixos 26.05: urlwatch 2.29
- nixpkgs unstable: urlwatch 2.29
- ubuntu questing: urlwatch 2.29-1
- ubuntu resolute: urlwatch 2.29-1build1 Β· BSD-3-Clause
- ubuntu stonking: urlwatch 2.29-1build1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms