Raku Land



Build Status


p6lert - Alerts from alerts.raku.org on your command line


$ p6lert
Creating new config file /home/zoffix/.p6lert.conf

ID#5 | 2017-12-28T23:45:28Z | severity: high
affects: foos and meows | posted by: Zoffix Znet

ID#3 | 2017-12-28T23:42:14Z | severity: info
affects: foos and meows | posted by: Anonymous

$ p6lert
No new alerts

$ p6lert 5
ID#5 | 2017-12-28T23:45:28Z | severity: high
affects: foos and meows | posted by: Zoffix Znet


Fetch alerts from alerts.raku.org on your command line



Bool. If optional Terminal::ANSIColor module is installed, the program will add a splash of colour to its output. Passing --no-color disables the colours, regardless of whether the module is installed.

$ p6lert --no-color

alert ID

UInt positional argument. Can only be combined with --no-color argument. Fetches alert whose id is the one given.

$ p6lert 42


Str where valid values are info, low, normal, high, and critical. Defaults to critical. Specifies the minimum severity of alerts to watch for. info is the lowest severity and critical is highest. Thus, if you specify --block-on=normal, the program will watch for normal, high, and critical alerts, but not for low or info (they latter would still be displayed, but program won't block exit).

If the alert for wanted severity is seen, the program will block exit and wait for user input. It will be a yes/no prompt and if the user enters "no", the program will exit with a exit code 1. This is handy for inclusion of this program in, for example, compiler upgrade scripts, where you can block the upgrade if you see some critical alert.

$ p6lert --block-on=high


Str. Specifies the path to the configuration file to use. The file will be created if it does not exist. The default config file location is ~/.p6lert.conf or, if $*HOME is Nil, then in ./.p6lert.conf

$ p6lert --config=/home/meows/p6alerter

The config file contains a JSON object that currently only has last-fetch-time property. This property stores information about the time the program last fetched any alerts. Only fresh alerts since that time will be displayed when program is executed.

Passing value of /dev/null (or nul on Windows) as --config will make the program ignore the config file loading and it won't store last-fetch-time, giving full list of alerts on each load.

$ p6lert --config=/dev/null


Fork this module on GitHub: https://github.com/raku-community-modules/p6lert


To report bugs or request features, please use https://github.com/raku-community-modules/p6lert/issues


Zoffix Znet (http://perl6.party/)


You can use and distribute this module under the terms of the The Artistic License 2.0. See the LICENSE file included in this distribution for complete details.

The META6.json file of this distribution may be distributed and modified without restrictions or attribution.