diff --git a/CHANGELOG.md b/CHANGELOG.md index 5edb09c..f9c0290 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v0.1.8] - 2024.12.26 + +### Added + +- `--emoji` flag for using emojis in the output (by @hitblast) + ## [v0.1.7] - 2024.12.24 ### Added diff --git a/Cargo.lock b/Cargo.lock index d1f8ac7..51c4d40 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -162,7 +162,7 @@ dependencies = [ [[package]] name = "trimsec" -version = "0.1.7" +version = "0.1.8" dependencies = [ "clap", "colored", diff --git a/Cargo.toml b/Cargo.toml index 6e80f3d..bfb2f1f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "trimsec" description = "Calculate saved time on using media speed multipliers, with speed." authors = ["HitBlast "] -version = "0.1.7" +version = "0.1.8" edition = "2021" repository = "https://github.com/hitblast/trimsec" homepage = "https://github.com/hitblast/trimsec" diff --git a/TODO.md b/TODO.md index 0263426..6b98877 100644 --- a/TODO.md +++ b/TODO.md @@ -9,6 +9,8 @@ - [x] `--version` - [x] `--duration-only` - [x] `--time-saved-only` + - [x] `--seconds` + - [x] `--emoji` - [ ] `--raw` - [ ] `--unit` - [ ] Add an efficiency indicator for the time saved based on the leftover time for the day. diff --git a/src/main.rs b/src/main.rs index 809e1e8..140bfa7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,6 +26,9 @@ struct Cli { /// Use seconds as the time unit. #[clap(short, long)] seconds: bool, + /// Show emojis in the output. + #[clap(short, long)] + emoji: bool, } /// Runner. @@ -50,7 +53,8 @@ fn main() { }; let message = format!( - "\nNew duration: {}", + "\nNew duration: {}{}", + if args.emoji { "⏳ " } else { r#""# }, if splits > 1 { format!("{} ({} splits)", parsed, splits) } else { @@ -68,7 +72,11 @@ fn main() { } else { trimsec::parse_time(time_saved) }; - println!("Saved {}!\n", parsed.green()); + println!( + "Saved {}{}!\n", + if args.emoji { "⏰ " } else { r#""# }, + parsed.green() + ); } } Err(e) => {