Posts CAP alerts to a chat room

Overview

CAP-CHAT

Sends CAP (Weather, etc) Warnings to Chat.

Options

Option Description Default
--cap URL for the Atom/RSS feed to CAP alerts (can have multiple) required
--format Type of output to send to chatrooms (json, text, text+map). text+map
--severity Minimum severity to get alerts for Minor
--boundaries Path to a folder container GeoJSON files with polygons that demarcate areas you care about _boundaries folder in workdir
--outlines Path to a folder container GeoJSON files with polygons for outlines of countries or areas, to render basemaps _outlines folder in workdir
--cache-db Path to the cache database (used to avoid double-posting) _cache folder in workdir

You can download outline GeoJSON files from https://geojson-maps.ash.ms/.

You can make your own boundary GeoJSONs with https://geoman.io/geojson-editor.

Outputs

Option Description
--print Print text to STDOUT.
--file Write to file. The message will go to PATH.txt, and if there's an image it will go to PATH.png.
--image-height Maximum height of image in pixels for text+map output format (default 512).
--image-width Maximum width of image in pixels for text+map output format (default 512).
--facebook-token Facebook Messenger/Workplace token (must have Message Any Member and Group Chat Bot permissions).
--facebook-thread Facebook Messenger/Workplace Thread ID to post in. Cannot be a single user chat.
--discord-webhook-url Discord webhook URL to use to post messages.

Logs

By default, moderate (info) logs are printed to STDERR. To increase verbosity, use -v, -vv, or -vvv. To decrease verbosity, use -q.

Additionally, and overriding any of these options, the RUST_LOG environment variable is respected. See tracing-subscriber for syntax.

Example

northland map

SEVERE THUNDERSTORM WATCH

🟡 [Auckland,Waikato] 6 hours from 04:30am Thursday to 11:00am Thursday

Updated at 4:30pm to extend risk of severe thunderstorms to all of northern Waikato

Thunderstorms are expected to develop over the Auckland region this afternoon, and spread southwards into northern Waikato towards evening. These thunderstorms will be accompanied by localised heavy rain and small hail. There is also a low risk of a small tornado or funnel cloud. Between 4pm and 10pm today (Thursday) in Auckland, and between 6pm and 11pm in northern Waikato, a few of these thunderstorms could be severe producing localised downpours of 25-40mm/hr. Rainfall of this intensity can cause surface and/or flash flooding, especially about low-lying areas such as streams, rivers or narrow valleys, and may also lead to slips. Driving conditions will also be hazardous with surface flooding and poor visibility in heavy rain.

CAP list

Aotearoa (NZ)

You might also like...
Blaze is a Rust script that continuously monitors server resource usage and sends real-time summaries and alerts to a Discord channel via Webhook.
Blaze is a Rust script that continuously monitors server resource usage and sends real-time summaries and alerts to a Discord channel via Webhook.

Blaze Blaze is a Rust script designed to run 24/7 on a server, providing a summary of resource usage every 30 minutes (configurable) to a Discord chan

Just a bot for Neovim's Matrix room(s)

nvim-matrix-bot Currently just supports replying to messages with :h some_doc or similar in them with a link to the docs on Neovim's website. Plan i

Emulates an Edge hardware-based room sensor client purely as a CLI application

ambi_mock_client Usage You must have Rust installed to build ambi_mock_client. You can find documentation on installing Rust here. Using cargo run c

The goal of this challenge is to create an isometric, decorated scene in which the character can move around the objects in the room.

The goal of this challenge is to create an isometric, decorated scene in which the character can move around the objects in the room.

AI plays a small escape room game, written in rust
AI plays a small escape room game, written in rust

Escape AI AI learns escape a room. This is a rust based implementation of a genetic algorithm and reinforcement learning simulation that trains an AI

A bunch of links to blog posts, articles, videos, etc for learning Rust

rust-learning A bunch of links to blog posts, articles, videos, etc for learning Rust. Feel free to submit a pull request if you have some links/resou

Blog posts, mostly about Rust.

Sean Chen's Blog 🦀 Blog posts, mostly about Rust. Posts Date Title 2021-04-06 A Beginner's Guide to Handling Errors in Rust 2021-01-23 Implementing a

A Matrix bot which can generate
A Matrix bot which can generate "This Week in X" like blog posts

