standup_md 0.1.3 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +7 -1
- data/README.md +182 -98
- data/Rakefile +11 -28
- data/bin/standup +1 -1
- data/doc/README_md.html +183 -78
- data/doc/StandupMD.html +83 -1248
- data/doc/StandupMD/Cli.html +124 -474
- data/doc/StandupMD/Cli/Helpers.html +167 -0
- data/doc/StandupMD/Config.html +230 -0
- data/doc/StandupMD/Config/Cli.html +355 -0
- data/doc/StandupMD/Config/Entry.html +284 -0
- data/doc/StandupMD/Config/EntryList.html +197 -0
- data/doc/StandupMD/Config/File.html +609 -0
- data/doc/StandupMD/Entry.html +478 -0
- data/doc/StandupMD/EntryList.html +759 -0
- data/doc/StandupMD/File.html +614 -0
- data/doc/created.rid +15 -8
- data/doc/index.html +189 -79
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search_index.js +1 -1
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js.gz +0 -0
- data/doc/table_of_contents.html +153 -263
- data/lib/standup_md.rb +29 -508
- data/lib/standup_md/cli.rb +63 -242
- data/lib/standup_md/cli/helpers.rb +165 -0
- data/lib/standup_md/config.rb +45 -0
- data/lib/standup_md/config/cli.rb +106 -0
- data/lib/standup_md/config/entry.rb +61 -0
- data/lib/standup_md/config/entry_list.rb +26 -0
- data/lib/standup_md/config/file.rb +199 -0
- data/lib/standup_md/entry.rb +121 -0
- data/lib/standup_md/entry_list.rb +166 -0
- data/lib/standup_md/file.rb +183 -0
- data/lib/standup_md/file/helpers.rb +62 -0
- data/lib/standup_md/version.rb +5 -5
- data/standup_md.gemspec +1 -0
- metadata +35 -5
- data/doc/TestCli.html +0 -792
- data/doc/TestHelper.html +0 -282
- data/doc/TestStandupMD.html +0 -1354
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57bd78bfdaa77fe7ba0aba95d28beaa44515adfca40fb5668aea94a1164fc0ce
|
4
|
+
data.tar.gz: f33a68f119e7661b780be8aa19f202a0e83ed0d9a36bddfae294d697b5aa4901
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08dc58ef8c87d92e13261032c8836b9555244ad22f9243e7b91732aa20a5a6c1ab6b032739bde51a92c145318d08c2f2858c16e31cfc02aaded2017988a66ba6'
|
7
|
+
data.tar.gz: 10f91dc30a6afcbc0b68ae1e7ea253a8292102b63de47e66877d889b640953a2fb91f9c8e249443762b6c93bc300e39b522d6ad6c9739b6d21464a87e33d8104
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,13 +1,18 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
standup_md (0.
|
4
|
+
standup_md (0.3.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
+
docile (1.3.2)
|
9
10
|
power_assert (1.2.0)
|
10
11
|
rake (13.0.1)
|
12
|
+
simplecov (0.18.5)
|
13
|
+
docile (~> 1.1)
|
14
|
+
simplecov-html (~> 0.11)
|
15
|
+
simplecov-html (0.12.2)
|
11
16
|
test-unit (3.3.5)
|
12
17
|
power_assert
|
13
18
|
|
@@ -16,6 +21,7 @@ PLATFORMS
|
|
16
21
|
|
17
22
|
DEPENDENCIES
|
18
23
|
rake (~> 13.0, >= 13.0.1)
|
24
|
+
simplecov
|
19
25
|
standup_md!
|
20
26
|
test-unit (~> 3.3, >= 3.3.5)
|
21
27
|
|
data/README.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
1
|
# The Standup Doctor
|
2
|
+
[](https://actions-badge.atrox.dev/evanthegrayt/standup_md/goto?ref=master)
|
3
|
+
[](https://badge.fury.io/rb/standup_md)
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
5
|
+
|
2
6
|
> The cure for all your standup woes.
|
3
7
|
|
4
8
|
A highly customizable and automated way to keep track of daily standups in
|
@@ -14,10 +18,17 @@ View on: [Github](https://github.com/evanthegrayt/standup_md) |
|
|
14
18
|
- [Via RubyGems](#via-rubygems)
|
15
19
|
- [Manual Installation](#manual-installation)
|
16
20
|
- [Usage](#usage)
|
17
|
-
- [
|
18
|
-
|
19
|
-
- [
|
20
|
-
|
21
|
+
- [Command Line](#command-line)
|
22
|
+
- [CLI Examples](#cli-examples)
|
23
|
+
- [Adding an entry for today via editor](#adding-an-entry-for-today-via-editor)
|
24
|
+
- [Copy the entry for today to clipboard](#copy-the-entry-for-today-to-clipboard)
|
25
|
+
- [Add entry to file without opening it](#add-entry-to-file-without-opening-it)
|
26
|
+
- [Find an entry by date and print it](#find-an-entry-by-date-and-print-it)
|
27
|
+
- [Customization and Runtime Options](#customization-and-runtime-options)
|
28
|
+
- [Using existing standup files](#using-existing-standup-files)
|
29
|
+
- [API](#api)
|
30
|
+
- [API Examples](#api-examples)
|
31
|
+
- [Documentation](https://evanthegrayt.github.io/standup_md/doc/index.html)
|
21
32
|
- [Reporting Bugs and Requesting Features](#reporting-bugs-and-requesting-features)
|
22
33
|
- [Self-Promotion](#self-promotion)
|
23
34
|
|
@@ -27,17 +38,15 @@ chat client, such as Slack, Mattermost, or Riot. Typing out my standup every day
|
|
27
38
|
became tedious, as I'd have to look up what I did the day before, copy and paste
|
28
39
|
yesterday's work into a new entry, and add today's tasks. This gem automates
|
29
40
|
most of this process, along with providing means of opening the file in your
|
30
|
-
editor, and displaying entries from the command line.
|
31
|
-
|
32
|
-
I wasn't sure that others would find this useful, but then the pandemic
|
33
|
-
happened, which I assume made doing standups via chat much more common.
|
41
|
+
editor, and finding and displaying entries from the command line.
|
34
42
|
|
35
43
|
In a nutshell, calling `standup` from the command line will open a standup file
|
36
44
|
for the current month in your preferred editor. If an entry for today is already
|
37
45
|
present, no text will be generated. If an entry for today doesn't exist, one
|
38
|
-
will be generated
|
39
|
-
entry as your previous day's work. See
|
40
|
-
if you'd like to use this
|
46
|
+
will be generated with your preferred values. When generating, if a previous
|
47
|
+
entry exists, it will be added to today's entry as your previous day's work. See
|
48
|
+
[example](#example). There's also a very robust API if you'd like to use this
|
49
|
+
in your own code somehow.
|
41
50
|
|
42
51
|
## Installation
|
43
52
|
### Via RubyGems
|
@@ -47,15 +56,15 @@ Just install the gem!
|
|
47
56
|
gem install standup_md
|
48
57
|
```
|
49
58
|
|
50
|
-
|
51
|
-
using
|
52
|
-
[rbenv](http://www.rubyinside.com/rbenv-a-simple-new-ruby-version-management-tool-5302.html),
|
53
|
-
or you can try the manual methods below.
|
59
|
+
To include in your project, add the following to your `Gemfile`.
|
54
60
|
|
61
|
+
```ruby
|
62
|
+
gem 'standup_md'
|
63
|
+
```
|
55
64
|
|
56
65
|
### Manual Installation
|
57
|
-
From your terminal, clone the repository where you want it
|
58
|
-
|
66
|
+
From your terminal, clone the repository where you want it, and use `rake` to
|
67
|
+
install the gem.
|
59
68
|
|
60
69
|
```sh
|
61
70
|
git clone https://github.com/evanthegrayt/standup_md.git
|
@@ -63,14 +72,11 @@ cd standup_md
|
|
63
72
|
|
64
73
|
# Use rake to build and install the gem.
|
65
74
|
rake install
|
66
|
-
|
67
|
-
# OR manually link the executable somewhere. If you use this method, you cannot
|
68
|
-
# move the repository after you link it!
|
69
|
-
ln -s $PWD/bin/standup /usr/local/bin/standup
|
70
75
|
```
|
71
76
|
|
72
77
|
## Usage
|
73
|
-
|
78
|
+
### Command Line
|
79
|
+
For the most basic usage, simply call the executable.
|
74
80
|
|
75
81
|
```sh
|
76
82
|
standup
|
@@ -78,10 +84,13 @@ standup
|
|
78
84
|
|
79
85
|
This opens the current month's standup file. If an entry already exists for
|
80
86
|
today, nothing is added. If no entry exists for today, the previous "Current" is
|
81
|
-
placed in the "Previous" section of a new entry.
|
82
|
-
|
87
|
+
placed in the "Previous" section of a new entry. The format of this file is very
|
88
|
+
important; you may add new entries, but don't change any of the headers. Doing
|
89
|
+
so will cause the parser to break. If you want to customize the headers, you can
|
90
|
+
do so in the [configuration file](#available-config-file-options-and-defaults).
|
83
91
|
|
84
|
-
###
|
92
|
+
### CLI Examples
|
93
|
+
#### Adding an entry for today via editor
|
85
94
|
For example, if the standup entry from yesterday reads as follows:
|
86
95
|
|
87
96
|
```markdown
|
@@ -97,6 +106,7 @@ For example, if the standup entry from yesterday reads as follows:
|
|
97
106
|
|
98
107
|
The following scaffolding will be added for current entry at the top of the
|
99
108
|
file:
|
109
|
+
|
100
110
|
```markdown
|
101
111
|
# 2020-04-14
|
102
112
|
## Previous
|
@@ -108,19 +118,36 @@ file:
|
|
108
118
|
- None
|
109
119
|
```
|
110
120
|
|
121
|
+
#### Copy the entry for today to clipboard
|
111
122
|
There are also flags that will print entries to the command line. There's a full
|
112
123
|
list of features below, but as a quick example, you can copy today's entry to
|
113
124
|
your clipboard without even opening your editor.
|
114
125
|
|
115
126
|
```sh
|
116
|
-
standup -
|
127
|
+
standup -p | pbcopy
|
117
128
|
```
|
118
129
|
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
130
|
+
If you wanted to add today's entry without opening your editor, and print the
|
131
|
+
result to the command line, you could use the following.
|
132
|
+
|
133
|
+
#### Add entry to file without opening it
|
134
|
+
```sh
|
135
|
+
standup --no-edit --current "Work on this thing","And another thing" -p
|
136
|
+
```
|
137
|
+
|
138
|
+
#### Find an entry by date and print it.
|
139
|
+
If you wanted to find and print the entry for March 2nd, 2020, you could use the
|
140
|
+
following.
|
141
|
+
|
142
|
+
```sh
|
143
|
+
standup -p 2020-03-02
|
144
|
+
```
|
145
|
+
|
146
|
+
### Customization and Runtime Options
|
147
|
+
You can create a file in your home directory called `~/.standuprc`. Settings
|
148
|
+
located in this file will override default behavior. This file can also have
|
149
|
+
settings overwritten at runtime by the use of options. You can view [my config
|
150
|
+
file](https://github.com/evanthegrayt/dotfiles/blob/master/dotfiles/standuprc)
|
124
151
|
as an example. Any setting in this file can still be overridden at runtime by
|
125
152
|
passing flags to the executable.
|
126
153
|
|
@@ -139,51 +166,62 @@ them in your configuration file after installation, and then try to not change
|
|
139
166
|
them again.
|
140
167
|
|
141
168
|
|
142
|
-
|
143
|
-
|
144
|
-
```
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
169
|
+
#### Available Config File Options and Defaults
|
170
|
+
|
171
|
+
```ruby
|
172
|
+
StandupMD.configure do |c|
|
173
|
+
# Defaults for how the file is formatted.
|
174
|
+
# See https://evanthegrayt.github.io/standup_md/doc/StandupMD/Config/Cli.html
|
175
|
+
c.file.header_date_format = '%Y-%m-%d'
|
176
|
+
c.file.header_depth = 1
|
177
|
+
c.file.sub_header_depth = 2
|
178
|
+
c.file.current_header = 'Current'
|
179
|
+
c.file.previous_header = 'Previous'
|
180
|
+
c.file.impediments_header = 'Impediments'
|
181
|
+
c.file.notes_header = 'Notes'
|
182
|
+
c.file.sub_header_order = %w[previous current impediments notes]
|
183
|
+
c.file.directory = ::File.join(ENV['HOME'], '.cache', 'standup_md')
|
184
|
+
c.file.bullet_character = '-'
|
185
|
+
c.file.name_format = '%Y_%m.md'
|
186
|
+
c.file.create = true
|
187
|
+
|
188
|
+
# Defaults for entries
|
189
|
+
# See https://evanthegrayt.github.io/standup_md/doc/StandupMD/Config/Entry.html
|
190
|
+
c.entry.current = ["<!-- ADD TODAY'S WORK HERE -->"]
|
191
|
+
c.entry.previous = []
|
192
|
+
c.entry.impediments = ['None']
|
193
|
+
c.entry.notes = []
|
194
|
+
|
195
|
+
# Defaults for executable runtime behavior.
|
196
|
+
# See https://evanthegrayt.github.io/standup_md/doc/StandupMD/Config/Cli.html
|
197
|
+
c.cli.date = Date.today
|
198
|
+
c.cli.editor = 'vim' # Checks $VISUAL and $EDITOR first, in that order
|
199
|
+
c.cli.verbose = false
|
200
|
+
c.cli.edit = true
|
201
|
+
c.cli.write = true
|
202
|
+
c.cli.print = false
|
203
|
+
c.cli.auto_fill_previous = true
|
204
|
+
c.cli.preference_file = ::File.expand_path(::File.join(ENV['HOME'], '.standuprc'))
|
205
|
+
end
|
206
|
+
```
|
207
|
+
|
208
|
+
#### Executable Flags
|
209
|
+
```
|
210
|
+
--current ARRAY List of current entry's tasks
|
211
|
+
--previous ARRAY List of precious entry's tasks
|
212
|
+
--impediments ARRAY List of impediments for current entry
|
213
|
+
--notes ARRAY List of notes for current entry
|
214
|
+
--sub-header-order ARRAY The order of the sub-headers when writing the file
|
215
|
+
-f, --file-name-format STRING Date-formattable string to use for standup file name
|
216
|
+
-E, --editor EDITOR Editor to use for opening standup files
|
217
|
+
-d, --directory DIRECTORY The directories where standup files are located
|
218
|
+
-w --[no-]write Write current entry if it doesn't exist. Default is true
|
219
|
+
-a --[no-]auto-fill-previous Auto-generate 'previous' tasks for new entries
|
220
|
+
-e --[no-]edit Open the file in the editor. Default is true
|
221
|
+
-v, --[no-]verbose Verbose output. Default is false.
|
222
|
+
-p, --print [DATE] Print current entry.
|
223
|
+
If DATE is passed, will print entry for DATE, if it exists.
|
224
|
+
DATE must be in the same format as file-name-format
|
187
225
|
```
|
188
226
|
|
189
227
|
Any options not set in this file will retain their default values. Note that if
|
@@ -191,44 +229,90 @@ you change `file_name_format`, and don't use a month or year, there will only
|
|
191
229
|
ever be one standup file. This could cause issues long-term, as the files will
|
192
230
|
get large over time and possibly cause performance issues.
|
193
231
|
|
194
|
-
|
195
|
-
|
232
|
+
#### Using Existing Standup Files
|
233
|
+
If you already have a directory of existing standup files, you can use them, but
|
234
|
+
they must be in a format that the parser can understand. The default is:
|
196
235
|
|
197
|
-
```
|
198
|
-
|
236
|
+
```markdown
|
237
|
+
# 2020-05-01
|
238
|
+
## Previous
|
239
|
+
- task
|
240
|
+
## Current
|
241
|
+
- task
|
242
|
+
## Impediments
|
243
|
+
- impediment
|
244
|
+
## Notes
|
245
|
+
- notes, if any are present
|
246
|
+
```
|
247
|
+
|
248
|
+
The order, words, date format, and header level are all customizable, but the
|
249
|
+
overall format must be the same. If customization is necessary, this must be
|
250
|
+
done in `~/.standuprc` before execution, or else the parser will error.
|
251
|
+
|
252
|
+
For example, if you wanted the format to be as follows:
|
253
|
+
|
254
|
+
```markdown
|
255
|
+
## 05/01/2020
|
256
|
+
### Today
|
257
|
+
* task
|
258
|
+
### Yesterday
|
259
|
+
* task
|
260
|
+
### Hold-ups
|
261
|
+
* impediment
|
262
|
+
### Notes
|
263
|
+
* notes, if any are present
|
264
|
+
```
|
265
|
+
|
266
|
+
Your `~/.standuprc` should contain:
|
267
|
+
|
268
|
+
```ruby
|
269
|
+
StandupMD.configure do |c|
|
270
|
+
c.file.header_depth = 2
|
271
|
+
c.file.sub_header_depth = 3
|
272
|
+
c.file.current_header = 'Today'
|
273
|
+
c.file.previous_header = 'Yesterday'
|
274
|
+
c.file.impediments_header = 'Hold-ups'
|
275
|
+
c.file.bullet_character = '*'
|
276
|
+
c.file.header_date_format = '%m/%d/%Y'
|
277
|
+
c.file.sub_header_order = %w[current previous impediments notes]
|
278
|
+
end
|
199
279
|
```
|
200
280
|
|
201
281
|
## API
|
202
|
-
|
203
|
-
[
|
282
|
+
The API is fully documented in the
|
283
|
+
[RDoc Documentation](https://evanthegrayt.github.io/standup_md/doc/index.html).
|
204
284
|
|
205
|
-
This was mainly written as a command line utility, but
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
following:
|
285
|
+
This was mainly written as a command line utility, but the API is ridiculously
|
286
|
+
robust, and is available for use in your own projects. A quick example of how
|
287
|
+
to write a new entry via code could look like the following:
|
288
|
+
|
289
|
+
### API Examples
|
211
290
|
|
212
291
|
```ruby
|
213
292
|
require 'standup_md'
|
214
293
|
|
215
|
-
|
216
|
-
current_header
|
217
|
-
|
218
|
-
impediments: ['Not enough time in the day']
|
219
|
-
)
|
294
|
+
StandupMD.configure do |c|
|
295
|
+
c.file.current_header = 'Today',
|
296
|
+
end
|
220
297
|
|
221
|
-
|
298
|
+
file = StandupMD::File.find_by_date(Date.today)
|
299
|
+
entry = StandupMD::Entry.create { |e| e.current = ['Stuff I will do today'] }
|
300
|
+
file.entries << entry
|
301
|
+
file.write
|
222
302
|
```
|
223
303
|
|
224
|
-
|
304
|
+
The above example was written as such to show how the different pieces of the
|
305
|
+
API fit together. The code can actually be simplified to the following.
|
225
306
|
|
226
307
|
```ruby
|
227
308
|
require 'standup_md'
|
228
|
-
require 'json'
|
229
309
|
|
230
|
-
|
231
|
-
|
310
|
+
StandupMD.configure do |c|
|
311
|
+
c.file.current_header = 'Today',
|
312
|
+
c.entry.current = ['Stuff I will do today']
|
313
|
+
end
|
314
|
+
|
315
|
+
StandupMD::File.find_by_date(Date.today).load.write
|
232
316
|
```
|
233
317
|
|
234
318
|
## Reporting Bugs and Requesting Features
|
data/Rakefile
CHANGED
@@ -1,36 +1,19 @@
|
|
1
1
|
require_relative 'lib/standup_md'
|
2
|
+
require 'bundler/gem_tasks'
|
2
3
|
require 'rdoc/task'
|
4
|
+
require 'rake/testtask'
|
5
|
+
|
6
|
+
Rake::TestTask.new do |t|
|
7
|
+
t.libs = ['lib']
|
8
|
+
t.warning = true
|
9
|
+
t.verbose = true
|
10
|
+
t.test_files = FileList['test/**/*_test.rb']
|
11
|
+
end
|
3
12
|
|
4
13
|
RDoc::Task.new do |rdoc|
|
5
|
-
rdoc.main =
|
14
|
+
rdoc.main = 'README.md'
|
6
15
|
rdoc.rdoc_dir = 'doc'
|
7
|
-
rdoc.rdoc_files.include(
|
16
|
+
rdoc.rdoc_files.include('README.md', 'lib/**/*.rb')
|
8
17
|
end
|
9
18
|
|
10
19
|
task :default => :test
|
11
|
-
|
12
|
-
desc "Build the gem"
|
13
|
-
task :build do
|
14
|
-
system('gem build standup_md.gemspec')
|
15
|
-
end
|
16
|
-
|
17
|
-
desc "Build and install the gem"
|
18
|
-
task install: [:dependencies, :build] do
|
19
|
-
system("gem install standup_md-#{StandupMD::VERSION}.gem")
|
20
|
-
end
|
21
|
-
|
22
|
-
desc "Add dependencies"
|
23
|
-
task :dependencies do
|
24
|
-
system("gem install bundler")
|
25
|
-
system("bundle install")
|
26
|
-
end
|
27
|
-
|
28
|
-
desc "Uninstall the gem"
|
29
|
-
task :uninstall do
|
30
|
-
system('gem uninstall standup_md')
|
31
|
-
end
|
32
|
-
|
33
|
-
desc "Run test suite"
|
34
|
-
task :test do
|
35
|
-
Dir.glob(File.join(__dir__, 'test', '**', '*_test.rb')).each { |f| ruby f }
|
36
|
-
end
|