standup_md 0.3.3 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 49f9ad4ada41c9372b1d3ffebb4f44fff6cb96249224c9b62c5063e1836a4c8f
4
- data.tar.gz: da5aa3a5e2cfc882372ef5899694941d32702049323d615acc36644733dabe12
3
+ metadata.gz: 57e3f70a3f6a38b1c9d6efa8b1f72dffc678771bd1404c4ff218840efcd24be5
4
+ data.tar.gz: 8f68954fa77c186804ce05f14f2903d8e7e36d978c8ec75453153f18e48490e7
5
5
  SHA512:
6
- metadata.gz: 35587b73b6ec5d9d2388ce4d4b95185b982486414f3c5a5874fd7c73ee84dfcab6ba4b0109fcac33bf89576517a48f3a9730e85238ee53557f3b0047e6548c19
7
- data.tar.gz: d772849128665813f3326fa41a684607e1231cd7065828f933dc5b50e51b0f909ef24862020d08af39f2bb2cd07e749c02c0347c00d923fb9ee38f14c69808c3
6
+ metadata.gz: af2637941f87f5a3aab89ae2cd5a44d750e58d289ce0a5c9f21aeba6708c4e847794065a5c86520ece53f1a1475e15079f3a924b70724e4b6258ee14cdcf9a6d
7
+ data.tar.gz: cf88b88ad98241a3caded35085a5031fa8ebb3b0c64124d2d32dd3f7ad1ec1ff2ff52b566c7316738e43b56e642522b5f6e6e107cd55ccaea1732eb233683c26
data/Gemfile.lock CHANGED
@@ -1,23 +1,25 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- standup_md (0.3.0)
4
+ standup_md (0.3.7)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- docile (1.3.2)
10
- power_assert (1.2.0)
11
- rake (13.0.1)
12
- simplecov (0.18.5)
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
- simplecov-html (0.12.2)
16
- test-unit (3.3.5)
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
- ruby
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.1.4
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,26 +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
- - [Documentation](https://evanthegrayt.github.io/standup_md/doc/index.html)
32
- - [Reporting Bugs and Requesting Features](#reporting-bugs-and-requesting-features)
33
- - [Self-Promotion](#self-promotion)
34
-
35
16
  ## About
36
17
  I've now been at two separate companies where we post our daily standups in a
37
18
  chat client, such as Slack, Mattermost, or Riot. Typing out my standup every day
@@ -45,10 +26,15 @@ for the current month in your preferred editor. If an entry for today is already
45
26
  present, no text will be generated. If an entry for today doesn't exist, one
46
27
  will be generated with your preferred values. When generating, if a previous
47
28
  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.
29
+ [example](#cli-examples). There's also a very robust API if you'd like to use
30
+ this in your own code somehow.
50
31
 
51
32
  ## Installation
33
+ If you don't have the permissions to install system-wide gems, you're probabaly
34
+ also running an older version of ruby. I recommend installing
35
+ [rbenv](https://github.com/rbenv/rbenv#installation), and then installing an
36
+ up-to-date version of ruby.
37
+
52
38
  ### Via RubyGems
53
39
  Just install the gem!
54
40
 
@@ -167,6 +153,8 @@ them again.
167
153
 
168
154
 
169
155
  #### Available Config File Options and Defaults
156
+ For command-line usage, this file needs to be named `~/.standuprc`. To use in a
157
+ rails project, create an initializer (`config/initializers/standup_md.rb`).
170
158
 
171
159
  ```ruby
172
160
  StandupMD.configure do |c|
@@ -205,7 +193,15 @@ StandupMD.configure do |c|
205
193
  end
206
194
  ```
207
195
 
196
+ Any options not set in this file will retain their default values. Note that if
197
+ you change `file_name_format`, and don't use a month or year, there will only
198
+ ever be one standup file. This could cause issues long-term, as the files will
199
+ get large over time and possibly cause performance issues.
200
+
201
+
208
202
  #### Executable Flags
203
+ Some of these options can be changed at runtime. They are as follows.
204
+
209
205
  ```
210
206
  --current ARRAY List of current entry's tasks
211
207
  --previous ARRAY List of precious entry's tasks
@@ -224,11 +220,6 @@ end
224
220
  DATE must be in the same format as file-name-format
225
221
  ```
226
222
 
227
- Any options not set in this file will retain their default values. Note that if
228
- you change `file_name_format`, and don't use a month or year, there will only
229
- ever be one standup file. This could cause issues long-term, as the files will
230
- get large over time and possibly cause performance issues.
231
-
232
223
  #### Using Existing Standup Files
233
224
  If you already have a directory of existing standup files, you can use them, but
234
225
  they must be in a format that the parser can understand. The default is:
@@ -282,12 +273,12 @@ end
282
273
  The API is fully documented in the
283
274
  [RDoc Documentation](https://evanthegrayt.github.io/standup_md/doc/index.html).
284
275
 
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:
276
+ This was mainly written as a command line utility, but the API is very robust,
277
+ and is available for use in your own projects. A quick example of how to write a
278
+ new entry via code could look like the following:
288
279
 
289
280
  ### API Examples
290
-
281
+ #### Adding an entry for today
291
282
  ```ruby
292
283
  require 'standup_md'
293
284
 
@@ -315,10 +306,52 @@ end
315
306
  StandupMD::File.find_by_date(Date.today).load.write
316
307
  ```
317
308
 
309
+ #### Finding a past entry
310
+ ```ruby
311
+ require 'standup_md'
312
+
313
+ date = Date.new(2020, 04, 15)
314
+ file = StandupMD::File.find_by_date(date).load
315
+ entry = file.entries.find(date)
316
+ ```
317
+
318
+ ## Vim
319
+ While there's no official support for vim, you can add this to your `vimrc`
320
+ file, or something like `~/.vim/plugin/standup.vim`.
321
+
322
+ ```vim
323
+ command! -complete=custom,<SID>StandupCompletion -nargs=? -bang Standup
324
+ \ call s:OpenStandupFile(<bang>0, <f-args>)
325
+
326
+ function! s:StandupCompletion(...) abort
327
+ let l:dir = get(g:, 'standup_dir', $HOME . '/.cache/standup_md') . '/'
328
+ if !isdirectory(l:dir) | return '' | endif
329
+ return join(map(glob(l:dir . '*.md', 0, 1), "fnamemodify(v:val, ':t')"), "\n")
330
+ endfunction
331
+
332
+ function! s:OpenStandupFile(split, ...)
333
+ let l:dir = get(g:, 'standup_dir', $HOME . '/.cache/standup_md') . '/'
334
+ let l:file = a:0 ? a:1 : get(g:, 'standup_file', strftime('%Y_%m.md'))
335
+ call system('standup --no-edit')
336
+ execute a:split ? 'vsplit' : 'split' l:dir . l:file
337
+ endfunction
338
+ ```
339
+
340
+ This makes the `:Standup` command, which opens the standup file in a split,
341
+ while `:Standup!` opens it in a vertical split. If a file is passed to the
342
+ command, that file will be opened. There's tab completion for this. Lastly,
343
+ it allows for a few variables to be set for customization.
344
+
345
+ ```vim
346
+ g:standup_dir = $HOME . '/.cache/standup_md' " the directory where your file are
347
+ g:standup_file = strftime('%Y_%m.md') " the file format to use
348
+ ```
349
+
318
350
  ## Reporting Bugs and Requesting Features
319
351
  If you have an idea or find a bug, please [create an
320
- issue](https://github.com/evanthegrayt/standup_md/issues/new). Just make sure the topic
321
- doesn't already exist. Better yet, you can always submit a Pull Request.
352
+ issue](https://github.com/evanthegrayt/standup_md/issues/new). Just make sure
353
+ the topic doesn't already exist. Better yet, you can always submit a Pull
354
+ Request.
322
355
 
323
356
  ## Self-Promotion
324
357
  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 :default => :test
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>
@@ -79,6 +76,9 @@
79
76
  <li><a href="#label-Using+Existing+Standup+Files">Using Existing Standup Files</a>
80
77
  <li><a href="#label-API">API</a>
81
78
  <li><a href="#label-API+Examples">API Examples</a>
79
+ <li><a href="#label-Adding+an+entry+for+today">Adding an entry for today</a>
80
+ <li><a href="#label-Finding+a+past+entry">Finding a past entry</a>
81
+ <li><a href="#label-Vim">Vim</a>
82
82
  <li><a href="#label-Reporting+Bugs+and+Requesting+Features">Reporting Bugs and Requesting Features</a>
83
83
  <li><a href="#label-Self-Promotion">Self-Promotion</a>
84
84
  </ul>
@@ -86,13 +86,12 @@
86
86
 
87
87
 
88
88
  <div id="project-metadata">
89
- <div id="fileindex-section" class="nav-section">
89
+
90
+ <div id="fileindex-section" class="nav-section">
90
91
  <h3>Pages</h3>
91
92
 
92
93
  <ul class="link-list">
93
-
94
94
  <li><a href="./README_md.html">README</a>
95
-
96
95
  </ul>
97
96
  </div>
98
97
 
@@ -102,7 +101,7 @@
102
101
  <main role="main" aria-label="Page README.md">
103
102
 
104
103
  <h1 id="label-The+Standup+Doctor">The Standup Doctor<span><a href="#label-The+Standup+Doctor">&para;</a> <a href="#top">&uarr;</a></span></h1>
105
-
104
+ <!-- vi: set ts=4 sw=4 : -->
106
105
  <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>
107
106
 
108
107
  <blockquote>
@@ -113,55 +112,16 @@
113
112
 
114
113
  <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>
115
114
 
116
- <h2 id="label-Table+of+Contents">Table of Contents<span><a href="#label-Table+of+Contents">&para;</a> <a href="#top">&uarr;</a></span></h2>
117
- <ul><li>
118
- <p><a href="#about">About</a></p>
119
- </li><li>
120
- <p><a href="#Installation">Installation</a></p>
121
- </li><li>
122
- <p><a href="#via-rubygems">Via RubyGems</a></p>
123
- </li><li>
124
- <p><a href="#manual-installation">Manual Installation</a></p>
125
- </li><li>
126
- <p><a href="#usage">Usage</a></p>
127
- </li><li>
128
- <p><a href="#command-line">Command Line</a></p>
129
- <ul><li>
130
- <p><a href="#cli-examples">CLI Examples</a></p>
131
- </li><li>
132
- <p><a href="#adding-an-entry-for-today-via-editor">Adding an entry for today via editor</a></p>
133
- </li><li>
134
- <p><a href="#copy-the-entry-for-today-to-clipboard">Copy the entry for today to clipboard</a></p>
135
- </li><li>
136
- <p><a href="#add-entry-to-file-without-opening-it">Add entry to file without opening it</a></p>
137
- </li><li>
138
- <p><a href="#find-an-entry-by-date-and-print-it">Find an entry by date and print it</a></p>
139
- </li><li>
140
- <p><a href="#customization-and-runtime-options">Customization and Runtime Options</a></p>
141
- </li><li>
142
- <p><a href="#using-existing-standup-files">Using existing standup files</a></p>
143
- </li></ul>
144
- </li><li>
145
- <p><a href="#api">API</a></p>
146
- <ul><li>
147
- <p><a href="#api-examples">API Examples</a></p>
148
- </li><li>
149
- <p><a href="https://evanthegrayt.github.io/standup_md/doc/index.html">Documentation</a></p>
150
- </li></ul>
151
- </li><li>
152
- <p><a href="#reporting-bugs-and-requesting-features">Reporting Bugs and Requesting Features</a></p>
153
- </li><li>
154
- <p><a href="#self-promotion">Self-Promotion</a></p>
155
- </li></ul>
156
-
157
115
  <h2 id="label-About">About<span><a href="#label-About">&para;</a> <a href="#top">&uarr;</a></span></h2>
158
116
 
159
117
  <p>I&#39;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&#39;d have to look up what I did the day before, copy and paste yesterday&#39;s work into a new entry, and add today&#39;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>
160
118
 
161
- <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&#39;t exist, one will be generated with your preferred values. When generating, if a previous entry exists, it will be added to today&#39;s entry as your previous day&#39;s work. See <a href="#example">example</a>. There&#39;s also a very robust API if you&#39;d like to use this in your own code somehow.</p>
119
+ <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&#39;t exist, one will be generated with your preferred values. When generating, if a previous entry exists, it will be added to today&#39;s entry as your previous day&#39;s work. See <a href="#cli-examples">example</a>. There&#39;s also a very robust API if you&#39;d like to use this in your own code somehow.</p>
162
120
 
163
121
  <h2 id="label-Installation">Installation<span><a href="#label-Installation">&para;</a> <a href="#top">&uarr;</a></span></h2>
164
122
 
123
+ <p>If you don&#39;t have the permissions to install system-wide gems, you&#39;re probabaly also running an older version of ruby. I recommend installing <a href="https://github.com/rbenv/rbenv#installation">rbenv</a>, and then installing an up-to-date version of ruby.</p>
124
+
165
125
  <h3 id="label-Via+RubyGems">Via RubyGems<span><a href="#label-Via+RubyGems">&para;</a> <a href="#top">&uarr;</a></span></h3>
166
126
 
167
127
  <p>Just install the gem!</p>
@@ -250,6 +210,8 @@ rake install</pre>
250
210
 
251
211
  <h4 id="label-Available+Config+File+Options+and+Defaults">Available Config File Options and Defaults<span><a href="#label-Available+Config+File+Options+and+Defaults">&para;</a> <a href="#top">&uarr;</a></span></h4>
252
212
 
213
+ <p>For command-line usage, this file needs to be named <code>~/.standuprc</code>. To use in a rails project, create an initializer (<code>config/initializers/standup_md.rb</code>).</p>
214
+
253
215
  <pre class="ruby"><span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">configure</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
254
216
  <span class="ruby-comment"># Defaults for how the file is formatted.</span>
255
217
  <span class="ruby-comment"># See https://evanthegrayt.github.io/standup_md/doc/StandupMD/Config/Cli.html</span>
@@ -286,8 +248,12 @@ rake install</pre>
286
248
  <span class="ruby-keyword">end</span>
287
249
  </pre>
288
250
 
251
+ <p>Any options not set in this file will retain their default values. Note that if you change <code>file_name_format</code>, and don&#39;t use a month or year, there will only ever be one standup file. This could cause issues long-term, as the files will get large over time and possibly cause performance issues.</p>
252
+
289
253
  <h4 id="label-Executable+Flags">Executable Flags<span><a href="#label-Executable+Flags">&para;</a> <a href="#top">&uarr;</a></span></h4>
290
254
 
255
+ <p>Some of these options can be changed at runtime. They are as follows.</p>
256
+
291
257
  <pre>--current ARRAY List of current entry&#39;s tasks
292
258
  --previous ARRAY List of precious entry&#39;s tasks
293
259
  --impediments ARRAY List of impediments for current entry
@@ -304,8 +270,6 @@ rake install</pre>
304
270
  If DATE is passed, will print entry for DATE, if it exists.
305
271
  DATE must be in the same format as file-name-format</pre>
306
272
 
307
- <p>Any options not set in this file will retain their default values. Note that if you change <code>file_name_format</code>, and don&#39;t use a month or year, there will only ever be one standup file. This could cause issues long-term, as the files will get large over time and possibly cause performance issues.</p>
308
-
309
273
  <h4 id="label-Using+Existing+Standup+Files">Using Existing Standup Files<span><a href="#label-Using+Existing+Standup+Files">&para;</a> <a href="#top">&uarr;</a></span></h4>
310
274
 
311
275
  <p>If you already have a directory of existing standup files, you can use them, but they must be in a format that the parser can understand. The default is:</p>
@@ -352,10 +316,12 @@ rake install</pre>
352
316
 
353
317
  <p>The API is fully documented in the <a href="https://evanthegrayt.github.io/standup_md/doc/index.html">RDoc Documentation</a>.</p>
354
318
 
355
- <p>This was mainly written as a command line utility, but the API is ridiculously 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>
319
+ <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>
356
320
 
357
321
  <h3 id="label-API+Examples">API Examples<span><a href="#label-API+Examples">&para;</a> <a href="#top">&uarr;</a></span></h3>
358
322
 
323
+ <h4 id="label-Adding+an+entry+for+today">Adding an entry for today<span><a href="#label-Adding+an+entry+for+today">&para;</a> <a href="#top">&uarr;</a></span></h4>
324
+
359
325
  <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;standup_md&#39;</span>
360
326
 
361
327
  <span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">configure</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
@@ -380,6 +346,40 @@ rake install</pre>
380
346
  <span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">find_by_date</span>(<span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>).<span class="ruby-identifier">load</span>.<span class="ruby-identifier">write</span>
381
347
  </pre>
382
348
 
349
+ <h4 id="label-Finding+a+past+entry">Finding a past entry<span><a href="#label-Finding+a+past+entry">&para;</a> <a href="#top">&uarr;</a></span></h4>
350
+
351
+ <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;standup_md&#39;</span>
352
+
353
+ <span class="ruby-identifier">date</span> = <span class="ruby-constant">Date</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">2020</span>, <span class="ruby-value">04</span>, <span class="ruby-value">15</span>)
354
+ <span class="ruby-identifier">file</span> = <span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">find_by_date</span>(<span class="ruby-identifier">date</span>).<span class="ruby-identifier">load</span>
355
+ <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>)
356
+ </pre>
357
+
358
+ <h2 id="label-Vim">Vim<span><a href="#label-Vim">&para;</a> <a href="#top">&uarr;</a></span></h2>
359
+
360
+ <p>While there&#39;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>
361
+
362
+ <pre>command! -complete=custom,&lt;SID&gt;StandupCompletion -nargs=? -bang Standup
363
+ \ call s:OpenStandupFile(&lt;bang&gt;0, &lt;f-args&gt;)
364
+
365
+ function! s:StandupCompletion(...) abort
366
+ let l:dir = get(g:, &#39;standup_dir&#39;, $HOME . &#39;/.cache/standup_md&#39;) . &#39;/&#39;
367
+ if !isdirectory(l:dir) | return &#39;&#39; | endif
368
+ return join(map(glob(l:dir . &#39;*.md&#39;, 0, 1), &quot;fnamemodify(v:val, &#39;:t&#39;)&quot;), &quot;\n&quot;)
369
+ endfunction
370
+
371
+ function! s:OpenStandupFile(split, ...)
372
+ let l:dir = get(g:, &#39;standup_dir&#39;, $HOME . &#39;/.cache/standup_md&#39;) . &#39;/&#39;
373
+ let l:file = a:0 ? a:1 : get(g:, &#39;standup_file&#39;, strftime(&#39;%Y_%m.md&#39;))
374
+ call system(&#39;standup --no-edit&#39;)
375
+ execute a:split ? &#39;vsplit&#39; : &#39;split&#39; l:dir . l:file
376
+ endfunction</pre>
377
+
378
+ <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&#39;s tab completion for this. Lastly, it allows for a few variables to be set for customization.</p>
379
+
380
+ <pre>g:standup_dir = $HOME . &#39;/.cache/standup_md&#39; &quot; the directory where your file are
381
+ g:standup_file = strftime(&#39;%Y_%m.md&#39;) &quot; the file format to use</pre>
382
+
383
383
  <h2 id="label-Reporting+Bugs+and+Requesting+Features">Reporting Bugs and Requesting Features<span><a href="#label-Reporting+Bugs+and+Requesting+Features">&para;</a> <a href="#top">&uarr;</a></span></h2>
384
384
 
385
385
  <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&#39;t already exist. Better yet, you can always submit a Pull Request.</p>
@@ -394,7 +394,7 @@ rake install</pre>
394
394
 
395
395
  <footer id="validator-badges" role="contentinfo">
396
396
  <p><a href="https://validator.w3.org/check/referer">Validate</a>
397
- <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.1.
397
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
398
398
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
399
399
  </footer>
400
400
 
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
- <!-- Method Quickref -->
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,148 @@
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
117
  <span class="ruby-ivar">@config</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span>.<span class="ruby-identifier">new</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">&#39;mate&#39;</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-keyword">self</span>.<span class="ruby-identifier">config</span>
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
-
259
186
  <div class="method-source-code" id="load_config_file-source">
260
187
  <pre><span class="ruby-comment"># File lib/standup_md.rb, line 52</span>
261
188
  <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
189
  <span class="ruby-identifier">file</span> = <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">file</span>)
263
190
  <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;File #{file} does not exist.&quot;</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>)
191
+
264
192
  <span class="ruby-ivar">@config_file_loaded</span> = <span class="ruby-keyword">true</span>
265
193
  <span class="ruby-identifier">load</span> <span class="ruby-identifier">file</span>
266
194
  <span class="ruby-keyword">end</span></pre>
267
195
  </div>
268
-
269
196
  </div>
270
197
 
271
-
272
198
 
273
-
274
199
  </div>
275
200
 
276
-
277
201
  <div id="method-c-reset_config" class="method-detail ">
278
-
279
202
  <div class="method-heading">
280
203
  <span class="method-name">reset_config</span><span
281
204
  class="method-args">()</span>
282
-
283
205
  <span class="method-click-advice">click to toggle source</span>
284
-
285
206
  </div>
286
-
287
207
 
288
208
  <div class="method-description">
289
-
290
209
  <p>Reset all configuration values to their defaults.</p>
291
210
 
292
211
  <p>@return [StandupMD::Config]</p>
293
-
294
-
295
212
 
296
-
297
213
  <div class="method-source-code" id="reset_config-source">
298
214
  <pre><span class="ruby-comment"># File lib/standup_md.rb, line 27</span>
299
215
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">reset_config</span>
300
216
  <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
217
  <span class="ruby-keyword">end</span></pre>
302
218
  </div>
303
-
304
219
  </div>
305
220
 
306
-
307
221
 
308
-
309
222
  </div>
310
223
 
311
-
312
224
  </section>
313
-
314
- </section>
315
225
 
226
+ </section>
316
227
  </main>
317
228
 
318
229
 
319
230
  <footer id="validator-badges" role="contentinfo">
320
231
  <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.2.1.
232
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
322
233
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
323
234
  </footer>
324
235