diff --git a/src/main.rs b/src/main.rs index 36033d0..de87924 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,6 +14,7 @@ use etecal::session::{ #[derive(Subcommand, Clone)] #[command(arg_required_else_help = true)] enum CalendarCommands { + Events, Name, SetName { name: String, @@ -81,7 +82,14 @@ fn main() -> Result<()> { let mut collection = collection_manager.fetch(uid, None)?; let mut meta = collection.meta()?; + let item_manager = collection_manager.item_manager(&collection)?; + match &command.clone().unwrap_or_default() { + CalendarCommands::Events => { + for item in item_manager.list(None)?.data() { + println!("{} [{}]", item.meta()?.name().unwrap(), item.uid()); + } + }, CalendarCommands::Name => { println!("{} [{}]", meta.name().unwrap(), collection.uid()); },