From e444d29a15d3e21f36119580c590e045f9dfc6f4 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 30 Jan 2024 15:21:42 +0100 Subject: [PATCH] represent professors as "attendee" and extra data as comments --- src/ics.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ics.rs b/src/ics.rs index 2c6fe06..b2baaf4 100644 --- a/src/ics.rs +++ b/src/ics.rs @@ -4,7 +4,7 @@ use chrono::TimeZone; use ics::{ parameters::{Language, TzIDParam}, properties::{ - Categories, Class, Comment, Description, DtEnd, DtStart, Location, Summary, Transp, + Attendee, Categories, Class, Description, DtEnd, DtStart, Location, Summary, Transp, }, Event, ICalendar, Standard, }; @@ -40,7 +40,7 @@ pub fn export(courses: Vec, filename: &mut Str // Professor's name if course.professor.is_some() { - event.push(Description::new(course.professor.unwrap())); + event.push(Attendee::new(course.professor.unwrap())); } // Start time of the course @@ -73,7 +73,7 @@ pub fn export(courses: Vec, filename: &mut Str // Course extra data if course.data.is_some() { - event.push(Comment::new(course.data.unwrap())); + event.push(Description::new(course.data.unwrap())); } // Add the course to the calendar