pub enum KbCommands {
Create {
id: Option<String>,
title: String,
content: String,
},
Branch {
parent_luhmann_id: String,
title: String,
content: String,
},
List,
Get {
luhmann_id: String,
},
Link {
from_luhmann_id: String,
to_luhmann_id: String,
context: Option<String>,
},
Search {
query: String,
},
Tree {
prefix: String,
},
Cont {
from_luhmann_id: String,
to_luhmann_id: String,
},
Index {
luhmann_id: String,
},
Context {
luhmann_id: String,
},
Delete {
luhmann_id: String,
},
}Expand description
Simplified KB commands - shared knowledge base, only Luhmann IDs
Variants§
Create
Create a new note (auto-generates ID unless –id specified) Usage: kb create “Title” “Content” OR kb create –id 1a “Title” “Content”
Fields
Branch
Create a child note (branch) from a parent Usage: kb branch 1 “Child Title” “Content”
Fields
List
List all notes (sorted by Luhmann ID)
Get
Get a specific note by Luhmann ID Usage: kb get 1a
Link
Link two notes together Usage: kb link 1a 1b
Fields
Search
Search notes Usage: kb search “query”
Tree
Show notes by Luhmann ID prefix Usage: kb tree 1a
Cont
Mark that note A continues on note B (linear chain) Usage: kb cont 1a 1b
Fields
Index
Create an index card listing all children of a note Usage: kb index 1a
Context
Show full context of a note (parent, children, links, continuations, backlinks) Usage: kb context 1a
Delete
Delete a note by Luhmann ID Usage: kb delete 1a
Trait Implementations§
Source§impl FromArgMatches for KbCommands
impl FromArgMatches for KbCommands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for KbCommands
impl Subcommand for KbCommands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for KbCommands
impl RefUnwindSafe for KbCommands
impl Send for KbCommands
impl Sync for KbCommands
impl Unpin for KbCommands
impl UnwindSafe for KbCommands
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more