diff --git a/CHANGELOG.md b/CHANGELOG.md index 124f846..99e6848 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to `stup` will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [0.1.4] - 2020-04-28 + +### Added + +- Default to logging action if timespan set (ex. week, previous-month etc) + +### Changed + +- Optimized logging command + ## [0.1.3] - 2020-04-27 ### Added diff --git a/README.md b/README.md index 7e1de73..ec90382 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A CLI tool to easily save, access and organize daily notes. -![Version badge](https://img.shields.io/badge/version-0.1.3-green.svg) +![Version badge](https://img.shields.io/badge/version-0.1.4-green.svg) [![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-) @@ -237,53 +237,6 @@ $ stup show @ 2020-04-01 $ stup show today -n "pull-requests" ``` -### Edit notes - -To manually edit notes added in a specific date use the `edit` command. - -```bash -$ stup edit yesterday -``` - -The full version of the command as below: - -```bash -stup edit @|--at|-@ -c|--category "" -``` - -where: - * ``: specifies in which date the notes should be added. Its value can be: - * any of the words: `today`, `tomorrow`, `yesterday` in which case you can omit the `@`|`--at`|`-@` option - * a date string in the form: `YYYY-MM-DD`, for example: 2020-04-12 - * **if you omit this option, `stup` by default will edit the notes in the current date** - * `-c` or `--category`: is the category option (optional). **If omitted, you will edit the notes of your default category** - * ``: the name of the category in which the notes will be added - -**Note:** If there are no notes for a specific date and category, you will be asked if you want to create and edit the file anyway. - -#### Examples - -##### Editing yesterday's notes - -```bash -# Ommiting category option, implying the default one -$ stup edit yesterday - -# Editing yesterday's notes for the category with name "blocking" -$ stup edit @ yesterday -c "blocking" -``` - -##### Editing notes on specific date - -```bash -# Ommiting category option, implying the default one -$ stup edit @ 2020-03-24 - -# Editing notes saved on March 24th, 2020 for the category with name "blocking" -$ stup edit @ 2020-03-24 -c "blocking" -``` - - ### Log notes To list your notes for a given period, use the `log` command. @@ -313,32 +266,108 @@ where: In the second version of the command, you can use the temporal aliases that will be translated to proper from/to dates. +In both case, you may skip the `log` literal given that you set either an alias or one of the `from` and `to` flags. + #### Examples ##### Log of this week's notes ```bash $ stup log week + +# or + +$ stup week ``` ##### Log of previous week's notes ```bash $ stup log previous-week + +# or + +$ stup previous-week ``` ##### Log of notes added in a specific period ```bash $ stup log --from 2020-01-15 --to 2020-02-01 + +# or + +$ stup --from 2020-01-15 --to 2020-02-01 ``` ##### Log of notes added in a specific period in the category "blocking" ```bash $ stup log --from 2020-01-15 --to 2020-02-01 -c blocking + +# or + +$ stup --from 2020-01-15 --to 2020-02-01 -c blocking +``` + +##### Log of notes added after a specific date in the category "blocking" + +```bash +$ stup log --from 2020-01-15 -c blocking + +# or + +$ stup --from 2020-01-15 -c blocking +``` + +### Edit notes + +To manually edit notes added in a specific date use the `edit` command. + +```bash +$ stup edit yesterday +``` + +The full version of the command as below: + +```bash +stup edit @|--at|-@ -c|--category "" ``` +where: + * ``: specifies in which date the notes should be added. Its value can be: + * any of the words: `today`, `tomorrow`, `yesterday` in which case you can omit the `@`|`--at`|`-@` option + * a date string in the form: `YYYY-MM-DD`, for example: 2020-04-12 + * **if you omit this option, `stup` by default will edit the notes in the current date** + * `-c` or `--category`: is the category option (optional). **If omitted, you will edit the notes of your default category** + * ``: the name of the category in which the notes will be added + +**Note:** If there are no notes for a specific date and category, you will be asked if you want to create and edit the file anyway. + +#### Examples + +##### Editing yesterday's notes + +```bash +# Ommiting category option, implying the default one +$ stup edit yesterday + +# Editing yesterday's notes for the category with name "blocking" +$ stup edit @ yesterday -c "blocking" +``` + +##### Editing notes on specific date + +```bash +# Ommiting category option, implying the default one +$ stup edit @ 2020-03-24 + +# Editing notes saved on March 24th, 2020 for the category with name "blocking" +$ stup edit @ 2020-03-24 -c "blocking" +``` + + + ### Add a new category To add a new category to save notes into use the following command. diff --git a/stup b/stup index 8435feb..9d2094c 100755 --- a/stup +++ b/stup @@ -49,7 +49,7 @@ TEXT_GREY=$(tput setaf 248) # Version # TODO: update version upon new releases -VERSION="v0.1.3" +VERSION="v0.1.4" # Some defaults (can be changed from configuration file) DEFAULT_COMMAND="show"