hebbot A Matrix bot which can help to generate periodic / recurrent summary blog posts (also known as "This Week in X"). The bot was inspired by twim-

🤖 Autonomous Twitter bot that posts analytics of the APYs available on the Solend Protocol.
🤖 Autonomous Twitter bot that posts analytics of the APYs available on the Solend Protocol.

Solend APY Twitter Bot Solana Ignition Hackathon 2021 View Demo · Report Bug · Request Feature Table of Contents About The Project Motivation Challeng

Subsocial full node with Substrate/Polkadot pallets for decentralized communities: blogs, posts, comments, likes, reputation.

Subsocial Node by DappForce Subsocial is a set of Substrate pallets with web UI that allows anyone to launch their own decentralized censorship-resist

Rust-blog - Educational blog posts for Rust beginners

pretzelhammer's Rust blog 🦀 I write educational content for Rust beginners and Rust advanced beginners. My posts are listed below in reverse chronolo

A tray application for Windows that gives you push notifications and instant downloads of new posts, messages and stories posted by models you subscribe to on Onlyfans.

OF-notifier A tray application for Windows that gives you push notifications and instant downloads of new posts, messages and stories posted by models

host, edit and publish markdown posts

insight insight is a web server allowing you to edit markdown posts and host the rendered result publicly. It has less than 40 dependencies in total.

An RSS feed aggregator that notifies you of new posts via email.
An RSS feed aggregator that notifies you of new posts via email.

Rss2Email A small program capable of aggregating content from multiple RSS/Atom feeds and mailing them to you in a practical summary email. Keep track

A Rust application which funnels external webhook event data to an Urbit chat.
A Rust application which funnels external webhook event data to an Urbit chat.

Urbit Webhook Funnel This is a simple Rust application which funnels external webhook event data to an Urbit chat. This application is intended to be

A telnet chat server written in Rust, running on Lunatic.
A telnet chat server written in Rust, running on Lunatic.

Lunatic.chat A telnet chat server written in Rust, running on Lunatic. If you just would like to try it out, join the hosted version with: # US server

IITC-CE Telegram Chat Spam Protection

ADA AntiBot This bot bans spammers in Telegram chat. Run To run you should export environment variables: TELOXIDE_TOKEN - telegram bot token TELEGRAM_

Twitch chat in the terminal.
Twitch chat in the terminal.

Twitch Chat IRC, in the terminal. What it looks like: Keybinds: Normal mode Key Description ? Have the keybinds window appear. i Enter insert mode for

A Markov chain based Discord chat bot.

A Markov chain based Discord chat bot. Building It is recommended to use cargo.

