dsu 2.0.8 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +39 -2
- data/Gemfile.lock +9 -9
- data/README.md +178 -69
- data/lib/core/ruby/color_theme_mode.rb +1 -1
- data/lib/dsu/base_cli.rb +3 -17
- data/lib/dsu/cli.rb +44 -72
- data/lib/dsu/command_services/add_entry_service.rb +1 -1
- data/lib/dsu/env.rb +4 -0
- data/lib/dsu/models/color_theme.rb +2 -2
- data/lib/dsu/models/configuration.rb +3 -1
- data/lib/dsu/models/entry_group.rb +1 -1
- data/lib/dsu/presenters/color_theme_presenter.rb +4 -2
- data/lib/dsu/presenters/color_theme_show_presenter.rb +9 -3
- data/lib/dsu/presenters/configuration_presenter.rb +2 -2
- data/lib/dsu/presenters/entry_group_presenter.rb +2 -2
- data/lib/dsu/services/entry_group/counter_service.rb +32 -0
- data/lib/dsu/services/entry_group/deleter_service.rb +35 -0
- data/lib/dsu/services/entry_group/editor_service.rb +7 -11
- data/lib/dsu/subcommands/base_subcommand.rb +0 -2
- data/lib/dsu/subcommands/config.rb +17 -74
- data/lib/dsu/subcommands/delete.rb +107 -0
- data/lib/dsu/subcommands/edit.rb +16 -30
- data/lib/dsu/subcommands/list.rb +26 -96
- data/lib/dsu/subcommands/theme.rb +50 -79
- data/lib/dsu/support/ask.rb +1 -1
- data/lib/dsu/support/command_help_colorizeable.rb +7 -0
- data/lib/dsu/support/command_hookable.rb +2 -0
- data/lib/dsu/support/command_options/dsu_times.rb +10 -10
- data/lib/dsu/support/command_options/time.rb +1 -0
- data/lib/dsu/support/command_options/time_mnemonic.rb +108 -0
- data/lib/dsu/support/command_options/{time_mneumonics.rb → time_mnemonics.rb} +2 -1
- data/lib/dsu/support/time_formatable.rb +13 -0
- data/lib/dsu/validators/description_validator.rb +2 -0
- data/lib/dsu/validators/entries_validator.rb +1 -0
- data/lib/dsu/version.rb +1 -1
- data/lib/dsu/views/color_theme/show.rb +1 -0
- data/lib/dsu/views/entry_group/edit.rb +2 -1
- data/lib/dsu/views/entry_group/shared/no_entries_to_display.rb +4 -1
- data/lib/dsu/views/shared/model_errors.rb +1 -0
- data/lib/dsu.rb +5 -1
- data/lib/locales/en/active_record.yml +8 -0
- data/lib/locales/en/commands.yml +136 -0
- data/lib/locales/en/miscellaneous.yml +23 -0
- data/lib/locales/en/presenters.yml +19 -0
- data/lib/locales/en/services.yml +10 -0
- data/lib/locales/en/subcommands.yml +348 -0
- metadata +26 -27
- data/exe/dsu_migrate.rb +0 -43
- data/lib/dsu/support/command_options/time_mneumonic.rb +0 -108
- data/lib/dsu/support/subcommand_help_colorizeable.rb +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f56239cec153192ff0f815e124e8001ab7676c418f334ff328512c6cfc11eeb4
|
4
|
+
data.tar.gz: d0072d4760663b70d32fa5695c6dbae27db960b95017a0a49598ef53a0bba588
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e60d02338b12cd52c7f2a0b4f8f5f633879c6c3e7614b8fd1563d03348e778e9cb6f83a674e0be9bf53b5cac878e058d045834ce7c0f615e12129830fc2ca5b
|
7
|
+
data.tar.gz: d6807da2999520c94dbe54b5439b52a386701a20e0696e700028dac4de106ab14661ef8b5f133f7265da3994cf438bd089d2d9504314932d423464a2dfaae331
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,40 @@
|
|
1
|
+
## [2.1.2] 2023-12-17
|
2
|
+
|
3
|
+
Changes
|
4
|
+
|
5
|
+
- WIP, continued I18n integration. See [2.1.0] for more information.
|
6
|
+
- Removed shortcut mappings for all commands (see `dsu help`) to remove dash ("-") preceeding command shortcuts. For example, `dsu -a` (i.e. shortcut for `dsu add`) is now `dsu a`, `dsu -c` (i.e. shortcut for `dsu config`) is now `dsu c`, etc. This was done to avoid confusion as this format is typically used for options, not shortcut commands. The only exception is `dsu version` which will accept shortcuts `dsu v` and `dsu -v`, as `-v` is generally used to display version information.
|
7
|
+
- Various code refactors.
|
8
|
+
- Massive updates to README.md.
|
9
|
+
|
10
|
+
Bug fixes
|
11
|
+
|
12
|
+
- Fix bug that did not apply the current theme to `dsu help add` help.
|
13
|
+
|
14
|
+
## [2.1.1] 2023-12-17
|
15
|
+
|
16
|
+
Bug fixes
|
17
|
+
|
18
|
+
- Fix bug that did not included I18n locale files in yanked version 2.1.0.
|
19
|
+
|
20
|
+
|
21
|
+
## [2.1.0] 2023-12-16
|
22
|
+
|
23
|
+
Enhancements
|
24
|
+
|
25
|
+
- Added `dsu delete` command to incorporate color themes. See `dsu help delete` for more information.
|
26
|
+
|
27
|
+
Bug fixes
|
28
|
+
|
29
|
+
- Fix bug that failed to show "(nothing to display for <day>, <date> <local time designator> through <day>, <date> <local time designator>)" for `dsu list dates` command when no entries existed for the entry groups associated with the given dates.
|
30
|
+
|
31
|
+
Miscellaneous
|
32
|
+
|
33
|
+
- WIP, begin I18n support/integration.
|
34
|
+
- Update ruby gems.
|
35
|
+
- Updated README.md to reflect new `dsu delete` command.
|
36
|
+
- Fix rubocop violations.
|
37
|
+
|
1
38
|
## [2.0.8] 2023-12-02
|
2
39
|
|
3
40
|
- Update ruby gems.
|
@@ -89,11 +126,11 @@ See previous alpha releases for changes.
|
|
89
126
|
|
90
127
|
Changes
|
91
128
|
|
92
|
-
- For convenience, the `dsu list date` command now takes a
|
129
|
+
- For convenience, the `dsu list date` command now takes a MNEMONIC in addition to a DATE. See `dsu list help date` for more information.
|
93
130
|
|
94
131
|
Bug fixes
|
95
132
|
|
96
|
-
- Fix a bug that did not display `dsu list dates SUBCOMMAND` date list properly when the `--from` option was a date
|
133
|
+
- Fix a bug that did not display `dsu list dates SUBCOMMAND` date list properly when the `--from` option was a date mnemonic and the `--to` optoin was a relative time mnemonic (e.g. `dsu list dates -f today -t +1`). In this case, DSU dates `Time.now` and `Time.now.tomorrow` should be displayed; instead, the bug would consider the `--to` option as relative to `Time.now`, so only 1 DSU date (`Time.now` would be returned).
|
97
134
|
|
98
135
|
## [1.1.0.alpha.1] 2023-05-23
|
99
136
|
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dsu (2.
|
4
|
+
dsu (2.1.2)
|
5
5
|
activemodel (>= 7.0.8, < 8.0)
|
6
6
|
activesupport (>= 7.0.8, < 8.0)
|
7
7
|
colorize (>= 0.8.1, < 1.0)
|
@@ -26,7 +26,7 @@ GEM
|
|
26
26
|
tzinfo (~> 2.0)
|
27
27
|
ast (2.4.2)
|
28
28
|
base64 (0.2.0)
|
29
|
-
bigdecimal (3.1.
|
29
|
+
bigdecimal (3.1.5)
|
30
30
|
byebug (11.1.3)
|
31
31
|
coderay (1.1.3)
|
32
32
|
colorize (0.8.1)
|
@@ -42,14 +42,14 @@ GEM
|
|
42
42
|
ffaker (2.23.0)
|
43
43
|
i18n (1.14.1)
|
44
44
|
concurrent-ruby (~> 1.0)
|
45
|
-
json (2.7.
|
45
|
+
json (2.7.1)
|
46
46
|
kwalify (0.7.2)
|
47
47
|
language_server-protocol (3.17.0.3)
|
48
48
|
method_source (1.0.0)
|
49
49
|
minitest (5.20.0)
|
50
50
|
mutex_m (0.2.0)
|
51
51
|
os (1.1.4)
|
52
|
-
parallel (1.
|
52
|
+
parallel (1.24.0)
|
53
53
|
parser (3.2.2.4)
|
54
54
|
ast (~> 2.4.1)
|
55
55
|
racc
|
@@ -66,7 +66,7 @@ GEM
|
|
66
66
|
kwalify (~> 0.7.0)
|
67
67
|
parser (~> 3.2.0)
|
68
68
|
rainbow (>= 2.0, < 4.0)
|
69
|
-
regexp_parser (2.8.
|
69
|
+
regexp_parser (2.8.3)
|
70
70
|
rexml (3.2.6)
|
71
71
|
rspec (3.12.0)
|
72
72
|
rspec-core (~> 3.12.0)
|
@@ -81,7 +81,7 @@ GEM
|
|
81
81
|
diff-lcs (>= 1.2.0, < 2.0)
|
82
82
|
rspec-support (~> 3.12.0)
|
83
83
|
rspec-support (3.12.1)
|
84
|
-
rubocop (1.
|
84
|
+
rubocop (1.59.0)
|
85
85
|
json (~> 2.3)
|
86
86
|
language_server-protocol (>= 3.17.0)
|
87
87
|
parallel (~> 1.10)
|
@@ -98,9 +98,9 @@ GEM
|
|
98
98
|
rubocop (~> 1.41)
|
99
99
|
rubocop-factory_bot (2.24.0)
|
100
100
|
rubocop (~> 1.33)
|
101
|
-
rubocop-performance (1.
|
102
|
-
rubocop (>= 1.
|
103
|
-
rubocop-ast (>=
|
101
|
+
rubocop-performance (1.20.0)
|
102
|
+
rubocop (>= 1.48.1, < 2.0)
|
103
|
+
rubocop-ast (>= 1.30.0, < 2.0)
|
104
104
|
rubocop-rspec (2.25.0)
|
105
105
|
rubocop (~> 1.40)
|
106
106
|
rubocop-capybara (~> 2.17)
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# `dsu
|
1
|
+
# `dsu`- Streamline Your Daily Stand-Up Meeting Participation!
|
2
2
|
|
3
3
|
[![GitHub version](http://badge.fury.io/gh/gangelo%2Fdsu.svg)](https://badge.fury.io/gh/gangelo%2Fdsu)
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/dsu.svg)](https://badge.fury.io/rb/dsu)
|
@@ -6,10 +6,27 @@
|
|
6
6
|
[![Report Issues](https://img.shields.io/badge/report-issues-red.svg)](https://github.com/gangelo/dsu/issues)
|
7
7
|
[![License](http://img.shields.io/badge/license-MIT-yellowgreen.svg)](#license)
|
8
8
|
|
9
|
-
|
10
|
-
`dsu` is a simple, but powerful little gem I wrote for myself to help me manage my Agile DSU (Daily Stand Up) participation. How? by providing a simple command line interface (CLI) which allows me to create, read, update, and delete (CRUD) DSU entries on a daily basis. During my DSU, I'm then able to list, recall and share my DSU activities with my team. DSU entries are grouped by day and are viewed in simple text format from the command line, in a myriad of ways, to meet my personal needs. When viewing DSU entries for a particular day, `dsu` will automatically display the previous day's activities as well, using the typical "what I did yesterday", "What I'm doing today" DSU paradigm. If the DSU date I am trying to view falls on a weekend or Monday, `dsu` will automatically display back to and including the weekend and previous Friday (inclusive), so that I can share what I did over the weekend (if anything) and "last" Friday.
|
9
|
+
<img align="center" src="https://i.imgur.com/ff79twF.gif" alt="dsu" />
|
11
10
|
|
12
|
-
|
11
|
+
## Simplify Your Agile Routine
|
12
|
+
`dsu` is a sleek and powerful gem that transforms the way you participate in Agile Daily Stand-Ups (DSU). It's designed for developers who love simplicity and efficiency. With `dsu`, you get a user-friendly command-line interface to quickly manage your daily stand-up activities.
|
13
|
+
|
14
|
+
## Why dsu?
|
15
|
+
- **Organize Your Tasks:** Easily add, view, update, or delete your DSU entries.
|
16
|
+
- **Be Prepared:** Instantly list out your activities for "Yesterday" and plans for "Today" during stand-ups.
|
17
|
+
- **Smart Handling of Dates:** `dsu` intelligently includes your weekend and previous Friday activities when necessesary, so you're always ready to share comprehensive updates.
|
18
|
+
- **CLI Lovers Rejoice:** If you're a fan of simple command-line tools, `dsu` is a perfect fit.
|
19
|
+
|
20
|
+
### Getting Started Is Easy
|
21
|
+
Just run `gem install dsu` from your terminal, and you're on your way to more organized and efficient stand-ups. Check out the help section with `$ dsu help` for quick guidance.
|
22
|
+
|
23
|
+
## Engage with `dsu`
|
24
|
+
Found `dsu` helpful? Star it on GitHub and spread the word! Your feedback and contributions are welcome to make `dsu` even better.
|
25
|
+
|
26
|
+
## Quick Install
|
27
|
+
```shell
|
28
|
+
gem install dsu
|
29
|
+
```
|
13
30
|
|
14
31
|
## Help
|
15
32
|
|
@@ -19,68 +36,87 @@ After installation (`gem install dsu`), the first thing you may want to do is ru
|
|
19
36
|
```shell
|
20
37
|
#=>
|
21
38
|
Commands:
|
22
|
-
dsu add
|
23
|
-
dsu config
|
24
|
-
dsu
|
25
|
-
dsu
|
26
|
-
dsu
|
27
|
-
dsu
|
28
|
-
dsu
|
29
|
-
dsu
|
39
|
+
dsu add|a [OPTIONS] DESCRIPTION # Adds a DSU entry...
|
40
|
+
dsu config|c SUBCOMMAND # Manage configuration...
|
41
|
+
dsu delete|d SUBCOMMAND # Delete DSU entries...
|
42
|
+
dsu edit|e SUBCOMMAND # Edit DSU entries...
|
43
|
+
dsu help [COMMAND] # Describe available...
|
44
|
+
dsu info|i # Displays information...
|
45
|
+
dsu list|l SUBCOMMAND # Displays DSU entries...
|
46
|
+
dsu theme|t SUBCOMMAND # Manage DSU themes...
|
47
|
+
dsu version|-v|v # Displays this gem version
|
30
48
|
|
31
49
|
Options:
|
32
50
|
[--debug], [--no-debug]
|
33
51
|
```
|
34
52
|
|
35
|
-
|
53
|
+
# Using `dsu`
|
54
|
+
The folowing section outlines how to use the `dsu` gem.
|
36
55
|
|
37
56
|
## Adding DSU Entries
|
57
|
+
The next thing you may want to do is `add` some DSU activities (entries) for a particular day:
|
58
|
+
|
38
59
|
`dsu add [OPTIONS] DESCRIPTION`
|
60
|
+
`dsu a [OPTIONS] DESCRIPTION`
|
39
61
|
|
40
|
-
Adding DSU entry using this command will _add_ the DSU entry for the given day
|
62
|
+
Adding DSU entry using this command will _add_ the DSU entry for the given day or date, and then _display_ the DSU entries for that day or date.
|
63
|
+
|
64
|
+
**NOTE:** You cannot add duplicate entries for the same day; that is, entry DESCRIPTIONS need to be unique within an entry group for the given day.
|
41
65
|
|
42
66
|
### Today
|
43
|
-
If you need to add a DSU entry
|
67
|
+
If you need to add a DSU entry for the current day (today), you can use the `-n`|`--today` option. Today (`-n`) is the default; therefore, the `-n` flag is optional if you want to add a DSU entry for the _current day_ (today). For example, the below commands will both accomplish the same thing:
|
44
68
|
|
45
|
-
`$ dsu add -n
|
69
|
+
`$ dsu add [-n|--today] "Pair with John on ticket IN-12345"`
|
70
|
+
`$ dsu a "Pair with John on ticket IN-12345"`
|
46
71
|
|
47
72
|
### Yesterday
|
48
|
-
If for some reason you need to add a DSU entry for yesterday, you can use the `-y`| `--yesterday` option:
|
73
|
+
If for some reason you need to add a DSU entry for yesterday, you can use the `-y`| `--yesterday` option. Both of the below commands accomplish the same thing:
|
49
74
|
|
50
|
-
`$ dsu add
|
75
|
+
`$ dsu add --yesterday "Pick up ticket IN-12345"`
|
76
|
+
`$ dsu a -y "Pick up ticket IN-12345"`
|
51
77
|
|
52
78
|
### Tomorrow
|
53
79
|
If you need to add a DSU entry for tomorrow, you can use the `-t`|`--tomorrow` option:
|
54
80
|
|
55
|
-
`$ dsu add
|
81
|
+
`$ dsu add --tomorrow "Pick up ticket IN-12345"`
|
82
|
+
`$ dsu a -t "Pick up ticket IN-12345"`
|
56
83
|
|
57
84
|
### Miscellaneous Date
|
58
85
|
|
59
|
-
Both of the below examples will accomplish the same thing, assuming the current year is 2023; the current year is assumed
|
86
|
+
Both of the below examples will accomplish the same thing, assuming the current year is 2023; the current year is assumed when omitted:
|
87
|
+
|
88
|
+
**NOTE:** When **omitting year**, dates must be entered in `MM/DD` format.
|
89
|
+
**NOTE:** When **including year**, dates must be entered in `YYYY/MM/DD` format.
|
60
90
|
|
61
|
-
`$ dsu add
|
62
|
-
`$ dsu
|
91
|
+
`$ dsu add --date 2023/12/31 "Attend New Years Coffee Meet & Greet"`
|
92
|
+
`$ dsu a -d 12/31 "Attend New Years Coffee Meet & Greet"`
|
63
93
|
|
64
94
|
See the [Dates](#dates) section for more information on acceptable DATE formats used by `dsu`.
|
65
95
|
|
66
96
|
## Displaying DSU Entries
|
67
|
-
You can display DSU entries for a particular day or date
|
97
|
+
You can display DSU entries for a particular day or date using any of the following commands. When displaying DSU entries for a particular day or date, `dsu` will display the DSU entries for the given day or date, as well as the DSU entries for the _previous_ day, relative to the given day or date. If the given day or date falls on a weekend or Monday, `dsu` will display any entries for the preceeding weekend _and_ Friday; this is so that you can share any activities that occurred over the weekend (if anything) as well as any activities for the previous Friday:
|
68
98
|
|
69
|
-
- `$ dsu list today
|
99
|
+
- `$ dsu list today`
|
100
|
+
- `$ dsu l n` # Equivalent to the above, only using shortcuts
|
70
101
|
- `$ dsu list tomorrow|t`
|
102
|
+
- `$ dsu l t` # Equivalent to the above, only using shortcuts
|
71
103
|
- `$ dsu list yesterday|y`
|
72
|
-
- `$ dsu
|
104
|
+
- `$ dsu l y` # Equivalent to the above, only using shortcuts
|
105
|
+
- `$ dsu list date|d DATE|MNEMONIC`
|
106
|
+
- `$ dsu l d DATE|MNEMONIC` # Equivalent to the above, only using shortcuts
|
73
107
|
- `$ dsu list dates|dd OPTIONS`
|
108
|
+
- `$ dsu l dd OPTIONS` # Equivalent to the above, only using shortcuts
|
74
109
|
|
75
110
|
See the [Dates](#dates) section for more information on acceptable DATE formats used by `dsu`.
|
76
|
-
See the [
|
111
|
+
See the [Mnemonics](#mnemonics) section for more information on acceptable MNEMONIC rules and formats used by `dsu`.
|
77
112
|
|
78
|
-
IMPORTANT
|
113
|
+
**IMPORTANT:** In some cases the behavior _relative date mnemonics_ (RDMs, see the [Mnemonics](#mnemonics) section for more information about RDMs) have on some commands are context dependent; in such cases the behavior will be noted in the help appropriate to the command, for example see the following `dsu` command help: `dsu list help date` and `dsu list help dates`.
|
79
114
|
|
80
115
|
### Examples
|
81
116
|
The following displays the entries for "Today", where `Time.now == '2023-05-06 08:54:57.6861 -0400'`
|
82
117
|
|
83
118
|
`$ dsu list today`
|
119
|
+
`$ dsu l t`
|
84
120
|
```shell
|
85
121
|
#=>
|
86
122
|
Saturday, (Today) 2023-05-06
|
@@ -91,47 +127,54 @@ Friday, (Yesterday) 2023-05-05
|
|
91
127
|
2. Attend new hire meet & greet
|
92
128
|
```
|
93
129
|
|
94
|
-
`$ dsu list date 5/
|
95
|
-
`$ dsu list
|
130
|
+
`$ dsu list date 5/7/2023`
|
131
|
+
`$ dsu list d 2023/7/5`
|
132
|
+
`$ dsu l d 7/5` # When omitting YYYY, MM/DD is assumed
|
96
133
|
|
97
134
|
```shell
|
98
135
|
#=>
|
99
|
-
|
136
|
+
Wednesday, (Today) 2023-07-05
|
100
137
|
1. Blocked for locally failing test IN-12345
|
101
138
|
|
102
|
-
|
139
|
+
Tuesday, (Yesterday) 2023-07-04
|
103
140
|
1. Pick up ticket IN-12345
|
104
141
|
2. Attend new hire meet & greet
|
105
142
|
```
|
143
|
+
**NOTE:** If `DATE` (`date`|`d`) falls on a weekend or Monday, `dsu` will display any entries for the preceeding weekend _and_ Friday.
|
106
144
|
|
107
145
|
#### Listing Date Ranges
|
108
|
-
For more information, see the [
|
109
|
-
|
110
|
-
Output omitted for brevity...
|
111
|
-
|
112
|
-
Display the DSU entries for the last 3 days.
|
146
|
+
For more information, see the [Mnemonics](#mnemonics) section for more information on acceptable MNEMONIC rules and formats used by `dsu`.
|
113
147
|
|
114
|
-
|
148
|
+
**NOTE:** Output omitted for brevity...
|
115
149
|
|
116
|
-
Display the DSU entries for
|
150
|
+
##### Display the DSU entries for the last 3 days
|
151
|
+
`$ dsu list dates --from yesterday --to -2`
|
152
|
+
`$ dsu l dd -f y -t -2`
|
117
153
|
|
118
|
-
|
154
|
+
##### Display the DSU entries for 1/1 to 1/4 for the current year
|
155
|
+
`$ dsu list dates --from 1/1 --to +3`
|
156
|
+
`$ dsu l dd -f 1/1 -t +3`
|
119
157
|
|
120
|
-
Display the DSU entries for 1/2 to 1/5
|
158
|
+
##### Display the DSU entries for 1/2 to 1/5
|
159
|
+
`$ dsu list dates --from 1/5 --to -3`
|
160
|
+
`$ dsu l dd -f 1/5 -t -3`
|
121
161
|
|
122
|
-
|
162
|
+
##### Display the DSU entries for the last week
|
163
|
+
`$ dsu list dates --from today --to -6`
|
164
|
+
`$ dsu l dd -f n -t -6`
|
123
165
|
|
124
|
-
Display the DSU entries
|
166
|
+
##### Display the DSU entries back 1 week from yesterday's date
|
167
|
+
`$ dsu list dates --from -7 --to +6`
|
168
|
+
`$ dsu l dd -f -7 -t +6`
|
125
169
|
|
126
|
-
`
|
170
|
+
**NOTE:** **The above example is silly,** but it illustrates the fact that you can use relative mnemonics for both `--from` and `--to` options. While you *can* use relative mnemonics for both the `--from` and `--to` options, there is usually a more intuitive way.
|
127
171
|
|
128
|
-
|
172
|
+
For example:
|
129
173
|
|
130
|
-
`
|
174
|
+
This can be accomplished MUCH easier by using the `yesterday` mnemonic. This will display the DSU entries back 1 week from yesterday's date.
|
131
175
|
|
132
|
-
|
133
|
-
|
134
|
-
`dsu list dates --from yesterday --to -6`
|
176
|
+
`$ dsu list dates --from yesterday --to -6`
|
177
|
+
`$ dsu l dd -f y -t -6`
|
135
178
|
|
136
179
|
## Editing DSU Entries
|
137
180
|
|
@@ -139,14 +182,18 @@ You can edit DSU entry groups by date. `dsu` will allow you to edit a DSU entry
|
|
139
182
|
|
140
183
|
If no entries exist for the DSU date, the editor will open and allow you to add entries for that date. If you have the `:carry_over_entries_to_today` configuration option setting set to `true`, entries from the last DSU date will be copied into the editor for your convenience.
|
141
184
|
|
142
|
-
|
185
|
+
**NOTE:** duplicate entries are not allowed; that is, the entry DESCRIPTION must be unique within an entry group. Non-unique entries will not be added to the entry group. The same holds true for entries whose DESCRIPTION that do not pass validation (between 2 and 256 characters (inclusive) in length).
|
143
186
|
|
144
|
-
NOTE
|
187
|
+
**NOTE:** See the "[Customizing the `dsu` Configuration File](#customizing-the-dsu-configuration-file)" section to configure `dsu` to use the editor of your choice and other configuration options to make editing more convenient.
|
145
188
|
|
146
|
-
- `$ dsu edit today
|
147
|
-
- `$ dsu
|
148
|
-
- `$ dsu edit
|
149
|
-
- `$ dsu
|
189
|
+
- `$ dsu edit today`
|
190
|
+
- `$ dsu e n` # Equivalent to the above, only using shortcuts
|
191
|
+
- `$ dsu edit tomorrow`
|
192
|
+
- `$ dsu e t` # Equivalent to the above, only using shortcuts
|
193
|
+
- `$ dsu edit yesterday`
|
194
|
+
- `$ dsu e y` # Equivalent to the above, only using shortcuts
|
195
|
+
- `$ dsu edit date DATE`
|
196
|
+
- `$ dsu e d DATE` # Equivalent to the above, only using shortcuts
|
150
197
|
|
151
198
|
### Examples
|
152
199
|
|
@@ -229,10 +276,79 @@ from: Interative planning meeting 11:00AM.
|
|
229
276
|
Pair with Chad on ticket 31211.
|
230
277
|
Interative planning meeting 11:00AM.
|
231
278
|
```
|
279
|
+
## Deleting DSU Entry Groups
|
280
|
+
You can delete DSU entry groups; this will delete *all* the entries for the particular day or date range. When deleting DSU entries for a particular day (`date`, `today`, `tomorrow`, `yesterday`), or date range (`dates`), `dsu` will delete the entry group(s) and *all* the associated entries for that day or date range:
|
281
|
+
|
282
|
+
- `$ dsu delete today`
|
283
|
+
- `$ dsu d n` # Equivalent to the above, only using shortcuts
|
284
|
+
- `$ dsu delete tomorrow`
|
285
|
+
- `$ dsu d t` # Equivalent to the above, only using shortcuts
|
286
|
+
- `$ dsu delete yesterday`
|
287
|
+
- `$ dsu d y` # Equivalent to the above, only using shortcuts
|
288
|
+
- `$ dsu delete date DATE|MNEMONIC`
|
289
|
+
- `$ dsu d d DATE|MNEMONIC` # Equivalent to the above, only using shortcuts
|
290
|
+
- `$ dsu delete dates OPTIONS`
|
291
|
+
- `$ dsu d dd OPTIONS` # Equivalent to the above, only using shortcuts
|
292
|
+
|
293
|
+
**NOTE:** Before any of the above `dsu` commands are executed, `dsu` will prompt you to confirm the delete; you can continue ('y') or cancel ('N').
|
294
|
+
|
295
|
+
See the [Dates](#dates) section for more information on acceptable DATE formats used by `dsu`.
|
296
|
+
See the [Mnemonics](#mnemonics) section for more information on acceptable MNEMONIC rules and formats used by `dsu`.
|
297
|
+
|
298
|
+
**IMPORTANT:** In some cases the behavior that _relative date mnemonics_ (RDMs, see the [Mnemonics](#mnemonics) section for more information about RDMs) have on some commands are context dependent; in such cases the behavior will be noted in the help appropriate to the command, for example see the following `dsu` command help: `dsu delete help date` and `dsu delete help dates`.
|
299
|
+
|
300
|
+
### Examples
|
301
|
+
The following example deletes the entry group and *all* entries for today's date.
|
302
|
+
|
303
|
+
`$ dsu delete today`
|
304
|
+
`$ dsu d n`
|
305
|
+
```shell
|
306
|
+
#=>
|
307
|
+
Are you sure you want to delete all the entries for 2023-12-17 (1 entry groups)? [y/N]> y
|
308
|
+
Deleted 1 entry group(s).
|
309
|
+
```
|
310
|
+
The following example deletes the entry group and *all* entries for yesterday's date.
|
311
|
+
|
312
|
+
`$ dsu delete yesterday`
|
313
|
+
`$ dsu d y`
|
314
|
+
```shell
|
315
|
+
#=>
|
316
|
+
Are you sure you want to delete all the entries for 2023-12-16 (1 entry groups)? [y/N]> y
|
317
|
+
Deleted 1 entry group(s).
|
318
|
+
```
|
319
|
+
The following example deletes the entry group and *all* entries for tomorrow's date.
|
320
|
+
|
321
|
+
`$ dsu delete tomorrow`
|
322
|
+
`$ dsu d t`
|
323
|
+
```shell
|
324
|
+
#=>
|
325
|
+
Are you sure you want to delete all the entries for 2023-12-18 (1 entry groups)? [y/N]> y
|
326
|
+
Deleted 1 entry group(s).
|
327
|
+
```
|
328
|
+
|
329
|
+
The following deletes the entry group and all entries for 12/17 of the current year.
|
330
|
+
|
331
|
+
`$ dsu delete date 12/17`
|
332
|
+
`$ dsu d d 12/17`
|
333
|
+
```shell
|
334
|
+
#=>
|
335
|
+
Are you sure you want to delete all the entries for 2023-12-17 (0 entry groups)? [y/N]> y
|
336
|
+
Deleted 1 entry group(s)
|
337
|
+
```
|
338
|
+
|
339
|
+
The following deletes the entry group and all entries for the past week, starting from today (12/17/2023).
|
232
340
|
|
341
|
+
`$ dsu delete dates --from today --to -6`
|
342
|
+
`$ dsu d dd -f n -t -6`
|
343
|
+
```shell
|
344
|
+
#=>
|
345
|
+
Are you sure you want to delete all the entries for 2023-12-11 thru 2023-12-17 (7 entry groups)? [y/N]> y
|
346
|
+
Deleted 7 entry group(s).
|
347
|
+
```
|
233
348
|
## Customizing the `dsu` Configuration File
|
349
|
+
To customize the `dsu` configuration file, you may follow the instructions outlined here. It is only recommended that you customize the `dsu` configuration file *only* if you are working with an official release (`n.n.n.n`).
|
234
350
|
|
235
|
-
It is **not** recommended that you get too attached to the `dsu` configuration options when this gem is in pre-release (e.g. `n.n.n.alpha.n`, `n.n.n.beta.n`, etc.). This is because changes to the configuration file options
|
351
|
+
**NOTE:** It is **not** recommended that you get too attached to the `dsu` configuration options when this gem is in **pre-release** (e.g. `n.n.n.alpha.n`, `n.n.n.beta.n`, etc.). This is because changes to the configuration file options, of course, could change. With an official release (`n.n.n.n`), edit all you want!
|
236
352
|
|
237
353
|
### Customizing the `dsu` Configuration File
|
238
354
|
|
@@ -267,6 +383,8 @@ This is the default editor to use when editing entry groups if the EDITOR enviro
|
|
267
383
|
|
268
384
|
Default: `nano` (you'll need to change the default editor on Windows systems)
|
269
385
|
|
386
|
+
NOTE: [Visual Studio Code](https://code.visualstudio.com/docs/editor/command-line), users, use `"code --wait"` (or `"code -w"`, short form) to make sure the vscode editor waits for the edited file to be saved and closed before returning control to the dsu process.
|
387
|
+
|
270
388
|
##### entries_display_order
|
271
389
|
Valid values are 'asc' and 'desc', and will sort listed DSU entries in ascending or descending order respectfully, by day.
|
272
390
|
|
@@ -291,26 +409,17 @@ These notes apply to anywhere DATE is used...
|
|
291
409
|
|
292
410
|
DATE may be any date string that can be parsed using `Time.parse`. Consequently, you may omit the year if the date you want to display is the current year (e.g. <month>/<day>, or 1/31). For example: `require 'time'; Time.parse('2023/01/02'); Time.parse('1/2/2023'); Time.parse('1/2') # etc.`
|
293
411
|
|
294
|
-
##
|
412
|
+
## Mnemonics
|
295
413
|
|
296
|
-
These notes apply to anywhere
|
414
|
+
These notes apply to anywhere MNEMONIC is used...
|
297
415
|
|
298
|
-
A *
|
416
|
+
A *mnemonic* may be any of the following: `n|today|t|tomorrow|y|yesterday|+n|-n`.
|
299
417
|
|
300
418
|
Where `n`, `t`, `y` are aliases for `today`, `tomorrow`, and `yesterday`, respectively.
|
301
419
|
|
302
|
-
Where `+n`, `-n` are relative date
|
303
|
-
|
304
|
-
NOTE: In some cases the behavior RDNs have on some commands are context dependent; in such cases the behavior will be noted in the help appropriate to the command, for example see the following `dsu` command help: `dsu list help date` and `dsu list help dates`.
|
305
|
-
|
306
|
-
|
307
|
-
## Installation
|
308
|
-
|
309
|
-
$ gem install dsu
|
310
|
-
|
311
|
-
## Usage
|
420
|
+
Where `+n`, `-n` are relative date mnemonics (RDMs). Generally speaking, RDMs are relative to the current date. For example, a RDM of `+1` would be equal to `Time.now + 1.day` (or tomorrow), and a RDM of `-1` would be equal to `Time.now - 1.day` (or yesterday).
|
312
421
|
|
313
|
-
|
422
|
+
NOTE: In some cases the behavior RDMs have on some commands are context dependent; in such cases the behavior will be noted in the help appropriate to the command, for example see the following `dsu` command help: `dsu list help date` and `dsu list help dates`.
|
314
423
|
|
315
424
|
## Development
|
316
425
|
|
data/lib/dsu/base_cli.rb
CHANGED
@@ -39,25 +39,11 @@ module Dsu
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def date_option_description
|
42
|
-
|
43
|
-
DATE
|
44
|
-
|
45
|
-
This may be any date string that can be parsed using `Time.parse`. Consequently, you may use also use '/' as date separators, as well as omit thee year if the date you want to display is the current year (e.g. <month>/<day>, or 1/31). For example: `require 'time'; Time.parse('01/02/2023'); Time.parse('1/2') # etc.`
|
46
|
-
OPTION_DESC
|
42
|
+
I18n.t('options.date_option_description')
|
47
43
|
end
|
48
44
|
|
49
|
-
def
|
50
|
-
|
51
|
-
MNEUMONIC
|
52
|
-
|
53
|
-
This may be any of the following: n|today|t|tomorrow|y|yesterday|+n|-n.
|
54
|
-
|
55
|
-
Where n, t, y are aliases for today, tomorrow, and yesterday, respectively.
|
56
|
-
|
57
|
-
Where +n, -n are relative date mneumonics (RDNs). Generally speaking, RDNs are relative to the current date. For example, a RDN of +1 would be equal to `Time.now + 1.day` (tomorrow), and a RDN of -1 would be equal to `Time.now - 1.day` (yesterday).
|
58
|
-
|
59
|
-
In some cases the behavior RDNs have on some commands are context dependent; in such cases the behavior will be noted.
|
60
|
-
OPTION_DESC
|
45
|
+
def mnemonic_option_description
|
46
|
+
I18n.t('options.mnemonic_option_description')
|
61
47
|
end
|
62
48
|
end
|
63
49
|
|