Skip to content

Commit

Permalink
Add days option for log command to README
Browse files Browse the repository at this point in the history
  • Loading branch information
ioanniswd committed Oct 25, 2021
1 parent baa5cc6 commit 955e24c
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ $ stup log previous-week
The full version of the command:

```bash
$ stup log --from <from-date> --to <to-date> -c <category-name>
$ stup log [--from <from-date>] [--to <to-date>] [--days <days-before/after>] [-c <category-name>]

# or using an alias

Expand All @@ -276,6 +276,7 @@ where:
- this is also optional and if omitted the notes to be displayed won't have be **added before a specific date**
* `-c` or `--category`: is the category option (optional). **If omitted, you will view the notes of all categories**
* `<category-name>`: the name of the category whose notes you want to see
* `days-before/after`: When used with `--from` or `--to`, denotes how many days after or before that date should be logged; when used alone, that many last days with notes are shown.

In the second version of the command, you can use the temporal aliases that will be translated to proper from/to dates.

Expand Down Expand Up @@ -303,6 +304,18 @@ $ stup log previous-week
$ stup previous-week
```

##### Log notes of the last X days, where notes exist

```bash
# Log notes of the last 3 days
$ stup log --days 3
```

```bash
# Log notes for the category "meetings", of the last 2 days
$ stup log -c "meetings" --days 2
```

##### Log of notes added in a specific period

```bash
Expand Down Expand Up @@ -333,6 +346,26 @@ $ stup log --from 2020-01-15 -c blocking
$ stup --from 2020-01-15 -c blocking
```

##### Log of notes added after a specific date and for a specified number of days

```bash
$ stup log --from 2020-01-15 --days 4

# or

$ stup --from 2020-01-15 --days 4
```

##### Log of notes added up until a specific date going back a specified number of days

```bash
$ stup log --to 2020-02-01 --days 4

# or

$ stup --to 2020-02-01 --days 4
```

### Search notes

To search your notes, use the `search` command.
Expand Down

0 comments on commit 955e24c

Please sign in to comment.