caltemps 0.2.1

A tool to query and report on your iCalendar data from vDirs.
Documentation
use clap::Parser;

/// Query and report on your iCalendar data from vDirs.
#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
pub struct Cli {
    /// Path to CalTemps config file
    ///
    /// Currently the file would look like:
    ///
    ///     # This is where your calendar lives in VDir format
    ///     # See also:
    ///     # https://vdirsyncer.readthedocs.io/en/stable/vdir.html
    ///     vdir_path: '/home/user/.calendars/work'
    ///     # See also the --filter argument
    ///     default_filter: '@work'
    ///     # See also the --date-range argument
    ///     default_date_range: 'monday..friday'
    #[arg(short, long, verbatim_doc_comment, env="CALTEMPS_CONFIG",
        default_value_t=xdg::BaseDirectories::with_prefix("caltemps").unwrap()
            .get_config_file("config.toml").into_os_string().into_string().expect("Strange path"))]
    pub config: String,
    /// Filter to apply, something like '@work'
    ///
    /// Remember to quote '@' and '#' symbols on your shell if those have a
    /// special meaning.
    #[arg(short, long, env = "CALTEMPS_FILTER")]
    pub filter: Option<String>,
    /// The date range to filter items by.
    ///
    /// It includes both extremes.
    ///
    /// You can use '..' to separate the beginning and the end, for example:
    /// '2025-01-01..2025-12-31' would include everything on 2025.
    #[arg(short, long, env = "CALTEMPS_DATE_RANGE")]
    pub date_range: Option<String>,
}