rnotifylib/lib.rs
1#![cfg_attr(docsrs, feature(doc_cfg))]
2//! # rnotify
3//! rnotify is a binary and library for sending notifications to various services such as:
4//! - Discord
5//! - Email
6//! - Telegram
7//! - A file
8//!
9//! See available destinations [here](destination::kinds)
10//!
11//! ## Binary Usage ##
12//! The rnotify binary is a simple wrapper around the library, implementing a config file and command
13//! line options.
14//!
15//! ### Configuration File ###
16//! Located in the user's home directory, .rnotify.toml is a toml file of the following structure.
17//! The default configuration file is generated on the first run of the program and should
18//! look something like:
19//! ```toml
20//! [[destinations]]
21//! routing_type = "Root"
22//! type = "File"
23//! id = "log_file"
24//! path = "C:\\Users\\name\\rnotify.log" # On windows
25//! ```
26//!
27//! An example of a discord destination
28//! ```toml
29//! [[destinations]]
30//! type = "Discord"
31//! id = "discord_heating"
32//! url = "https://discord.com/api/webhooks/..../......."
33//! ```
34//!
35//! The default [MessageRoutingBehaviour][destination::routed_destination::MessageRoutingBehaviour] that
36//! messages will go to the destination in addition to any other destinations.
37
38pub mod message;
39pub mod config;
40pub mod destination;
41pub mod message_router;
42pub mod send_error;
43pub mod util;