Skip to content

Commit d4bdf03

Browse files
authored
Merge pull request #42 from PicoJr/dev
release 2.0.0
2 parents c2765cc + 810c9c4 commit d4bdf03

21 files changed

+1016
-268
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,38 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.0.0](https://crates.io/crates/rtw/2.0.0) Jul 30, 2020
9+
10+
* Stabilize multiple ongoing activities
11+
* Stabilize long descriptions
12+
13+
## 2.0.0-rc1 (not released on crates.io) Jul 20, 2020
14+
15+
* Timeline now displays ongoing activities.
16+
17+
## [2.0.0-beta](https://crates.io/crates/rtw/2.0.0-beta) Jul 16, 2020
18+
19+
This version is mostly backward compatible with previous `rtw` data,
20+
please discard ongoing activities (remove `~/.rtw.json`) before using this version.
21+
However previous versions of `rtw` will not work on data generated by this version.
22+
23+
* Support multiple ongoing activities.
24+
* Timeline now supports overlapping activities (experimental).
25+
* `stop` and `cancel` now have a `--id` optional parameter in order to disambiguate multiple ongoing activities.
26+
* Add `deny_overlapping` option to `rtw` config.
27+
* the json containing finished activities now also contains the `rtw` version.
28+
* add `-d` `--description` option for `start`, `track` and `summary` cf [#40](https://github.com/PicoJr/rtw/issues/40).
29+
* when provided, descriptions are used when exporting to calendar
30+
31+
## [2.0.0-alpha.1](https://crates.io/crates/rtw/2.0.0-alpha.1) Jul 12, 2020
32+
33+
* bump `htp` to 0.2.1 (fix `next <weekday>`)
34+
35+
## [2.0.0-alpha](https://crates.io/crates/rtw/2.0.0-alpha) Jul 5, 2020
36+
37+
* Replace `chrono-english` with `htp`.
38+
* Fix [#37](https://github.com/PicoJr/rtw/issues/37)
39+
840
## [1.5.0](https://crates.io/crates/rtw/1.5.0) Jun 21, 2020
941

1042
* add `completion <shell>` command.

Cargo.lock

Lines changed: 158 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rtw"
3-
version = "1.5.0"
3+
version = "2.0.0"
44
authors = ["PicoJr <picojr_dev@gmx.com>"]
55
edition = "2018"
66
repository = "https://github.com/PicoJr/rtw"
@@ -21,12 +21,13 @@ serde = { version = "1.0", features = ["derive"] }
2121
serde_json = "1.0"
2222
dirs = "2.0"
2323
chrono = { version = "0.4", features = ["serde"] }
24-
chrono-english = "0.1.4"
24+
htp = "0.2.1"
2525
config = "0.10.1"
2626
ansi_term = "0.12.1"
2727
term_size = "0.3.2"
28-
tbl = "1.1.0-alpha"
28+
tbl = "1.1.0-alpha.1"
2929
icalendar = "0.9.0"
30+
itertools = "0.9"
3031

3132
[dev-dependencies]
3233
tempfile = "3"

commands.md

Lines changed: 79 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
* [Track a finished activity](#track-a-finished-activity)
3333
* [Track a finished activity with dates](#track-a-finished-activity-with-dates)
3434
* [Track a finished activity the same day](#track-a-finished-activity-the-same-day)
35+
* [Track an activity and provide a long description](#track-an-activity-and-provide-a-long-description)
36+
* [For multitasking people](#for-multitasking-people)
37+
* [Start (overlapping) activities](#start-overlapping-activities)
38+
* [Stop ongoing activity](#stop-ongoing-activity)
3539

3640
<!--te-->
3741
Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
@@ -206,8 +210,6 @@ Example output:
206210
207211
## Display a timeline
208212

209-
:warning: does not work if some activities are overlapping.
210-
211213
### For the day
212214

213215
```bash
@@ -342,3 +344,78 @@ Started 2020-03-14T09:00:00
342344
Ended 2020-03-14T10:00:00
343345
Total 01:00:00
344346
```
347+
348+
## Track an activity and provide a long description
349+
350+
Example:
351+
352+
```
353+
rtw track 9 - 10 breakfast -d "I ate delicious pancakes"
354+
rtw summary -d
355+
```
356+
357+
output:
358+
```
359+
breakfast 2020-07-11T09:00:00 2020-07-11T10:00:00 01:00:00
360+
I ate delicious pancakes
361+
```
362+
363+
## For multitasking people
364+
365+
Requires `deny_overlapping: false` in `rtw_config.json`
366+
367+
### Start (overlapping) activities
368+
369+
Example:
370+
371+
```
372+
rtw start work
373+
rtw start child question -d "answer how fish can breath under water"
374+
rtw
375+
```
376+
377+
Output:
378+
379+
```
380+
./target/debug/rtw PicoJr
381+
Tracking work
382+
Total 00:03:03
383+
Id 0
384+
Tracking child question
385+
Total 00:01:25
386+
Id 1
387+
```
388+
389+
### Stop ongoing activity
390+
391+
`--id` is only required when ongoing activities > 1.
392+
393+
Example:
394+
395+
```
396+
rtw stop --id 1
397+
```
398+
399+
Output:
400+
401+
``` PicoJr
402+
Recorded child question
403+
Started 2020-07-14T10:54:36
404+
Ended 2020-07-14T10:57:23
405+
Total 00:02:47
406+
```
407+
408+
stop the other remaining ongoing activity:
409+
410+
```
411+
rtw stop
412+
```
413+
414+
Output:
415+
416+
```
417+
Recorded work
418+
Started 2020-07-14T10:52:58
419+
Ended 2020-07-14T11:00:17
420+
Total 00:07:18
421+
```

example/rtw_config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"storage_dir_path": "/home/nol",
3-
"timeline_colors": [[183,28,28], [26,35,126], [0,77,64], [130,119,23]]
3+
"timeline_colors": [[183,28,28], [26,35,126], [0,77,64], [130,119,23]],
4+
"deny_overlapping": true
45
}

release.bash

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ RELEASE_DIR="release$(date +%F-%H-%M-%S)"
44

55
rustfmt --check src/**/*.rs &&
66
cargo test &&
7-
cargo build --release &&
7+
docker run --rm -it -v "$(pwd)":/home/rust/src ekidd/rust-musl-builder cargo build --release &&
88
mkdir -p ${RELEASE_DIR} &&
9-
cp -r ./CHANGELOG.md ./commands.md ./shell-completion.md example/ img/ ./README.md ./LICENSE target/release/rtw ${RELEASE_DIR}
9+
cp -r ./CHANGELOG.md ./commands.md ./shell-completion.md \
10+
example/ img/ ./README.md ./LICENSE ${RELEASE_DIR} &&
11+
cp target/x86_64-unknown-linux-musl/release/rtw ${RELEASE_DIR}/rtw-x86_64-unknown-linux-musl
12+

0 commit comments

Comments
 (0)