#ical #calendar #caldav

bin+lib minicaldav

Minimal caldav client

18 releases (5 breaking)

0.6.0 Oct 30, 2022
0.4.0 Oct 3, 2022
0.3.0 Jul 31, 2022
0.1.1 Mar 16, 2022

#297 in Web programming

Download history 10/week @ 2022-12-04 29/week @ 2022-12-11 6/week @ 2022-12-18 36/week @ 2022-12-25 5/week @ 2023-01-01 13/week @ 2023-01-08 12/week @ 2023-01-15 20/week @ 2023-01-22 14/week @ 2023-01-29 24/week @ 2023-02-05 64/week @ 2023-02-12 27/week @ 2023-02-19 2/week @ 2023-02-26 283/week @ 2023-03-05 84/week @ 2023-03-12 50/week @ 2023-03-19

419 downloads per month
Used in task-picker

GPL-3.0-or-later

68KB
1.5K SLoC

minicaldav

Small and easy CalDAV client.

minicaldav is a caldav client and basic ical parser with as little dependencies as possible (but practical).

Project scope:

  • Simple: Few dependencies, no async, the code is simple
  • Correct: CalDAV and ICAL are implemented correctly
  • Tested: CalDAV works with Events, and is tested with multiple common services
  • Easy to use: Good documentation and intuitive API

Project status

Quick Start

use url::Url;
use ureq::Agent;
pub fn main() {
    let agent = Agent::new();
    let url = Url::parse("http://mycaldav.com/").unwrap();
    let username = "foo";
    let password = "s3cret!";
    let calendars = minicaldav::get_calendars(agent.clone(), username, password, &url).unwrap();
    for calendar in calendars {
        println!("{:?}", calendar);
        let (events, errors) = minicaldav::get_events(agent.clone(), username, password, &calendar).unwrap();
        for event in events {
            println!("{:?}", event);
        }
        for error in errors {
            println!("Error: {:?}", error);
        }
    }
}

Features

minicaldav can either provide a ready-to-use caldav client by using all features or provide only parts.

The bare minimum is just the ical types and parser:

minicaldav = { version = "*", default-features = false, features = [ "ical" ] }

If you want to have a caldav client:

minicaldav = { version = "*" }

If you do need serde:

minicaldav = { version = "*", features = [ "serde" ] }

If you want to compile a basic CLI:

cargo build --bin minicaldav-cli --features cli

Dependencies

~0–3.5MB
~95K SLoC