aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/icaltool.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/icaltool.rs b/src/icaltool.rs
index a98c4c8..d11c3d1 100644
--- a/src/icaltool.rs
+++ b/src/icaltool.rs
@@ -86,12 +86,14 @@ fn print_event(event: &IcalEvent) {
let mut start: Option<DateTime<Utc>> = None;
let mut end: Option<DateTime<Utc>> = None;
let mut summary = String::new();
+ let mut description = String::new();
for p in &event.properties {
match p.name.as_ref() {
"DTSTART" => start = parse_datetime(p.value.clone()),
"DTEND" => end = parse_datetime(p.value.clone()),
"SUMMARY" => summary = p.value.clone().unwrap_or_default(),
+ "DESCRIPTION" => description = p.value.clone().unwrap_or_default(),
_ => (),
}
}
@@ -100,6 +102,11 @@ fn print_event(event: &IcalEvent) {
start.unwrap_or_else(Utc::now),
end.unwrap_or_else(Utc::now),
summary);
+
+ if description.len() > 0 {
+ println!("{}", description);
+ }
+
}
fn match_event(event: &IcalEvent, pattern: &str) -> bool {