Expand description

buongiornissimo-rs

Buongiornissimo-rs is a Rust library to scrape for Buongiornissimo caffè Italian boomer flavoured images from a Rust application. It supports different buongiornissimo providers to scrape the images from. It supports many kind of “greetings”, such as the classic “buongiornissimo”, but also the holiday-based greetings, like “natale”, “sacro cuore di Gesù” and “Giovedì grasso”. Everthing is provided through a simple and totally async API.

Features 🎁

  • Different providers to prevent api outages and to differentiate the contents.
  • Support for different kind of greetings based on the current date
  • Utilities functions to retrieve the moveable feasts date (such as Easter, Carnival, Corpus domini…). requires the moveable-feasts feature
  • A super comfy function greeting_of_the_day() to retrieve the best greeting for the day

Get started

Add buongiornissimo-rs to your Cargo.toml 🦀

buongiornissimo-rs = "^0.2.0"

Supported features are:

  • no-log: disable logging
  • moveable-feasts (default): enable getters for moveable feasts

Scrape for buongiornissimo ☕

use buongiornissimo_rs::{IlMondoDiGrazia, Scrape};
use chrono::Local;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let motd = buongiornissimo_rs::greeting_of_the_day(Local::today().naive_local(), true);
    let urls = IlMondoDiGrazia::default().scrape(motd).await?;
    // Do whatever you want with the scraped images...
    Ok(())
}
Run

Modules

Structs

Enums

Traits

  • The Scrape trait defines the behaviour to scrape the images from the different boomer images providers

Functions

  • A utility function to return the greeting for the day based on the current date (considers holiday).

Type Definitions