1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
//! A library for creating ICalendar files.
//!
//! The library supports the ICalendar specification (RFC 5545) version 2.0.
//!
//! To use this library add the library as a dependency in your `Cargo.toml`:
//! ```toml
//! [dependencies]
//! ics = "0.1"
//! ```
//! By default some features are enabled for speeding up some processes. If you
//! wish to disable them because you do not want any additional dependencies
//! except for the standard library, specify in your `Cargo.toml`:
//! ```toml
//! [dependencies.ics]
//! version = "0.1"
//! default-features = false
//! ```
//!
//! # Example
//!
//! ```
//! use ics::properties::{Comment, Summary};
//! use ics::{ICalendar, ToDo};
//!
//! // The ICalendar object is what is later written to the file.
//! let mut calendar = ICalendar::new("2.0", "ics-rs");
//!
//! // Anthing that can be converted to a Cow<str> is accepted as value which means
//! // &str and String can be used freely. For the sake of demonstrating the UID
//! // was taken from somewhere. Out of security reasons the UID shall be randomly
//! // generated from another crate.
//! let mut todo = ToDo::new("d4092ed9-1667-4518-a7c0-bcfaac4f1fc6", "20181021T190000");
//! todo.push(Summary::new("Katarina's Birthday Present"));
//! todo.push(Comment::new("Buy her the Imagine Dragons tickets."));
//!
//! calendar.add_todo(todo);
//!
//! // write `calendar` to a file
//! ```
#![deny(missing_docs)]
#[macro_use]
extern crate lazy_static;
extern crate regex;
#[macro_use]
mod macros;
pub mod components;
mod ical;
pub mod parameters;
pub mod properties;
mod util;
pub use ical::Alarm;
pub use ical::Event;
pub use ical::FreeBusy;
pub use ical::ICalendar;
pub use ical::Journal;
pub use ical::TimeZone;
pub use ical::ToDo;
pub use ical::ZoneTime;
pub use util::escape_text;