refactor: rewrite in rust
This commit is contained in:
parent
20a3e8b437
commit
ed493cff29
72 changed files with 5684 additions and 3688 deletions
40
src/cli/args.rs
Normal file
40
src/cli/args.rs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
use clap::{Parser, Subcommand};
|
||||
use clap_complete::Shell;
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(name = "streamd")]
|
||||
#[command(
|
||||
author,
|
||||
version,
|
||||
about = "Personal knowledge management and time-tracking CLI using @Tag annotations"
|
||||
)]
|
||||
pub struct Cli {
|
||||
#[command(subcommand)]
|
||||
pub command: Option<Commands>,
|
||||
}
|
||||
|
||||
#[derive(Subcommand)]
|
||||
pub enum Commands {
|
||||
/// Create a new stream file
|
||||
New,
|
||||
|
||||
/// Display open tasks
|
||||
Todo,
|
||||
|
||||
/// Edit a stream file by position
|
||||
Edit {
|
||||
/// Position of the file to edit (0 = most recent, negative = from oldest)
|
||||
#[arg(default_value = "1")]
|
||||
number: i32,
|
||||
},
|
||||
|
||||
/// Display extracted timesheets
|
||||
Timesheet,
|
||||
|
||||
/// Generate shell completions
|
||||
Completions {
|
||||
/// Shell to generate completions for
|
||||
#[arg(value_enum)]
|
||||
shell: Shell,
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue