From 67bb281f9970f0c4f69120688bdcc7ce72dd655b Mon Sep 17 00:00:00 2001 From: anesthetice <118751106+anesthetice@users.noreply.github.com> Date: Wed, 19 Jun 2024 17:45:43 +0200 Subject: [PATCH] README update --- README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- src/config.rs | 2 +- 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0a72e36..f9ba10d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,22 @@ ## Syracuse -A cross-platform, cli-application written in rust meant to track and analyse your productivity +A cross-platform, cli-application written in rust meant to track and analyse your daily productivity. + +### Example +``` +syr graph --days 14 +``` +![with linear interpolation](https://private-user-images.githubusercontent.com/118751106/341134433-24810497-b03b-4b7d-8c19-3820473f4194.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg4MTE3OTksIm5iZiI6MTcxODgxMTQ5OSwicGF0aCI6Ii8xMTg3NTExMDYvMzQxMTM0NDMzLTI0ODEwNDk3LWIwM2ItNGI3ZC04YzE5LTM4MjA0NzNmNDE5NC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjE5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYxOVQxNTM4MTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hY2I2MmVkYThhNzNlMGY1ZDRmMmUwMzEyNzA3OTAwOWFmYjNhZmQ5ODhiZWEwNDc5ZjFlYjhkMDhkMTBmYjM3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.XSS_4RKYslKgrv56XNeGhrTPM76li6tHb-2ZDTdy8as) + +And if for some reason you despise linear interpolation you could try makima interpolation (overshoots, might impl Pchip in a future version) +![with makima interpolation](https://private-user-images.githubusercontent.com/118751106/341134384-46e8d934-efe3-4a84-8c29-edaf6fe3a84b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg4MTE3OTksIm5iZiI6MTcxODgxMTQ5OSwicGF0aCI6Ii8xMTg3NTExMDYvMzQxMTM0Mzg0LTQ2ZThkOTM0LWVmZTMtNGE4NC04YzI5LWVkYWY2ZmUzYTg0Yi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjE5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYxOVQxNTM4MTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wNjZjYjg5OWFlMDRjMzEzYmQwNjcyM2EwYTczMjRhZTNmZTQwMzlhNTBhM2ZiNDhkMjQ2MmVmYmRkZTIzOWJjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.SfK0w-KM5__p3ERenvM55wVBIY4-l5yuzmpnU9wwdME) + +``` +syr add MATH-251, numerical_analysis_2 +syr s numer +syr today --explicit +``` + ### Build @@ -10,9 +26,37 @@ cd Syracuse cargo build --release ``` +### Installation + +* follow the build instructions +* place the binary file into the directory of your choice +* add a method to call syracuse in the shell of your choice + +example for bash: +``` +function syr { + $HOME/Documents/Syracuse/syracuse-x86_64-unkown-linux-gnu $@ +} +``` + +example for fish: +``` +# .config/fish/functions/syr.fish +function syr + $HOME/Documents/Syracuse/syracuse-x86_64-unkown-linux-gnu $argv +end +``` +### Usage + +once installed simply run the binary with the --help flag for more info + +### Configuring + +see config.rs to view all options + ### Version 2 -Here are the improvements I am working on +Main improvements * modular entry system ✓ * increased stability, no mem::transmute ✓ diff --git a/src/config.rs b/src/config.rs index 8d0c2bf..c672ff7 100644 --- a/src/config.rs +++ b/src/config.rs @@ -47,7 +47,7 @@ pub struct Config { // empty string means where directory from which syracuse was executed pub graph_output_dir: String, - // Linear or Makima interpolation, note that Makima might overshoot + // "Linear" or "Makima" interpolation are currently available, note that Makima overshoots pub graph_interpolation_method: InterpolationMethod, // the number of points between a date and the next one that will be interpolated when graphing the sum of entries pub graph_nb_interpolated_points: usize,