icalendar 库,当然是在 Rust 中 - 仅供娱乐
You want to help make this more mature? Please talk to me, Pull Requests and suggestions are very welcome.
Please see the documentation for current examples.
Below are a few examples of how to use this library. See the examples directory as well as the documentation for many more.
Use the builder-pattern to assemble the full calendar or event by event. Display printing produces the rfc5545 format.
…You can remove properties from components when you need to update their state:
…There is a feature called "parser" which allows you to read calendars again like this:
use std::fs::read_to_string;
use icalendar::{Calendar, CalendarComponent, Component};
let contents = read_to_string("fixtures/icalendar-rb/event.ics").unwrap();
let parsed_calendar: Calendar = contents.parse().unwrap();
for event in parsed_calendar.events() {
println!("Event: {}", event.get_summary().unwrap())
}
A [Calendar] represents a full calendar, which contains multiple [Component]s. These may be either [Event]s, [Todo]s, or [Venue]s. Components in turn have [Property]s, which may have [Parameter]s.
RRule SupportThanks to the rrule crate and friendly community contribution, you can also add recurrence rules to your events and todos. See the documentation for Event::recurrence and Todo::recurrence for details.
We currently reexport a select subset of rrule types. Should you experience compatibility issues because the maintainer (me) has not yet updated icalendar to reexport the latest rrule version, please feel free to open a PR.
Any help in form of descriptive and friendly issues or comprehensive pull requests are welcome!
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in icalendar by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
The Changelog of this library is generated from its commit log, there any commit message must conform with . For simplicity you could make your commits with convco.
Thanks goes to these wonderful people:
icalendar (this crate) is licensed under either of Apache License, Version
2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
暂无开放 Issues,或尚未同步最近议题。