generated from Astrial.org/template
Compare commits
2 commits
5c30144507
...
624e3457e1
Author | SHA1 | Date | |
---|---|---|---|
624e3457e1 | |||
5a6df1a917 |
2 changed files with 5 additions and 1 deletions
|
@ -4,7 +4,9 @@ use clap::{Parser, Subcommand};
|
||||||
use diaryrs::macros::UnwrapOrFatalAble;
|
use diaryrs::macros::UnwrapOrFatalAble;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
|
|
||||||
|
/// Overengineered and overly opinionated Rust-based diary keeper and processor
|
||||||
#[derive(Parser)]
|
#[derive(Parser)]
|
||||||
|
#[command(version, about)]
|
||||||
pub struct Args {
|
pub struct Args {
|
||||||
#[command(subcommand)]
|
#[command(subcommand)]
|
||||||
pub cmd: Commands,
|
pub cmd: Commands,
|
||||||
|
|
|
@ -15,11 +15,13 @@ fn main() {
|
||||||
args::Commands::Info => {
|
args::Commands::Info => {
|
||||||
let time = Time::build().unwrap_or_fatal("Failed to determine time information");
|
let time = Time::build().unwrap_or_fatal("Failed to determine time information");
|
||||||
let config = Config::read().unwrap_or_fatal("Failed to read config file");
|
let config = Config::read().unwrap_or_fatal("Failed to read config file");
|
||||||
|
println!("diaryrs");
|
||||||
println!(
|
println!(
|
||||||
"[TIME] Timestamp: {}, Timezone: {}",
|
"[TIME] Timestamp: {}, Timezone: {}",
|
||||||
time.timestamp, time.timezone
|
time.timestamp, time.timezone
|
||||||
);
|
);
|
||||||
println!("[CONFIG] {:?}", config);
|
println!("[CONFIG] Found at path: {}", config.config_path.display());
|
||||||
|
println!("[CONFIG] Configuration: {:?}", config)
|
||||||
}
|
}
|
||||||
args::Commands::Today => {
|
args::Commands::Today => {
|
||||||
let time = Time::build().unwrap_or_fatal("Failed to determine time information");
|
let time = Time::build().unwrap_or_fatal("Failed to determine time information");
|
||||||
|
|
Loading…
Reference in a new issue