Something went wrong. Try again.
CLI for indexing Zettelkasten Folgezettel identifiers
Something went wrong. Try again.
747 B · 26 lines
Rust
at main
123456789101112131415161718192021222324252627use clap::{Parser, ValueEnum};
#[derive(Debug, Parser)]#[command(version, about = "Index Folgezettel identifiers from note files")]pub struct Cli { #[arg(value_name = "ID")] pub id: Option<String>, #[arg(value_name = "RELATIONSHIP")] pub relationship: Option<Relationship>, #[arg(short = 't', long)] pub tree: bool, #[arg(short = 'v', long)] pub verbose: bool,}
#[derive(Debug, Clone, Copy, PartialEq, Eq, ValueEnum)]pub enum Relationship { /// Ancestors only, from the root down to the immediate parent. Parents, /// Full id lineage: the root down to the note itself. Chain, /// Notes sharing the same parent id (the note included). Siblings, /// Direct children. Children,}