standup_md 0.3.5 → 0.3.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +11 -9
- data/README.md +45 -40
- data/Rakefile +3 -1
- data/doc/README_md.html +51 -65
- data/doc/StandupMD.html +16 -102
- data/doc/StandupMD/Cli.html +28 -170
- data/doc/StandupMD/Cli/Helpers.html +10 -31
- data/doc/StandupMD/Config.html +8 -45
- data/doc/StandupMD/Config/Cli.html +10 -78
- data/doc/StandupMD/Config/Entry.html +10 -66
- data/doc/StandupMD/Config/EntryList.html +7 -48
- data/doc/StandupMD/Config/File.html +11 -143
- data/doc/StandupMD/Entry.html +24 -135
- data/doc/StandupMD/EntryList.html +16 -198
- data/doc/StandupMD/File.html +48 -179
- data/doc/StandupMD/Version.html +143 -0
- data/doc/created.rid +14 -14
- data/doc/css/rdoc.css +1 -1
- data/doc/index.html +51 -77
- 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 +36 -88
- data/lib/standup_md.rb +10 -6
- data/lib/standup_md/cli.rb +9 -10
- data/lib/standup_md/cli/helpers.rb +50 -45
- data/lib/standup_md/config.rb +0 -2
- data/lib/standup_md/config/cli.rb +2 -4
- data/lib/standup_md/config/entry.rb +2 -4
- data/lib/standup_md/config/file.rb +3 -3
- data/lib/standup_md/entry.rb +7 -10
- data/lib/standup_md/entry_list.rb +1 -1
- data/lib/standup_md/file.rb +29 -12
- data/lib/standup_md/file/helpers.rb +13 -15
- data/lib/standup_md/version.rb +45 -4
- data/standup_md.gemspec +12 -16
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 911436a3ca07345eb0085c99efa994e3e56732f2d7de641a2a427c2ce02d0407
|
4
|
+
data.tar.gz: ba4eba776394f67ef44f02a0033374748da0b036b7a4384062e618e1b7f376bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e7fa07198da5f302671be61e83c21052f1f8c5a99cb25a0d4bb0c2963fc12489c1bac338523048be6cf14efad53754c5b4eb6cda8bc78cfe42a02b95a115ef6
|
7
|
+
data.tar.gz: f6abec7ecb3171139fedf90e3ead734ab06d580bad3d958186f931513b4c78cc747615557e620aa2b0e96e9060727518564e7334ab8d70a6f6810b8a68c0285b
|
data/Gemfile.lock
CHANGED
@@ -1,23 +1,25 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
standup_md (0.3.
|
4
|
+
standup_md (0.3.10)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
docile (1.3.
|
10
|
-
power_assert (
|
11
|
-
rake (13.0.
|
12
|
-
simplecov (0.
|
9
|
+
docile (1.3.5)
|
10
|
+
power_assert (2.0.0)
|
11
|
+
rake (13.0.3)
|
12
|
+
simplecov (0.21.2)
|
13
13
|
docile (~> 1.1)
|
14
14
|
simplecov-html (~> 0.11)
|
15
|
-
|
16
|
-
|
15
|
+
simplecov_json_formatter (~> 0.1)
|
16
|
+
simplecov-html (0.12.3)
|
17
|
+
simplecov_json_formatter (0.1.2)
|
18
|
+
test-unit (3.4.1)
|
17
19
|
power_assert
|
18
20
|
|
19
21
|
PLATFORMS
|
20
|
-
|
22
|
+
x86_64-darwin-20
|
21
23
|
|
22
24
|
DEPENDENCIES
|
23
25
|
rake (~> 13.0, >= 13.0.1)
|
@@ -26,4 +28,4 @@ DEPENDENCIES
|
|
26
28
|
test-unit (~> 3.3, >= 3.3.5)
|
27
29
|
|
28
30
|
BUNDLED WITH
|
29
|
-
2.
|
31
|
+
2.2.16
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# The Standup Doctor
|
2
|
+
<!-- vi: set ts=4 sw=4 : -->
|
2
3
|
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fevanthegrayt%2Fstandup_md%2Fbadge%3Fref%3Dmaster&style=flat)](https://actions-badge.atrox.dev/evanthegrayt/standup_md/goto?ref=master)
|
3
4
|
[![Gem Version](https://badge.fury.io/rb/standup_md.svg)](https://badge.fury.io/rb/standup_md)
|
4
5
|
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
|
@@ -12,28 +13,6 @@ View on: [Github](https://github.com/evanthegrayt/standup_md) |
|
|
12
13
|
[GitHub Pages](https://evanthegrayt.github.io/standup_md/) |
|
13
14
|
[RubyGems](https://rubygems.org/gems/standup_md)
|
14
15
|
|
15
|
-
## Table of Contents
|
16
|
-
- [About](#about)
|
17
|
-
- [Installation](#Installation)
|
18
|
-
- [Via RubyGems](#via-rubygems)
|
19
|
-
- [Manual Installation](#manual-installation)
|
20
|
-
- [Usage](#usage)
|
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
|
-
- [Adding an entry for today](#adding-an-entry-for-today)
|
32
|
-
- [Finding a past entry](#finding-a-past-entry)
|
33
|
-
- [Documentation](https://evanthegrayt.github.io/standup_md/doc/index.html)
|
34
|
-
- [Reporting Bugs and Requesting Features](#reporting-bugs-and-requesting-features)
|
35
|
-
- [Self-Promotion](#self-promotion)
|
36
|
-
|
37
16
|
## About
|
38
17
|
I've now been at two separate companies where we post our daily standups in a
|
39
18
|
chat client, such as Slack, Mattermost, or Riot. Typing out my standup every day
|
@@ -47,8 +26,8 @@ for the current month in your preferred editor. If an entry for today is already
|
|
47
26
|
present, no text will be generated. If an entry for today doesn't exist, one
|
48
27
|
will be generated with your preferred values. When generating, if a previous
|
49
28
|
entry exists, it will be added to today's entry as your previous day's work. See
|
50
|
-
[example](#
|
51
|
-
in your own code somehow.
|
29
|
+
[example](#cli-examples). There's also a very robust API if you'd like to use
|
30
|
+
this in your own code somehow.
|
52
31
|
|
53
32
|
## Installation
|
54
33
|
If you don't have the permissions to install system-wide gems, you're probabaly
|
@@ -134,20 +113,12 @@ your clipboard without even opening your editor.
|
|
134
113
|
standup -p | pbcopy
|
135
114
|
```
|
136
115
|
|
137
|
-
If you wanted to add today's entry without opening your editor, and print the
|
138
|
-
result to the command line, you could use the following.
|
139
|
-
|
140
116
|
#### Add entry to file without opening it
|
141
|
-
|
142
|
-
|
143
|
-
```
|
144
|
-
|
145
|
-
#### Find an entry by date and print it.
|
146
|
-
If you wanted to find and print the entry for March 2nd, 2020, you could use the
|
147
|
-
following.
|
117
|
+
You can add an entry for today without even opening your editor. Note that, if
|
118
|
+
you have multiple entries, you must separate them with a comma and *no spaces*.
|
148
119
|
|
149
120
|
```sh
|
150
|
-
standup -
|
121
|
+
standup --no-edit --current "Work on this thing","And another thing"
|
151
122
|
```
|
152
123
|
|
153
124
|
### Customization and Runtime Options
|
@@ -222,6 +193,7 @@ get large over time and possibly cause performance issues.
|
|
222
193
|
|
223
194
|
#### Executable Flags
|
224
195
|
Some of these options can be changed at runtime. They are as follows.
|
196
|
+
|
225
197
|
```
|
226
198
|
--current ARRAY List of current entry's tasks
|
227
199
|
--previous ARRAY List of precious entry's tasks
|
@@ -293,9 +265,9 @@ end
|
|
293
265
|
The API is fully documented in the
|
294
266
|
[RDoc Documentation](https://evanthegrayt.github.io/standup_md/doc/index.html).
|
295
267
|
|
296
|
-
This was mainly written as a command line utility, but the API is
|
297
|
-
|
298
|
-
|
268
|
+
This was mainly written as a command line utility, but the API is very robust,
|
269
|
+
and is available for use in your own projects. A quick example of how to write a
|
270
|
+
new entry via code could look like the following:
|
299
271
|
|
300
272
|
### API Examples
|
301
273
|
#### Adding an entry for today
|
@@ -335,10 +307,43 @@ file = StandupMD::File.find_by_date(date).load
|
|
335
307
|
entry = file.entries.find(date)
|
336
308
|
```
|
337
309
|
|
310
|
+
## Vim
|
311
|
+
While there's no official support for vim, you can add this to your `vimrc`
|
312
|
+
file, or something like `~/.vim/plugin/standup.vim`.
|
313
|
+
|
314
|
+
```vim
|
315
|
+
command! -complete=custom,<SID>StandupCompletion -nargs=? -bang Standup
|
316
|
+
\ call <SID>OpenStandupFile(<bang>0, <f-args>)
|
317
|
+
|
318
|
+
function! s:StandupCompletion(...) abort
|
319
|
+
let l:dir = get(g:, 'standup_dir', $HOME . '/.cache/standup_md') . '/'
|
320
|
+
if !isdirectory(l:dir) | return '' | endif
|
321
|
+
return join(map(glob(l:dir . '*.md', 0, 1), "fnamemodify(v:val, ':t')"), "\n")
|
322
|
+
endfunction
|
323
|
+
|
324
|
+
function! s:OpenStandupFile(split, ...)
|
325
|
+
let l:dir = get(g:, 'standup_dir', $HOME . '/.cache/standup_md') . '/'
|
326
|
+
let l:file = a:0 ? a:1 : get(g:, 'standup_file', strftime('%Y_%m.md'))
|
327
|
+
call system('standup --no-edit')
|
328
|
+
execute a:split ? 'vsplit' : 'split' l:dir . l:file
|
329
|
+
endfunction
|
330
|
+
```
|
331
|
+
|
332
|
+
This makes the `:Standup` command, which opens the standup file in a split,
|
333
|
+
while `:Standup!` opens it in a vertical split. If a file is passed to the
|
334
|
+
command, that file will be opened. There's tab completion for this. Lastly,
|
335
|
+
it allows for a few variables to be set for customization.
|
336
|
+
|
337
|
+
```vim
|
338
|
+
g:standup_dir = $HOME . '/.cache/standup_md' " the directory where your file are
|
339
|
+
g:standup_file = strftime('%Y_%m.md') " the file format to use
|
340
|
+
```
|
341
|
+
|
338
342
|
## Reporting Bugs and Requesting Features
|
339
343
|
If you have an idea or find a bug, please [create an
|
340
|
-
issue](https://github.com/evanthegrayt/standup_md/issues/new). Just make sure
|
341
|
-
doesn't already exist. Better yet, you can always submit a Pull
|
344
|
+
issue](https://github.com/evanthegrayt/standup_md/issues/new). Just make sure
|
345
|
+
the topic doesn't already exist. Better yet, you can always submit a Pull
|
346
|
+
Request.
|
342
347
|
|
343
348
|
## Self-Promotion
|
344
349
|
I do these projects for fun, and I enjoy knowing that they're helpful to people.
|
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'lib/standup_md'
|
2
4
|
require 'bundler/gem_tasks'
|
3
5
|
require 'rdoc/task'
|
@@ -16,4 +18,4 @@ RDoc::Task.new do |rdoc|
|
|
16
18
|
rdoc.rdoc_files.include('README.md', 'lib/**/*.rb')
|
17
19
|
end
|
18
20
|
|
19
|
-
task :
|
21
|
+
task default: :test
|
data/doc/README_md.html
CHANGED
@@ -21,8 +21,6 @@
|
|
21
21
|
<link href="./css/rdoc.css" rel="stylesheet">
|
22
22
|
|
23
23
|
|
24
|
-
|
25
|
-
|
26
24
|
<body id="top" role="document" class="file">
|
27
25
|
<nav role="navigation">
|
28
26
|
<div id="project-navigation">
|
@@ -61,7 +59,6 @@
|
|
61
59
|
|
62
60
|
<ul class="link-list" role="directory">
|
63
61
|
<li><a href="#label-The+Standup+Doctor">The Standup Doctor</a>
|
64
|
-
<li><a href="#label-Table+of+Contents">Table of Contents</a>
|
65
62
|
<li><a href="#label-About">About</a>
|
66
63
|
<li><a href="#label-Installation">Installation</a>
|
67
64
|
<li><a href="#label-Via+RubyGems">Via RubyGems</a>
|
@@ -72,7 +69,6 @@
|
|
72
69
|
<li><a href="#label-Adding+an+entry+for+today+via+editor">Adding an entry for today via editor</a>
|
73
70
|
<li><a href="#label-Copy+the+entry+for+today+to+clipboard">Copy the entry for today to clipboard</a>
|
74
71
|
<li><a href="#label-Add+entry+to+file+without+opening+it">Add entry to file without opening it</a>
|
75
|
-
<li><a href="#label-Find+an+entry+by+date+and+print+it.">Find an entry by date and print it.</a>
|
76
72
|
<li><a href="#label-Customization+and+Runtime+Options">Customization and Runtime Options</a>
|
77
73
|
<li><a href="#label-Available+Config+File+Options+and+Defaults">Available Config File Options and Defaults</a>
|
78
74
|
<li><a href="#label-Executable+Flags">Executable Flags</a>
|
@@ -81,6 +77,7 @@
|
|
81
77
|
<li><a href="#label-API+Examples">API Examples</a>
|
82
78
|
<li><a href="#label-Adding+an+entry+for+today">Adding an entry for today</a>
|
83
79
|
<li><a href="#label-Finding+a+past+entry">Finding a past entry</a>
|
80
|
+
<li><a href="#label-Vim">Vim</a>
|
84
81
|
<li><a href="#label-Reporting+Bugs+and+Requesting+Features">Reporting Bugs and Requesting Features</a>
|
85
82
|
<li><a href="#label-Self-Promotion">Self-Promotion</a>
|
86
83
|
</ul>
|
@@ -88,13 +85,12 @@
|
|
88
85
|
|
89
86
|
|
90
87
|
<div id="project-metadata">
|
91
|
-
|
88
|
+
|
89
|
+
<div id="fileindex-section" class="nav-section">
|
92
90
|
<h3>Pages</h3>
|
93
91
|
|
94
92
|
<ul class="link-list">
|
95
|
-
|
96
93
|
<li><a href="./README_md.html">README</a>
|
97
|
-
|
98
94
|
</ul>
|
99
95
|
</div>
|
100
96
|
|
@@ -104,7 +100,7 @@
|
|
104
100
|
<main role="main" aria-label="Page README.md">
|
105
101
|
|
106
102
|
<h1 id="label-The+Standup+Doctor">The Standup Doctor<span><a href="#label-The+Standup+Doctor">¶</a> <a href="#top">↑</a></span></h1>
|
107
|
-
|
103
|
+
<!-- vi: set ts=4 sw=4 : -->
|
108
104
|
<p><a href="https://actions-badge.atrox.dev/evanthegrayt/standup_md/goto?ref=master"><img src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fevanthegrayt%2Fstandup_md%2Fbadge%3Fref%3Dmaster&style=flat"></a> <a href="https://badge.fury.io/rb/standup_md"><img src="https://badge.fury.io/rb/standup_md.svg"></a> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg"></a></p>
|
109
105
|
|
110
106
|
<blockquote>
|
@@ -115,56 +111,11 @@
|
|
115
111
|
|
116
112
|
<p>View on: <a href="https://github.com/evanthegrayt/standup_md">Github</a> | <a href="https://evanthegrayt.github.io/standup_md/">GitHub Pages</a> | <a href="https://rubygems.org/gems/standup_md">RubyGems</a></p>
|
117
113
|
|
118
|
-
<h2 id="label-Table+of+Contents">Table of Contents<span><a href="#label-Table+of+Contents">¶</a> <a href="#top">↑</a></span></h2>
|
119
|
-
<ul><li>
|
120
|
-
<p><a href="#about">About</a></p>
|
121
|
-
</li><li>
|
122
|
-
<p><a href="#Installation">Installation</a></p>
|
123
|
-
</li><li>
|
124
|
-
<p><a href="#via-rubygems">Via RubyGems</a></p>
|
125
|
-
</li><li>
|
126
|
-
<p><a href="#manual-installation">Manual Installation</a></p>
|
127
|
-
</li><li>
|
128
|
-
<p><a href="#usage">Usage</a></p>
|
129
|
-
</li><li>
|
130
|
-
<p><a href="#command-line">Command Line</a></p>
|
131
|
-
<ul><li>
|
132
|
-
<p><a href="#cli-examples">CLI Examples</a></p>
|
133
|
-
</li><li>
|
134
|
-
<p><a href="#adding-an-entry-for-today-via-editor">Adding an entry for today via editor</a></p>
|
135
|
-
</li><li>
|
136
|
-
<p><a href="#copy-the-entry-for-today-to-clipboard">Copy the entry for today to clipboard</a></p>
|
137
|
-
</li><li>
|
138
|
-
<p><a href="#add-entry-to-file-without-opening-it">Add entry to file without opening it</a></p>
|
139
|
-
</li><li>
|
140
|
-
<p><a href="#find-an-entry-by-date-and-print-it">Find an entry by date and print it</a></p>
|
141
|
-
</li><li>
|
142
|
-
<p><a href="#customization-and-runtime-options">Customization and Runtime Options</a></p>
|
143
|
-
</li><li>
|
144
|
-
<p><a href="#using-existing-standup-files">Using existing standup files</a></p>
|
145
|
-
</li></ul>
|
146
|
-
</li><li>
|
147
|
-
<p><a href="#api">API</a></p>
|
148
|
-
<ul><li>
|
149
|
-
<p><a href="#api-examples">API Examples</a></p>
|
150
|
-
</li><li>
|
151
|
-
<p><a href="#adding-an-entry-for-today">Adding an entry for today</a></p>
|
152
|
-
</li><li>
|
153
|
-
<p><a href="#finding-a-past-entry">Finding a past entry</a></p>
|
154
|
-
</li><li>
|
155
|
-
<p><a href="https://evanthegrayt.github.io/standup_md/doc/index.html">Documentation</a></p>
|
156
|
-
</li></ul>
|
157
|
-
</li><li>
|
158
|
-
<p><a href="#reporting-bugs-and-requesting-features">Reporting Bugs and Requesting Features</a></p>
|
159
|
-
</li><li>
|
160
|
-
<p><a href="#self-promotion">Self-Promotion</a></p>
|
161
|
-
</li></ul>
|
162
|
-
|
163
114
|
<h2 id="label-About">About<span><a href="#label-About">¶</a> <a href="#top">↑</a></span></h2>
|
164
115
|
|
165
116
|
<p>I've now been at two separate companies where we post our daily standups in a chat client, such as Slack, Mattermost, or Riot. Typing out my standup every day became tedious, as I'd have to look up what I did the day before, copy and paste yesterday's work into a new entry, and add today's tasks. This gem automates most of this process, along with providing means of opening the file in your editor, and finding and displaying entries from the command line.</p>
|
166
117
|
|
167
|
-
<p>In a nutshell, calling <code>standup</code> from the command line will open a standup file for the current month in your preferred editor. If an entry for today is already present, no text will be generated. If an entry for today doesn't exist, one will be generated with your preferred values. When generating, if a previous entry exists, it will be added to today's entry as your previous day's work. See <a href="#
|
118
|
+
<p>In a nutshell, calling <code>standup</code> from the command line will open a standup file for the current month in your preferred editor. If an entry for today is already present, no text will be generated. If an entry for today doesn't exist, one will be generated with your preferred values. When generating, if a previous entry exists, it will be added to today's entry as your previous day's work. See <a href="#cli-examples">example</a>. There's also a very robust API if you'd like to use this in your own code somehow.</p>
|
168
119
|
|
169
120
|
<h2 id="label-Installation">Installation<span><a href="#label-Installation">¶</a> <a href="#top">↑</a></span></h2>
|
170
121
|
|
@@ -236,17 +187,11 @@ rake install</pre>
|
|
236
187
|
<pre class="ruby"><span class="ruby-identifier">standup</span> <span class="ruby-operator">-</span><span class="ruby-identifier">p</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">pbcopy</span>
|
237
188
|
</pre>
|
238
189
|
|
239
|
-
<p>If you wanted to add today's entry without opening your editor, and print the result to the command line, you could use the following.</p>
|
240
|
-
|
241
190
|
<h4 id="label-Add+entry+to+file+without+opening+it">Add entry to file without opening it<span><a href="#label-Add+entry+to+file+without+opening+it">¶</a> <a href="#top">↑</a></span></h4>
|
242
191
|
|
243
|
-
<
|
244
|
-
|
245
|
-
<h4 id="label-Find+an+entry+by+date+and+print+it.">Find an entry by date and print it.<span><a href="#label-Find+an+entry+by+date+and+print+it.">¶</a> <a href="#top">↑</a></span></h4>
|
192
|
+
<p>You can add an entry for today without even opening your editor. Note that, if you have multiple entries, you must separate them with a comma and <em>no spaces</em>.</p>
|
246
193
|
|
247
|
-
<
|
248
|
-
|
249
|
-
<pre>standup -p 2020-03-02</pre>
|
194
|
+
<pre>standup --no-edit --current "Work on this thing","And another thing"</pre>
|
250
195
|
|
251
196
|
<h3 id="label-Customization+and+Runtime+Options">Customization and Runtime Options<span><a href="#label-Customization+and+Runtime+Options">¶</a> <a href="#top">↑</a></span></h3>
|
252
197
|
|
@@ -300,7 +245,23 @@ rake install</pre>
|
|
300
245
|
|
301
246
|
<h4 id="label-Executable+Flags">Executable Flags<span><a href="#label-Executable+Flags">¶</a> <a href="#top">↑</a></span></h4>
|
302
247
|
|
303
|
-
<p>Some of these options can be changed at runtime. They are as follows
|
248
|
+
<p>Some of these options can be changed at runtime. They are as follows.</p>
|
249
|
+
|
250
|
+
<pre>--current ARRAY List of current entry's tasks
|
251
|
+
--previous ARRAY List of precious entry's tasks
|
252
|
+
--impediments ARRAY List of impediments for current entry
|
253
|
+
--notes ARRAY List of notes for current entry
|
254
|
+
--sub-header-order ARRAY The order of the sub-headers when writing the file
|
255
|
+
-f, --file-name-format STRING Date-formattable string to use for standup file name
|
256
|
+
-E, --editor EDITOR Editor to use for opening standup files
|
257
|
+
-d, --directory DIRECTORY The directories where standup files are located
|
258
|
+
-w --[no-]write Write current entry if it doesn't exist. Default is true
|
259
|
+
-a --[no-]auto-fill-previous Auto-generate 'previous' tasks for new entries
|
260
|
+
-e --[no-]edit Open the file in the editor. Default is true
|
261
|
+
-v, --[no-]verbose Verbose output. Default is false.
|
262
|
+
-p, --print [DATE] Print current entry.
|
263
|
+
If DATE is passed, will print entry for DATE, if it exists.
|
264
|
+
DATE must be in the same format as file-name-format</pre>
|
304
265
|
|
305
266
|
<h4 id="label-Using+Existing+Standup+Files">Using Existing Standup Files<span><a href="#label-Using+Existing+Standup+Files">¶</a> <a href="#top">↑</a></span></h4>
|
306
267
|
|
@@ -348,7 +309,7 @@ rake install</pre>
|
|
348
309
|
|
349
310
|
<p>The API is fully documented in the <a href="https://evanthegrayt.github.io/standup_md/doc/index.html">RDoc Documentation</a>.</p>
|
350
311
|
|
351
|
-
<p>This was mainly written as a command line utility, but the API is
|
312
|
+
<p>This was mainly written as a command line utility, but the API is very robust, and is available for use in your own projects. A quick example of how to write a new entry via code could look like the following:</p>
|
352
313
|
|
353
314
|
<h3 id="label-API+Examples">API Examples<span><a href="#label-API+Examples">¶</a> <a href="#top">↑</a></span></h3>
|
354
315
|
|
@@ -387,6 +348,31 @@ rake install</pre>
|
|
387
348
|
<span class="ruby-identifier">entry</span> = <span class="ruby-identifier">file</span>.<span class="ruby-identifier">entries</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">date</span>)
|
388
349
|
</pre>
|
389
350
|
|
351
|
+
<h2 id="label-Vim">Vim<span><a href="#label-Vim">¶</a> <a href="#top">↑</a></span></h2>
|
352
|
+
|
353
|
+
<p>While there's no official support for vim, you can add this to your <code>vimrc</code> file, or something like <code>~/.vim/plugin/standup.vim</code>.</p>
|
354
|
+
|
355
|
+
<pre>command! -complete=custom,<SID>StandupCompletion -nargs=? -bang Standup
|
356
|
+
\ call <SID>OpenStandupFile(<bang>0, <f-args>)
|
357
|
+
|
358
|
+
function! s:StandupCompletion(...) abort
|
359
|
+
let l:dir = get(g:, 'standup_dir', $HOME . '/.cache/standup_md') . '/'
|
360
|
+
if !isdirectory(l:dir) | return '' | endif
|
361
|
+
return join(map(glob(l:dir . '*.md', 0, 1), "fnamemodify(v:val, ':t')"), "\n")
|
362
|
+
endfunction
|
363
|
+
|
364
|
+
function! s:OpenStandupFile(split, ...)
|
365
|
+
let l:dir = get(g:, 'standup_dir', $HOME . '/.cache/standup_md') . '/'
|
366
|
+
let l:file = a:0 ? a:1 : get(g:, 'standup_file', strftime('%Y_%m.md'))
|
367
|
+
call system('standup --no-edit')
|
368
|
+
execute a:split ? 'vsplit' : 'split' l:dir . l:file
|
369
|
+
endfunction</pre>
|
370
|
+
|
371
|
+
<p>This makes the <code>:Standup</code> command, which opens the standup file in a split, while <code>:Standup!</code> opens it in a vertical split. If a file is passed to the command, that file will be opened. There's tab completion for this. Lastly, it allows for a few variables to be set for customization.</p>
|
372
|
+
|
373
|
+
<pre>g:standup_dir = $HOME . '/.cache/standup_md' " the directory where your file are
|
374
|
+
g:standup_file = strftime('%Y_%m.md') " the file format to use</pre>
|
375
|
+
|
390
376
|
<h2 id="label-Reporting+Bugs+and+Requesting+Features">Reporting Bugs and Requesting Features<span><a href="#label-Reporting+Bugs+and+Requesting+Features">¶</a> <a href="#top">↑</a></span></h2>
|
391
377
|
|
392
378
|
<p>If you have an idea or find a bug, please <a href="https://github.com/evanthegrayt/standup_md/issues/new">create an issue</a>. Just make sure the topic doesn't already exist. Better yet, you can always submit a Pull Request.</p>
|
@@ -401,7 +387,7 @@ rake install</pre>
|
|
401
387
|
|
402
388
|
<footer id="validator-badges" role="contentinfo">
|
403
389
|
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
404
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.
|
390
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
|
405
391
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
406
392
|
</footer>
|
407
393
|
|
data/doc/StandupMD.html
CHANGED
@@ -21,8 +21,6 @@
|
|
21
21
|
<link href="./css/rdoc.css" rel="stylesheet">
|
22
22
|
|
23
23
|
|
24
|
-
|
25
|
-
|
26
24
|
<body id="top" role="document" class="module">
|
27
25
|
<nav role="navigation">
|
28
26
|
<div id="project-navigation">
|
@@ -62,22 +60,17 @@
|
|
62
60
|
|
63
61
|
|
64
62
|
|
65
|
-
|
63
|
+
|
64
|
+
<!-- Method Quickref -->
|
66
65
|
<div id="method-list-section" class="nav-section">
|
67
66
|
<h3>Methods</h3>
|
68
67
|
|
69
68
|
<ul class="link-list" role="directory">
|
70
|
-
|
71
69
|
<li ><a href="#method-c-config">::config</a>
|
72
|
-
|
73
70
|
<li ><a href="#method-c-config_file_loaded-3F">::config_file_loaded?</a>
|
74
|
-
|
75
71
|
<li ><a href="#method-c-configure">::configure</a>
|
76
|
-
|
77
72
|
<li ><a href="#method-c-load_config_file">::load_config_file</a>
|
78
|
-
|
79
73
|
<li ><a href="#method-c-reset_config">::reset_config</a>
|
80
|
-
|
81
74
|
</ul>
|
82
75
|
</div>
|
83
76
|
|
@@ -95,230 +88,151 @@
|
|
95
88
|
|
96
89
|
</section>
|
97
90
|
|
98
|
-
|
99
91
|
<section id="5Buntitled-5D" class="documentation-section">
|
100
|
-
|
101
92
|
|
102
|
-
|
103
93
|
|
104
|
-
|
105
|
-
<section class="constants-list">
|
106
|
-
<header>
|
107
|
-
<h3>Constants</h3>
|
108
|
-
</header>
|
109
|
-
<dl>
|
110
|
-
|
111
|
-
<dt id="VERSION">VERSION
|
112
|
-
|
113
|
-
<dd><p>The gem verision</p>
|
114
|
-
|
115
|
-
<p>@return [String]</p>
|
116
|
-
|
117
|
-
|
118
|
-
</dl>
|
119
|
-
</section>
|
120
|
-
|
121
94
|
|
122
|
-
|
123
95
|
|
124
|
-
|
96
|
+
|
125
97
|
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
126
98
|
<header>
|
127
99
|
<h3>Public Class Methods</h3>
|
128
100
|
</header>
|
129
101
|
|
130
|
-
|
131
102
|
<div id="method-c-config" class="method-detail ">
|
132
|
-
|
133
103
|
<div class="method-heading">
|
134
104
|
<span class="method-name">config</span><span
|
135
105
|
class="method-args">()</span>
|
136
|
-
|
137
106
|
<span class="method-click-advice">click to toggle source</span>
|
138
|
-
|
139
107
|
</div>
|
140
|
-
|
141
108
|
|
142
109
|
<div class="method-description">
|
143
|
-
|
144
110
|
<p>Method for accessing the configuration.</p>
|
145
111
|
|
146
112
|
<p>@return [StanupMD::Cli]</p>
|
147
|
-
|
148
|
-
|
149
113
|
|
150
|
-
|
151
114
|
<div class="method-source-code" id="config-source">
|
152
115
|
<pre><span class="ruby-comment"># File lib/standup_md.rb, line 19</span>
|
153
116
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">config</span>
|
154
|
-
<span class="ruby-ivar">@config</span> <span class="ruby-operator"
|
117
|
+
<span class="ruby-ivar">@config</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">reset_config</span>
|
155
118
|
<span class="ruby-keyword">end</span></pre>
|
156
119
|
</div>
|
157
|
-
|
158
120
|
</div>
|
159
121
|
|
160
|
-
|
161
122
|
|
162
|
-
|
163
123
|
</div>
|
164
124
|
|
165
|
-
|
166
125
|
<div id="method-c-config_file_loaded-3F" class="method-detail ">
|
167
|
-
|
168
126
|
<div class="method-heading">
|
169
127
|
<span class="method-name">config_file_loaded?</span><span
|
170
128
|
class="method-args">()</span>
|
171
|
-
|
172
129
|
<span class="method-click-advice">click to toggle source</span>
|
173
|
-
|
174
130
|
</div>
|
175
|
-
|
176
131
|
|
177
132
|
<div class="method-description">
|
178
|
-
|
179
133
|
<p>Has a config file been loaded?</p>
|
180
134
|
|
181
135
|
<p>@return [Boolean]</p>
|
182
|
-
|
183
|
-
|
184
136
|
|
185
|
-
|
186
137
|
<div class="method-source-code" id="config_file_loaded-3F-source">
|
187
138
|
<pre><span class="ruby-comment"># File lib/standup_md.rb, line 44</span>
|
188
139
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">config_file_loaded?</span>
|
189
140
|
<span class="ruby-ivar">@config_file_loaded</span>
|
190
141
|
<span class="ruby-keyword">end</span></pre>
|
191
142
|
</div>
|
192
|
-
|
193
143
|
</div>
|
194
144
|
|
195
|
-
|
196
145
|
|
197
|
-
|
198
146
|
</div>
|
199
147
|
|
200
|
-
|
201
148
|
<div id="method-c-configure" class="method-detail ">
|
202
|
-
|
203
149
|
<div class="method-heading">
|
204
150
|
<span class="method-name">configure</span><span
|
205
151
|
class="method-args">() { |config| ... }</span>
|
206
|
-
|
207
152
|
<span class="method-click-advice">click to toggle source</span>
|
208
|
-
|
209
153
|
</div>
|
210
|
-
|
211
154
|
|
212
155
|
<div class="method-description">
|
213
|
-
|
214
156
|
<p>Allows for configuration via a block. Useful when making config files.</p>
|
215
157
|
|
216
158
|
<p>@example</p>
|
217
159
|
|
218
160
|
<pre class="ruby"><span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">configure</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">cli</span>.<span class="ruby-identifier">editor</span> = <span class="ruby-string">'mate'</span> }
|
219
161
|
</pre>
|
220
|
-
|
221
|
-
|
222
162
|
|
223
|
-
|
224
163
|
<div class="method-source-code" id="configure-source">
|
225
164
|
<pre><span class="ruby-comment"># File lib/standup_md.rb, line 36</span>
|
226
165
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">configure</span>
|
227
|
-
<span class="ruby-keyword">yield</span> <span class="ruby-
|
166
|
+
<span class="ruby-keyword">yield</span> <span class="ruby-identifier">config</span>
|
228
167
|
<span class="ruby-keyword">end</span></pre>
|
229
168
|
</div>
|
230
|
-
|
231
169
|
</div>
|
232
170
|
|
233
|
-
|
234
171
|
|
235
|
-
|
236
172
|
</div>
|
237
173
|
|
238
|
-
|
239
174
|
<div id="method-c-load_config_file" class="method-detail ">
|
240
|
-
|
241
175
|
<div class="method-heading">
|
242
176
|
<span class="method-name">load_config_file</span><span
|
243
177
|
class="method-args">(file)</span>
|
244
|
-
|
245
178
|
<span class="method-click-advice">click to toggle source</span>
|
246
|
-
|
247
179
|
</div>
|
248
|
-
|
249
180
|
|
250
181
|
<div class="method-description">
|
251
|
-
|
252
182
|
<p>Loads a config file.</p>
|
253
183
|
|
254
184
|
<p>@param [String] file</p>
|
255
|
-
|
256
|
-
|
257
185
|
|
258
|
-
|
186
|
+
<p>@return [String] file</p>
|
187
|
+
|
259
188
|
<div class="method-source-code" id="load_config_file-source">
|
260
|
-
<pre><span class="ruby-comment"># File lib/standup_md.rb, line
|
189
|
+
<pre><span class="ruby-comment"># File lib/standup_md.rb, line 54</span>
|
261
190
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">load_config_file</span>(<span class="ruby-identifier">file</span>)
|
262
|
-
<span class="ruby-identifier">
|
263
|
-
|
264
|
-
|
265
|
-
|
191
|
+
<span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">file</span>).<span class="ruby-identifier">tap</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
|
192
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"File #{file} does not exist."</span> <span class="ruby-keyword">unless</span> <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-identifier">file</span>)
|
193
|
+
|
194
|
+
<span class="ruby-ivar">@config_file_loaded</span> = <span class="ruby-keyword">true</span>
|
195
|
+
<span class="ruby-identifier">load</span> <span class="ruby-identifier">file</span>
|
196
|
+
<span class="ruby-keyword">end</span>
|
266
197
|
<span class="ruby-keyword">end</span></pre>
|
267
198
|
</div>
|
268
|
-
|
269
199
|
</div>
|
270
200
|
|
271
|
-
|
272
201
|
|
273
|
-
|
274
202
|
</div>
|
275
203
|
|
276
|
-
|
277
204
|
<div id="method-c-reset_config" class="method-detail ">
|
278
|
-
|
279
205
|
<div class="method-heading">
|
280
206
|
<span class="method-name">reset_config</span><span
|
281
207
|
class="method-args">()</span>
|
282
|
-
|
283
208
|
<span class="method-click-advice">click to toggle source</span>
|
284
|
-
|
285
209
|
</div>
|
286
|
-
|
287
210
|
|
288
211
|
<div class="method-description">
|
289
|
-
|
290
212
|
<p>Reset all configuration values to their defaults.</p>
|
291
213
|
|
292
214
|
<p>@return [StandupMD::Config]</p>
|
293
|
-
|
294
|
-
|
295
215
|
|
296
|
-
|
297
216
|
<div class="method-source-code" id="reset_config-source">
|
298
217
|
<pre><span class="ruby-comment"># File lib/standup_md.rb, line 27</span>
|
299
218
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">reset_config</span>
|
300
219
|
<span class="ruby-ivar">@config</span> = <span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span>.<span class="ruby-identifier">new</span>
|
301
220
|
<span class="ruby-keyword">end</span></pre>
|
302
221
|
</div>
|
303
|
-
|
304
222
|
</div>
|
305
223
|
|
306
|
-
|
307
224
|
|
308
|
-
|
309
225
|
</div>
|
310
226
|
|
311
|
-
|
312
227
|
</section>
|
313
|
-
|
314
|
-
</section>
|
315
228
|
|
229
|
+
</section>
|
316
230
|
</main>
|
317
231
|
|
318
232
|
|
319
233
|
<footer id="validator-badges" role="contentinfo">
|
320
234
|
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
321
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.
|
235
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
|
322
236
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
323
237
|
</footer>
|
324
238
|
|