List events
This commit is contained in:
parent
f13575a66e
commit
6fadc916f4
@ -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());
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user