With this urls.yaml:
name: Firefox for Android
command: "curl -s -I -o /dev/null -w '%{redirect_url}' 'https://download.mozilla.org/?product=fennec-latest&os=android&lang=multi'"
urlwatch produces:
===========================================================================
01. NEW: Firefox for Android
===========================================================================
---------------------------------------------------------------------------
NEW: Firefox for Android (curl -s -I -o /dev/null -w '%{redirect_url}' 'https://download.mozilla.org/?product=fennec-latest&os=android&lang=multi')
---------------------------------------------------------------------------
You'll agree with me that the second heading is much too long.
There're two aspects to consider. First, the part within the parentheses is
really long, because jobs.ShellJob.get_location returns the full command.
I think the URL alone is sufficient. We'd then get this:
---------------------------------------------------------------------------
NEW: Firefox for Android (https://download.mozilla.org/?product=fennec-latest&os=android&lang=multi)
---------------------------------------------------------------------------
Still too long. The second thing we can do is put the URL on its own line.
We now have this:
---------------------------------------------------------------------------
NEW: Firefox for Android
https://download.mozilla.org/?product=fennec-latest&os=android&lang=multi
---------------------------------------------------------------------------
Much nicer, isn't it?
We don't have to stop there. Did you know about ls --hyperlink? If your
terminal supports it, you can right click on the file names and "open link"!
Find out more here: Hyperlinks (a.k.a. HTML-like anchors) in terminal emulators.
For our example, try this in your terminal:
printf '\e]8;;https://download.mozilla.org/?product=fennec-latest&os=android&lang=multi\e\\Firefox for Android\e]8;;\e\\\n'
So for the stdout report, when stdout is a terminal, the heading can be
shortened to this clickable text:
---------------------------------------------------------------------------
NEW: Firefox for Android
---------------------------------------------------------------------------
With this
urls.yaml:urlwatchproduces:You'll agree with me that the second heading is much too long.
There're two aspects to consider. First, the part within the parentheses is
really long, because
jobs.ShellJob.get_locationreturns the fullcommand.I think the URL alone is sufficient. We'd then get this:
Still too long. The second thing we can do is put the URL on its own line.
We now have this:
Much nicer, isn't it?
We don't have to stop there. Did you know about
ls --hyperlink? If yourterminal supports it, you can right click on the file names and "open link"!
Find out more here: Hyperlinks (a.k.a. HTML-like anchors) in terminal emulators.
For our example, try this in your terminal:
So for the
stdoutreport, when stdout is a terminal, the heading can beshortened to this clickable text: