From 600121a1856669e45a4dd5375be0d6d317225801 Mon Sep 17 00:00:00 2001 From: Amy OpenClaw Date: Mon, 13 Jul 2026 17:43:13 +0000 Subject: [PATCH 1/4] docs: fix and improve README MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix 'cargo run not' → 'cargo run new' (command does not exist in source) - Fix directory structure example indentation - Add Prerequisites section (Rust/Cargo) - Document missing commands: work-stats/ws and new-folder/nf - Add sh syntax highlighting to code blocks - Use generic paths in config and alias examples --- README.md | 56 +++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 42 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 2882294..862c8f4 100644 --- a/README.md +++ b/README.md @@ -7,21 +7,25 @@ Whenever you need to take notes, Nost helps you create files following the struc For example, if you add a note on the 6th of June 2025: ```txt - 2025/ - 06/ - 1/ - 03.md +2025/ + 06/ + 1/ + 06.md ``` -## Create a not +## Prerequisites -``` -cargo run not +- [Rust](https://www.rust-lang.org/tools/install) (includes `cargo`) + +## Create a note + +```sh +cargo run new ``` Or -``` +```sh cargo run n ``` @@ -29,30 +33,54 @@ cargo run n Begin a work session: -``` +```sh cargo run start-work ``` Or -``` +```sh cargo run sw ``` End a work session: -``` +```sh cargo run end-work ``` Or -``` +```sh cargo run ew ``` +Display work stats: + +```sh +cargo run work-stats +``` + +Or + +```sh +cargo run ws +``` + For now, the data is only annotated, but these annotations are not yet used or processed. +## Create a new folder + +```sh +cargo run new-folder +``` + +Or + +```sh +cargo run nf +``` + ## Test Unit tests: @@ -78,7 +106,7 @@ cargo fmt -- --check Copy `config.toml.dist` into `config.toml` and update the values. For example: ```toml -not_path="/home/gaetan/not" +not_path="/path/to/your/notes" language="fr" ``` @@ -93,7 +121,7 @@ cargo build --release Optional: add an alias ```sh -alias nost="RUST_LOG=warn /your/path/for/nost-not/nost/target/release/nost" +alias nost="RUST_LOG=warn /path/to/nost/target/release/nost" ``` ## Work plugin From 19301c973a14ea3e8125c9c0003b5abc5a4e6ee4 Mon Sep 17 00:00:00 2001 From: Amy OpenClaw Date: Tue, 14 Jul 2026 02:38:57 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=93=9D=20Improve=20README=20structure?= =?UTF-8?q?=20and=20consistency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Reorder sections: Build → Configure → Usage → Development - Fix section title: 'Use not for working' → 'Work sessions (WIP)' - Add sh syntax highlighting to all code blocks - Move Work plugin config under Work sessions as a subsection - Move Create new folder before Work sessions --- README.md | 86 +++++++++++++++++++++++++++---------------------------- 1 file changed, 42 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index 862c8f4..c20578a 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,27 @@ For example, if you add a note on the 6th of June 2025: - [Rust](https://www.rust-lang.org/tools/install) (includes `cargo`) +## Build the app + +```sh +cargo build --release +``` + +Optional: add an alias + +```sh +alias nost="RUST_LOG=warn /path/to/nost/target/release/nost" +``` + +## Configure the app + +Copy `config.toml.dist` into `config.toml` and update the values. For example: + +```toml +not_path="/path/to/your/notes" +language="fr" +``` + ## Create a note ```sh @@ -29,7 +50,19 @@ Or cargo run n ``` -## (WIP) Use not for working +## Create a new folder + +```sh +cargo run new-folder +``` + +Or + +```sh +cargo run nf +``` + +## Work sessions (WIP) Begin a work session: @@ -69,66 +102,31 @@ cargo run ws For now, the data is only annotated, but these annotations are not yet used or processed. -## Create a new folder - -```sh -cargo run new-folder -``` +### Work plugin configuration -Or +For computing work stats, add some env vars: ```sh -cargo run nf +export NOST_WORK_SALARY=0 +export NOST_WORK_CURRENCY=EUR ``` -## Test +## Development Unit tests: -``` +```sh cargo test ``` Style: -``` +```sh cargo clippy --verbose -- -D warnings ``` Linter: -``` -cargo fmt -- --check -``` - -## Configure the app - -Copy `config.toml.dist` into `config.toml` and update the values. For example: - -```toml -not_path="/path/to/your/notes" -language="fr" -``` - -## Build the app - -Build the app with cargo - -```sh -cargo build --release -``` - -Optional: add an alias - ```sh -alias nost="RUST_LOG=warn /path/to/nost/target/release/nost" -``` - -## Work plugin - -For computing work stats, add some env vars: - -```sh -export NOST_WORK_SALARY=0 -export NOST_WORK_CURRENCY=EUR +cargo fmt -- --check ``` From e4d2b818714a496684f55527656bda94739a8c70 Mon Sep 17 00:00:00 2001 From: Amy OpenClaw Date: Tue, 14 Jul 2026 04:15:29 +0000 Subject: [PATCH 3/4] fix: remove useless borrows in format strings (clippy) --- src/commands/new_folder.rs | 4 ++-- src/files/create.rs | 2 +- src/projects/initialize.rs | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/commands/new_folder.rs b/src/commands/new_folder.rs index 2709540..199e757 100644 --- a/src/commands/new_folder.rs +++ b/src/commands/new_folder.rs @@ -15,7 +15,7 @@ pub fn new_folder() -> std::io::Result { println!("✅ Folder has been created successfully!"); // create a the config { "created_at": "2025-12-31T23:59:59Z", "type": "day" } - let config_file_path = format!("{}{}", &new_folder_path, ".not-config.json"); + let config_file_path = format!("{}{}", new_folder_path, ".not-config.json"); match File::create(&config_file_path) { Ok(_file) => { @@ -28,7 +28,7 @@ pub fn new_folder() -> std::io::Result { }; // create the default file in the folder - let default_file_path = format!("{}{}", &new_folder_path, "not.md"); + let default_file_path = format!("{}{}", new_folder_path, "not.md"); match File::create(&default_file_path) { Ok(_file) => { diff --git a/src/files/create.rs b/src/files/create.rs index a1d8663..6565cbb 100644 --- a/src/files/create.rs +++ b/src/files/create.rs @@ -31,7 +31,7 @@ pub fn create_file(title: Option) -> std::io::Result { None => name(), }; - let full_not_file_path = format!("{}{}", ¬_file_path, not_file_name); + let full_not_file_path = format!("{}{}", not_file_path, not_file_name); // create folders if needed if let Err(e) = create_dir_all(¬_file_path) { diff --git a/src/projects/initialize.rs b/src/projects/initialize.rs index 5d0f12f..9677e00 100644 --- a/src/projects/initialize.rs +++ b/src/projects/initialize.rs @@ -9,7 +9,7 @@ pub fn get_project_config_path() -> String { eprintln!("NOT_PATH environment variable not set."); std::process::exit(1); }); - format!("{}/{}/", ¬_path, ".nost") + format!("{}/{}/", not_path, ".nost") } /** @@ -22,7 +22,7 @@ pub fn is_project_initialized() -> bool { std::process::exit(1); }); - let project_config_path = format!("{}/.nost/project.json", ¬_path,); + let project_config_path = format!("{}/.nost/project.json", not_path); log::debug!( "Checking if configuration exists at path: {}", &project_config_path @@ -54,7 +54,7 @@ pub fn initialize_project() -> Result> { create_dir_all(&configuration_path)?; // create en empty configuration file - let default_config_path = format!("{}{}", &configuration_path, "project.json"); + let default_config_path = format!("{}{}", configuration_path, "project.json"); let config_file = std::fs::File::create(&default_config_path)?; log::debug!("Configuration initialized at path: {}", &configuration_path); From 5b43e1dc8edbdd5ceb6a532b16d60893de3c55e6 Mon Sep 17 00:00:00 2001 From: Amy OpenClaw Date: Tue, 14 Jul 2026 04:19:36 +0000 Subject: [PATCH 4/4] fix: remove remaining useless borrows in debug!/format! macros (clippy) --- src/files/create.rs | 6 +++--- src/plugins/gdarquie_work/work.rs | 2 +- src/projects/initialize.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/files/create.rs b/src/files/create.rs index 6565cbb..859a5e8 100644 --- a/src/files/create.rs +++ b/src/files/create.rs @@ -85,14 +85,14 @@ pub fn create_note_file_with_folders(note_type: String) -> std::io::Result = Local::now(); let today_file_name = get_day_as_string(now); let today_file_path = format!( "{}{}{}{}{}", - &today_folder_path, today_file_name, ".", note_type, ".md" + today_folder_path, today_file_name, ".", note_type, ".md" ); // only create if not does not already exists @@ -111,7 +111,7 @@ pub fn create_note_file_with_folders(note_type: String) -> std::io::Result String { stats_content.push_str(&format!( "| {} | {} | {:.2} | {:.2} |\n", - &weekday, &work_stat.day, hours, cumulative_week_hours + weekday, work_stat.day, hours, cumulative_week_hours )); } } diff --git a/src/projects/initialize.rs b/src/projects/initialize.rs index 9677e00..32d2b8f 100644 --- a/src/projects/initialize.rs +++ b/src/projects/initialize.rs @@ -25,7 +25,7 @@ pub fn is_project_initialized() -> bool { let project_config_path = format!("{}/.nost/project.json", not_path); log::debug!( "Checking if configuration exists at path: {}", - &project_config_path + project_config_path ); Path::new(&project_config_path).is_file() } @@ -56,7 +56,7 @@ pub fn initialize_project() -> Result> { // create en empty configuration file let default_config_path = format!("{}{}", configuration_path, "project.json"); let config_file = std::fs::File::create(&default_config_path)?; - log::debug!("Configuration initialized at path: {}", &configuration_path); + log::debug!("Configuration initialized at path: {}", configuration_path); // append inital content to the configuration file const NOST_VERSION: &str = env!("CARGO_PKG_VERSION");