Comments
  • RUSTSEC-2020-0159: Potential segfault in `localtime_r` invocations

    RUSTSEC-2020-0159: Potential segfault in `localtime_r` invocations

    Potential segfault in localtime_r invocations

    | Details | | | ------------------- | ---------------------------------------------- | | Package | chrono | | Version | 0.4.19 | | URL | https://github.com/chronotope/chrono/issues/499 | | Date | 2020-11-10 |

    Impact

    Unix-like operating systems may segfault due to dereferencing a dangling pointer in specific circumstances. This requires an environment variable to be set in a different thread than the affected functions. This may occur without the user's knowledge, notably in a third-party library.

    Workarounds

    No workarounds are known.

    References

    See advisory page for additional details.

    opened by github-actions[bot] 1
  • Add Discord webhook support

    Add Discord webhook support

    This implementation is very much based on the Facebook Workplace implementation in src/facebook.rs, modified just enough to make it work. As such, it posts the image as a separate message, even though Discord webhooks totally support images as attachments to a message - this could definitely be cleaned up at a later point!

    opened by u1f408 1
  • CAP circle area support

    CAP circle area support

    CAP messages with circle areas, rather than polygon areas, currently don't decode (and completely crash CAPCHAT). GeoNet uses circle area, rather than polygon area, CAP messages.

    (Unfortunately for me, this means CAPCHAT completely breaks on the only CAP source within Aotearoa that's actually providing any data at the time I'm creating this issue :crying_cat_face:)

    opened by u1f408 1
  • RUSTSEC-2020-0071: Potential segfault in the time crate

    RUSTSEC-2020-0071: Potential segfault in the time crate

    Potential segfault in the time crate

    | Details | | | ------------------- | ---------------------------------------------- | | Package | time | | Version | 0.1.44 | | URL | https://github.com/time-rs/time/issues/293 | | Date | 2020-11-18 | | Patched versions | >=0.2.23 | | Unaffected versions | =0.2.0,=0.2.1,=0.2.2,=0.2.3,=0.2.4,=0.2.5,=0.2.6 |

    Impact

    Unix-like operating systems may segfault due to dereferencing a dangling pointer in specific circumstances. This requires an environment variable to be set in a different thread than the affected functions. This may occur without the user's knowledge, notably in a third-party library.

    The affected functions from time 0.2.7 through 0.2.22 are:

    • time::UtcOffset::local_offset_at
    • time::UtcOffset::try_local_offset_at
    • time::UtcOffset::current_local_offset
    • time::UtcOffset::try_current_local_offset
    • time::OffsetDateTime::now_local
    • time::OffsetDateTime::try_now_local

    The affected functions in time 0.1 (all versions) are:

    • at
    • at_utc

    Non-Unix targets (including Windows and wasm) are unaffected.

    Patches

    Pending a proper fix, the internal method that determines the local offset has been modified to always return None on the affected operating systems. This has the effect of returning an Err on the try_* methods and UTC on the non-try_* methods.

    Users and library authors with time in their dependency tree should perform cargo update, which will pull in the updated, unaffected code.

    Users of time 0.1 do not have a patch and should upgrade to an unaffected version: time 0.2.23 or greater or the 0.3. series.

    Workarounds

    No workarounds are known.

    References

    time-rs/time#293

    See advisory page for additional details.

    opened by github-actions[bot] 1
Releases(v0.6.2)
Owner
Félix Saparelli
Félix Saparelli
Display NOAA Weather Alerts For A Given Lat/Lon

wxwarn Display NOAA Weather Alerts For A Given Lat/Lon Grabs the NOAA weather alerts shapefile, checks to see if there are any alerts for the given co

boB Rudis 4 Jul 25, 2022
Just a bot for Neovim's Matrix room(s)

nvim-matrix-bot Currently just supports replying to messages with :h <some_doc> or similar in them with a link to the docs on Neovim's website. Plan i

null 8 Aug 6, 2022
IITC-CE Telegram Chat Spam Protection

ADA AntiBot This bot bans spammers in Telegram chat. Run To run you should export environment variables: TELOXIDE_TOKEN - telegram bot token TELEGRAM_

Ingress Intel Total Conversion — Community Edition 4 May 23, 2022
Telegram bot to fetch images from Terceira Ponte and Rodosol into your Telegram chat.

rodosol-telegram-bot Add this bot to your contacts list This bot is a quick scraper that gets the pictures from the rodosol "De olho na via" feature a

Armando Magalhães 1 Jan 9, 2022
YAC (Yac is Another Chat) is an example of Chat using WebSocket.

YAC (Yac is Another Chat) is an example of Chat using WebSocket. Because often the example you find in internet are "not so production ready", I would like to try to implement something more robust.

Tommaso Allevi 8 May 24, 2022
Cap'n Proto for Rust

Cap'n Proto for Rust documentation blog Introduction Cap'n Proto is a type system for distributed systems. With Cap'n Proto, you describe your data an

Cap'n Proto 1.5k Dec 26, 2022
Generate alerts for when metrics/recordings become absent

prometheus-absent-data-alert-rule-generator prometheus-absent-data-alert-rule-generator is a tool to generate alerts for missing data in time-series t

Stile Education 5 Sep 9, 2022
Cap'n Proto is a type system for distributed systems

Cap'n Proto for Rust documentation blog Introduction Cap'n Proto is a type system for distributed systems. With Cap'n Proto, you describe your data an

Cap'n Proto 1.5k Jan 1, 2023
Rust types for the OASIS Common Alerting Protocol (CAP)

Rust types for the OASIS Common Alerting Protocol (CAP)

Will Glynn 2 Jun 6, 2022
Display NOAA Weather Alerts For A Given Lat/Lon

wxwarn Display NOAA Weather Alerts For A Given Lat/Lon Grabs the NOAA weather alerts shapefile, checks to see if there are any alerts for the given co

boB Rudis 4 Jul 25, 2022