standup_md 0.3.7 → 0.3.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +6 -16
  5. data/Rakefile +1 -1
  6. data/lib/standup_md.rb +8 -5
  7. data/lib/standup_md/cli.rb +7 -7
  8. data/lib/standup_md/cli/helpers.rb +10 -13
  9. data/lib/standup_md/config/file.rb +3 -3
  10. data/lib/standup_md/entry.rb +7 -9
  11. data/lib/standup_md/entry_list.rb +2 -2
  12. data/lib/standup_md/version.rb +26 -4
  13. data/standup_md.gemspec +1 -1
  14. metadata +3 -60
  15. data/doc/README_md.html +0 -400
  16. data/doc/StandupMD.html +0 -235
  17. data/doc/StandupMD/Cli.html +0 -406
  18. data/doc/StandupMD/Cli/Helpers.html +0 -146
  19. data/doc/StandupMD/Config.html +0 -193
  20. data/doc/StandupMD/Config/Cli.html +0 -296
  21. data/doc/StandupMD/Config/Entry.html +0 -240
  22. data/doc/StandupMD/Config/EntryList.html +0 -171
  23. data/doc/StandupMD/Config/File.html +0 -481
  24. data/doc/StandupMD/Entry.html +0 -369
  25. data/doc/StandupMD/EntryList.html +0 -499
  26. data/doc/StandupMD/File.html +0 -483
  27. data/doc/StandupMD/Version.html +0 -143
  28. data/doc/created.rid +0 -15
  29. data/doc/css/fonts.css +0 -167
  30. data/doc/css/rdoc.css +0 -619
  31. data/doc/fonts/Lato-Light.ttf +0 -0
  32. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  33. data/doc/fonts/Lato-Regular.ttf +0 -0
  34. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  35. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  36. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  37. data/doc/images/add.png +0 -0
  38. data/doc/images/arrow_up.png +0 -0
  39. data/doc/images/brick.png +0 -0
  40. data/doc/images/brick_link.png +0 -0
  41. data/doc/images/bug.png +0 -0
  42. data/doc/images/bullet_black.png +0 -0
  43. data/doc/images/bullet_toggle_minus.png +0 -0
  44. data/doc/images/bullet_toggle_plus.png +0 -0
  45. data/doc/images/date.png +0 -0
  46. data/doc/images/delete.png +0 -0
  47. data/doc/images/find.png +0 -0
  48. data/doc/images/loadingAnimation.gif +0 -0
  49. data/doc/images/macFFBgHack.png +0 -0
  50. data/doc/images/package.png +0 -0
  51. data/doc/images/page_green.png +0 -0
  52. data/doc/images/page_white_text.png +0 -0
  53. data/doc/images/page_white_width.png +0 -0
  54. data/doc/images/plugin.png +0 -0
  55. data/doc/images/ruby.png +0 -0
  56. data/doc/images/tag_blue.png +0 -0
  57. data/doc/images/tag_green.png +0 -0
  58. data/doc/images/transparent.png +0 -0
  59. data/doc/images/wrench.png +0 -0
  60. data/doc/images/wrench_orange.png +0 -0
  61. data/doc/images/zoom.png +0 -0
  62. data/doc/index.html +0 -388
  63. data/doc/js/darkfish.js +0 -84
  64. data/doc/js/navigation.js +0 -105
  65. data/doc/js/navigation.js.gz +0 -0
  66. data/doc/js/search.js +0 -110
  67. data/doc/js/search_index.js +0 -1
  68. data/doc/js/search_index.js.gz +0 -0
  69. data/doc/js/searcher.js +0 -229
  70. data/doc/js/searcher.js.gz +0 -0
  71. data/doc/table_of_contents.html +0 -402
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 672cba78862ca57f72b840a1d8062f15bd3c17efc8fdb27bd12d227ef5f36d49
4
- data.tar.gz: ea553eb97f65ecd00214aac2fe272c247d7f4291ca230d68b5111bea0b24b6bb
3
+ metadata.gz: 198d3fbe4a4f63217f389986638c5ee260104df0479644d19747b36a735526de
4
+ data.tar.gz: 06c89738efe6263153cac8734d6b4b45318002069f9cb4afd80670e73a735ca5
5
5
  SHA512:
6
- metadata.gz: 01a30468e6989cca9b63648b1222ed2c92524c5dcb79a0a0340d7844b428288a35758d6f2e58067cf68574a2ae323afa50a9fa79b0568a0c9bc5725e1dfee1a7
7
- data.tar.gz: 66fc66e7fff2bc7fafd1085fd0f248556577ea89f16c9f2b324b246cf40b79545fe481764e06d518e3fb788af6fe51c2379ca7f0eebdc61ff80bacf14de1b48f
6
+ metadata.gz: 9577cad9b7c93e6d19d4dd0ff2b9b72bb6b75422c9824859d4a96241d44aa198921e0541900f3803d12d4a5c33f6160648da63aaf10984972f8e12319f517ba9
7
+ data.tar.gz: 4b69b25cf4ba19e969ba5290d5f8283c1b09e63517bacee83f4ae9ded3e59cec6a2a517673452b56df3bdc9d75001779b9f20f4b5ffebad82ede780cb8944547
data/.gitignore CHANGED
@@ -1,2 +1,3 @@
1
1
  standup_md-*.gem
2
2
  coverage/*
3
+ docs/*
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- standup_md (0.3.7)
4
+ standup_md (0.3.10)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -9,9 +9,7 @@
9
9
  A highly customizable and automated way to keep track of daily standups in
10
10
  markdown files.
11
11
 
12
- View on: [Github](https://github.com/evanthegrayt/standup_md) |
13
- [GitHub Pages](https://evanthegrayt.github.io/standup_md/) |
14
- [RubyGems](https://rubygems.org/gems/standup_md)
12
+ You can view the documentation [here](https://evanthegrayt.github.io/standup_md/).
15
13
 
16
14
  ## About
17
15
  I've now been at two separate companies where we post our daily standups in a
@@ -113,20 +111,12 @@ your clipboard without even opening your editor.
113
111
  standup -p | pbcopy
114
112
  ```
115
113
 
116
- If you wanted to add today's entry without opening your editor, and print the
117
- result to the command line, you could use the following.
118
-
119
114
  #### Add entry to file without opening it
120
- ```sh
121
- standup --no-edit --current "Work on this thing","And another thing"
122
- ```
123
-
124
- #### Find an entry by date and print it.
125
- If you wanted to find and print the entry for March 2nd, 2020, you could use the
126
- following.
115
+ You can add an entry for today without even opening your editor. Note that, if
116
+ you have multiple entries, you must separate them with a comma and *no spaces*.
127
117
 
128
118
  ```sh
129
- standup -p 2020-03-02
119
+ standup --no-edit --current "Work on this thing","And another thing"
130
120
  ```
131
121
 
132
122
  ### Customization and Runtime Options
@@ -271,7 +261,7 @@ end
271
261
 
272
262
  ## API
273
263
  The API is fully documented in the
274
- [RDoc Documentation](https://evanthegrayt.github.io/standup_md/doc/index.html).
264
+ [RDoc Documentation](https://evanthegrayt.github.io/standup_md/).
275
265
 
276
266
  This was mainly written as a command line utility, but the API is very robust,
277
267
  and is available for use in your own projects. A quick example of how to write a
@@ -321,7 +311,7 @@ file, or something like `~/.vim/plugin/standup.vim`.
321
311
 
322
312
  ```vim
323
313
  command! -complete=custom,<SID>StandupCompletion -nargs=? -bang Standup
324
- \ call s:OpenStandupFile(<bang>0, <f-args>)
314
+ \ call <SID>OpenStandupFile(<bang>0, <f-args>)
325
315
 
326
316
  function! s:StandupCompletion(...) abort
327
317
  let l:dir = get(g:, 'standup_dir', $HOME . '/.cache/standup_md') . '/'
data/Rakefile CHANGED
@@ -14,7 +14,7 @@ end
14
14
 
15
15
  RDoc::Task.new do |rdoc|
16
16
  rdoc.main = 'README.md'
17
- rdoc.rdoc_dir = 'doc'
17
+ rdoc.rdoc_dir = 'docs'
18
18
  rdoc.rdoc_files.include('README.md', 'lib/**/*.rb')
19
19
  end
20
20
 
data/lib/standup_md.rb CHANGED
@@ -17,7 +17,7 @@ module StandupMD
17
17
  #
18
18
  # @return [StanupMD::Cli]
19
19
  def self.config
20
- @config ||= StandupMD::Config.new
20
+ @config || reset_config
21
21
  end
22
22
 
23
23
  ##
@@ -49,11 +49,14 @@ module StandupMD
49
49
  # Loads a config file.
50
50
  #
51
51
  # @param [String] file
52
+ #
53
+ # @return [String] file
52
54
  def self.load_config_file(file)
53
- file = ::File.expand_path(file)
54
- raise "File #{file} does not exist." unless ::File.file?(file)
55
+ ::File.expand_path(file).tap do |file|
56
+ raise "File #{file} does not exist." unless ::File.file?(file)
55
57
 
56
- @config_file_loaded = true
57
- load file
58
+ @config_file_loaded = true
59
+ load file
60
+ end
58
61
  end
59
62
  end
@@ -28,13 +28,13 @@ module StandupMD
28
28
  ##
29
29
  # Creates an instance of +StandupMD+ and runs what the user requested.
30
30
  def self.execute(options = [])
31
- exe = new(options)
32
-
33
- exe.write_file if config.write
34
- if config.print
35
- exe.print(exe.entry)
36
- elsif config.edit
37
- exe.edit
31
+ new(options).tap do |exe|
32
+ exe.write_file if config.write
33
+ if config.print
34
+ exe.print(exe.entry)
35
+ elsif config.edit
36
+ exe.edit
37
+ end
38
38
  end
39
39
  end
40
40
 
@@ -125,25 +125,22 @@ module StandupMD
125
125
  # @return [StandupMD::Entry]
126
126
  def new_entry(file)
127
127
  entry = file.entries.find(config.cli.date)
128
- if entry.nil? && config.cli.date == Date.today
129
- previous_entry = set_previous_entry(file)
130
- entry = StandupMD::Entry.new(
131
- config.cli.date,
132
- config.entry.current,
133
- previous_entry,
134
- config.entry.impediments,
135
- config.entry.notes
136
- )
137
- file.entries << entry
138
- end
139
- entry
128
+ return entry unless entry.nil? && config.cli.date == Date.today
129
+
130
+ StandupMD::Entry.new(
131
+ config.cli.date,
132
+ config.entry.current,
133
+ previous_entry(file),
134
+ config.entry.impediments,
135
+ config.entry.notes
136
+ ).tap { |entry| file.entries << entry }
140
137
  end
141
138
 
142
139
  ##
143
140
  # The "previous" entries.
144
141
  #
145
142
  # @return [Array]
146
- def set_previous_entry(file)
143
+ def previous_entry(file)
147
144
  return config.entry.previous_entry unless config.cli.auto_fill_previous
148
145
 
149
146
  return prev_entry(prev_file.load.entries) if file.new? && prev_file
@@ -200,9 +200,9 @@ module StandupMD
200
200
  #
201
201
  # @return [String]
202
202
  def directory=(directory)
203
- directory = ::File.expand_path(directory)
204
- FileUtils.mkdir_p(directory) unless ::File.directory?(directory)
205
- @directory = directory
203
+ @directory = ::File.expand_path(directory).tap do |directory|
204
+ FileUtils.mkdir_p(directory) unless ::File.directory?(directory)
205
+ end
206
206
  end
207
207
  end
208
208
  end
@@ -55,15 +55,13 @@ module StandupMD
55
55
  #
56
56
  # @return [StandupMD::Entry]
57
57
  def self.create
58
- entry = new(
58
+ new(
59
59
  Date.today,
60
60
  config.current,
61
61
  config.previous,
62
62
  config.impediments,
63
63
  config.notes
64
- )
65
- yield config if block_given?
66
- entry
64
+ ).tap { |entry| yield entry if block_given? }
67
65
  end
68
66
 
69
67
  ##
@@ -82,11 +80,11 @@ module StandupMD
82
80
  raise unless date.is_a?(Date)
83
81
  @config = self.class.config
84
82
 
85
- @date = date
86
- @current = current
87
- @previous = previous
88
- @impediments = impediments
89
- @notes = notes
83
+ @date = date
84
+ @current = current
85
+ @previous = previous
86
+ @impediments = impediments
87
+ @notes = notes
90
88
  end
91
89
 
92
90
  ##
@@ -26,7 +26,7 @@ module StandupMD
26
26
  def initialize(*entries)
27
27
  @config = self.class.config
28
28
  unless entries.all? { |e| e.is_a?(StandupMD::Entry) }
29
- raise ArgumentError, 'Entry must instance of StandupMD::Entry'
29
+ raise ArgumentError, 'Entry must be an instance of StandupMD::Entry'
30
30
  end
31
31
  @entries = entries
32
32
  end
@@ -39,7 +39,7 @@ module StandupMD
39
39
  # @return [Array]
40
40
  def <<(entry)
41
41
  unless entry.is_a?(StandupMD::Entry)
42
- raise ArgumentError, 'Entry must instance of StandupMD::Entry'
42
+ raise ArgumentError, 'Entry must be an instance of StandupMD::Entry'
43
43
  end
44
44
  @entries << entry
45
45
  end
@@ -1,28 +1,50 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StandupMD
4
-
5
4
  ##
6
5
  # Module that contains all gem version information. Follows semantic
7
6
  # versioning. Read: https://semver.org/
8
7
  module Version
9
-
10
8
  ##
11
9
  # Major version.
10
+ #
11
+ # @return [Integer]
12
12
  MAJOR = 0
13
13
 
14
14
  ##
15
15
  # Minor version.
16
+ #
17
+ # @return [Integer]
16
18
  MINOR = 3
17
19
 
18
20
  ##
19
21
  # Patch version.
20
- PATCH = 7
22
+ #
23
+ # @return [Integer]
24
+ PATCH = 12
25
+
26
+ ##
27
+ # Version as +[MAJOR, MINOR, PATCH]+
28
+ #
29
+ # @return [Array]
30
+ def self.to_a
31
+ [MAJOR, MINOR, PATCH]
32
+ end
21
33
 
22
34
  ##
23
35
  # Version as +MAJOR.MINOR.PATCH+
36
+ #
37
+ # @return [String]
24
38
  def self.to_s
25
- "#{MAJOR}.#{MINOR}.#{PATCH}"
39
+ to_a.join('.')
40
+ end
41
+
42
+ ##
43
+ # Version as +{major: MAJOR, minor: MINOR, patch: PATCH}+
44
+ #
45
+ # @return [Hash]
46
+ def self.to_h
47
+ Hash[%i[major minor patch].zip(to_a)]
26
48
  end
27
49
  end
28
50
  end
data/standup_md.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.metadata['source_code_uri'] =
23
23
  'https://github.com/evanthegrayt/standup_md'
24
24
  spec.metadata['documentation_uri'] =
25
- 'https://evanthegrayt.github.io/standup_md/doc/index.html'
25
+ 'https://evanthegrayt.github.io/standup_md/'
26
26
 
27
27
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
28
28
  f.match(%r{^(test|spec|features)/})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standup_md
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Gray
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-30 00:00:00.000000000 Z
11
+ date: 2021-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -80,63 +80,6 @@ files:
80
80
  - Rakefile
81
81
  - _config.yml
82
82
  - bin/standup
83
- - doc/README_md.html
84
- - doc/StandupMD.html
85
- - doc/StandupMD/Cli.html
86
- - doc/StandupMD/Cli/Helpers.html
87
- - doc/StandupMD/Config.html
88
- - doc/StandupMD/Config/Cli.html
89
- - doc/StandupMD/Config/Entry.html
90
- - doc/StandupMD/Config/EntryList.html
91
- - doc/StandupMD/Config/File.html
92
- - doc/StandupMD/Entry.html
93
- - doc/StandupMD/EntryList.html
94
- - doc/StandupMD/File.html
95
- - doc/StandupMD/Version.html
96
- - doc/created.rid
97
- - doc/css/fonts.css
98
- - doc/css/rdoc.css
99
- - doc/fonts/Lato-Light.ttf
100
- - doc/fonts/Lato-LightItalic.ttf
101
- - doc/fonts/Lato-Regular.ttf
102
- - doc/fonts/Lato-RegularItalic.ttf
103
- - doc/fonts/SourceCodePro-Bold.ttf
104
- - doc/fonts/SourceCodePro-Regular.ttf
105
- - doc/images/add.png
106
- - doc/images/arrow_up.png
107
- - doc/images/brick.png
108
- - doc/images/brick_link.png
109
- - doc/images/bug.png
110
- - doc/images/bullet_black.png
111
- - doc/images/bullet_toggle_minus.png
112
- - doc/images/bullet_toggle_plus.png
113
- - doc/images/date.png
114
- - doc/images/delete.png
115
- - doc/images/find.png
116
- - doc/images/loadingAnimation.gif
117
- - doc/images/macFFBgHack.png
118
- - doc/images/package.png
119
- - doc/images/page_green.png
120
- - doc/images/page_white_text.png
121
- - doc/images/page_white_width.png
122
- - doc/images/plugin.png
123
- - doc/images/ruby.png
124
- - doc/images/tag_blue.png
125
- - doc/images/tag_green.png
126
- - doc/images/transparent.png
127
- - doc/images/wrench.png
128
- - doc/images/wrench_orange.png
129
- - doc/images/zoom.png
130
- - doc/index.html
131
- - doc/js/darkfish.js
132
- - doc/js/navigation.js
133
- - doc/js/navigation.js.gz
134
- - doc/js/search.js
135
- - doc/js/search_index.js
136
- - doc/js/search_index.js.gz
137
- - doc/js/searcher.js
138
- - doc/js/searcher.js.gz
139
- - doc/table_of_contents.html
140
83
  - lib/standup_md.rb
141
84
  - lib/standup_md/cli.rb
142
85
  - lib/standup_md/cli/helpers.rb
@@ -158,7 +101,7 @@ metadata:
158
101
  allowed_push_host: https://rubygems.org
159
102
  homepage_uri: https://evanthegrayt.github.io/standup_md/
160
103
  source_code_uri: https://github.com/evanthegrayt/standup_md
161
- documentation_uri: https://evanthegrayt.github.io/standup_md/doc/index.html
104
+ documentation_uri: https://evanthegrayt.github.io/standup_md/
162
105
  post_install_message:
163
106
  rdoc_options: []
164
107
  require_paths:
data/doc/README_md.html DELETED
@@ -1,400 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta charset="UTF-8">
6
-
7
- <title>README - RDoc Documentation</title>
8
-
9
- <script type="text/javascript">
10
- var rdoc_rel_prefix = "./";
11
- var index_rel_prefix = "./";
12
- </script>
13
-
14
- <script src="./js/navigation.js" defer></script>
15
- <script src="./js/search.js" defer></script>
16
- <script src="./js/search_index.js" defer></script>
17
- <script src="./js/searcher.js" defer></script>
18
- <script src="./js/darkfish.js" defer></script>
19
-
20
- <link href="./css/fonts.css" rel="stylesheet">
21
- <link href="./css/rdoc.css" rel="stylesheet">
22
-
23
-
24
- <body id="top" role="document" class="file">
25
- <nav role="navigation">
26
- <div id="project-navigation">
27
- <div id="home-section" role="region" title="Quick navigation" class="nav-section">
28
- <h2>
29
- <a href="./index.html" rel="home">Home</a>
30
- </h2>
31
-
32
- <div id="table-of-contents-navigation">
33
- <a href="./table_of_contents.html#pages">Pages</a>
34
- <a href="./table_of_contents.html#classes">Classes</a>
35
- <a href="./table_of_contents.html#methods">Methods</a>
36
- </div>
37
- </div>
38
-
39
- <div id="search-section" role="search" class="project-section initially-hidden">
40
- <form action="#" method="get" accept-charset="utf-8">
41
- <div id="search-field-wrapper">
42
- <input id="search-field" role="combobox" aria-label="Search"
43
- aria-autocomplete="list" aria-controls="search-results"
44
- type="text" name="search" placeholder="Search" spellcheck="false"
45
- title="Type to search, Up and Down to navigate, Enter to load">
46
- </div>
47
-
48
- <ul id="search-results" aria-label="Search Results"
49
- aria-busy="false" aria-expanded="false"
50
- aria-atomic="false" class="initially-hidden"></ul>
51
- </form>
52
- </div>
53
-
54
- </div>
55
-
56
-
57
- <div class="nav-section">
58
- <h3>Table of Contents</h3>
59
-
60
- <ul class="link-list" role="directory">
61
- <li><a href="#label-The+Standup+Doctor">The Standup Doctor</a>
62
- <li><a href="#label-About">About</a>
63
- <li><a href="#label-Installation">Installation</a>
64
- <li><a href="#label-Via+RubyGems">Via RubyGems</a>
65
- <li><a href="#label-Manual+Installation">Manual Installation</a>
66
- <li><a href="#label-Usage">Usage</a>
67
- <li><a href="#label-Command+Line">Command Line</a>
68
- <li><a href="#label-CLI+Examples">CLI Examples</a>
69
- <li><a href="#label-Adding+an+entry+for+today+via+editor">Adding an entry for today via editor</a>
70
- <li><a href="#label-Copy+the+entry+for+today+to+clipboard">Copy the entry for today to clipboard</a>
71
- <li><a href="#label-Add+entry+to+file+without+opening+it">Add entry to file without opening it</a>
72
- <li><a href="#label-Find+an+entry+by+date+and+print+it.">Find an entry by date and print it.</a>
73
- <li><a href="#label-Customization+and+Runtime+Options">Customization and Runtime Options</a>
74
- <li><a href="#label-Available+Config+File+Options+and+Defaults">Available Config File Options and Defaults</a>
75
- <li><a href="#label-Executable+Flags">Executable Flags</a>
76
- <li><a href="#label-Using+Existing+Standup+Files">Using Existing Standup Files</a>
77
- <li><a href="#label-API">API</a>
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
- <li><a href="#label-Reporting+Bugs+and+Requesting+Features">Reporting Bugs and Requesting Features</a>
83
- <li><a href="#label-Self-Promotion">Self-Promotion</a>
84
- </ul>
85
- </div>
86
-
87
-
88
- <div id="project-metadata">
89
-
90
- <div id="fileindex-section" class="nav-section">
91
- <h3>Pages</h3>
92
-
93
- <ul class="link-list">
94
- <li><a href="./README_md.html">README</a>
95
- </ul>
96
- </div>
97
-
98
- </div>
99
- </nav>
100
-
101
- <main role="main" aria-label="Page README.md">
102
-
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>
104
- <!-- vi: set ts=4 sw=4 : -->
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>
106
-
107
- <blockquote>
108
- <p>The cure for all your standup woes.</p>
109
- </blockquote>
110
-
111
- <p>A highly customizable and automated way to keep track of daily standups in markdown files.</p>
112
-
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>
114
-
115
- <h2 id="label-About">About<span><a href="#label-About">&para;</a> <a href="#top">&uarr;</a></span></h2>
116
-
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>
118
-
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>
120
-
121
- <h2 id="label-Installation">Installation<span><a href="#label-Installation">&para;</a> <a href="#top">&uarr;</a></span></h2>
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
-
125
- <h3 id="label-Via+RubyGems">Via RubyGems<span><a href="#label-Via+RubyGems">&para;</a> <a href="#top">&uarr;</a></span></h3>
126
-
127
- <p>Just install the gem!</p>
128
-
129
- <pre class="ruby"><span class="ruby-identifier">gem</span> <span class="ruby-identifier">install</span> <span class="ruby-identifier">standup_md</span>
130
- </pre>
131
-
132
- <p>To include in your project, add the following to your <code>Gemfile</code>.</p>
133
-
134
- <pre class="ruby"><span class="ruby-identifier">gem</span> <span class="ruby-string">&#39;standup_md&#39;</span>
135
- </pre>
136
-
137
- <h3 id="label-Manual+Installation">Manual Installation<span><a href="#label-Manual+Installation">&para;</a> <a href="#top">&uarr;</a></span></h3>
138
-
139
- <p>From your terminal, clone the repository where you want it, and use <code>rake</code> to install the gem.</p>
140
-
141
- <pre>git clone https://github.com/evanthegrayt/standup_md.git
142
- cd standup_md
143
-
144
- # Use rake to build and install the gem.
145
- rake install</pre>
146
-
147
- <h2 id="label-Usage">Usage<span><a href="#label-Usage">&para;</a> <a href="#top">&uarr;</a></span></h2>
148
-
149
- <h3 id="label-Command+Line">Command Line<span><a href="#label-Command+Line">&para;</a> <a href="#top">&uarr;</a></span></h3>
150
-
151
- <p>For the most basic usage, simply call the executable.</p>
152
-
153
- <pre class="ruby"><span class="ruby-identifier">standup</span>
154
- </pre>
155
-
156
- <p>This opens the current month&#39;s standup file. If an entry already exists for today, nothing is added. If no entry exists for today, the previous “Current” is placed in the “Previous” section of a new entry. The format of this file is very important; you may add new entries, but don&#39;t change any of the headers. Doing so will cause the parser to break. If you want to customize the headers, you can do so in the <a href="#available-config-file-options-and-defaults">configuration file</a>.</p>
157
-
158
- <h3 id="label-CLI+Examples">CLI Examples<span><a href="#label-CLI+Examples">&para;</a> <a href="#top">&uarr;</a></span></h3>
159
-
160
- <h4 id="label-Adding+an+entry+for+today+via+editor">Adding an entry for today via editor<span><a href="#label-Adding+an+entry+for+today+via+editor">&para;</a> <a href="#top">&uarr;</a></span></h4>
161
-
162
- <p>For example, if the standup entry from yesterday reads as follows:</p>
163
-
164
- <pre># 2020-04-13
165
- ## Previous
166
- - Did something else.
167
- ## Current
168
- - Write new feature for `standup_md`
169
- - Fix bug in `standup_md`
170
- ## Impediments
171
- - None</pre>
172
-
173
- <p>The following scaffolding will be added for current entry at the top of the file:</p>
174
-
175
- <pre># 2020-04-14
176
- ## Previous
177
- - Write new feature for `standup_md`
178
- - Fix bug in `standup_md`
179
- ## Current
180
- - &lt;!-- ADD TODAY&#39;S WORK HERE --&gt;
181
- ## Impediments
182
- - None</pre>
183
-
184
- <h4 id="label-Copy+the+entry+for+today+to+clipboard">Copy the entry for today to clipboard<span><a href="#label-Copy+the+entry+for+today+to+clipboard">&para;</a> <a href="#top">&uarr;</a></span></h4>
185
-
186
- <p>There are also flags that will print entries to the command line. There&#39;s a full list of features below, but as a quick example, you can copy today&#39;s entry to your clipboard without even opening your editor.</p>
187
-
188
- <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>
189
- </pre>
190
-
191
- <p>If you wanted to add today&#39;s entry without opening your editor, and print the result to the command line, you could use the following.</p>
192
-
193
- <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">&para;</a> <a href="#top">&uarr;</a></span></h4>
194
-
195
- <pre>standup --no-edit --current &quot;Work on this thing&quot;,&quot;And another thing&quot;</pre>
196
-
197
- <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.">&para;</a> <a href="#top">&uarr;</a></span></h4>
198
-
199
- <p>If you wanted to find and print the entry for March 2nd, 2020, you could use the following.</p>
200
-
201
- <pre>standup -p 2020-03-02</pre>
202
-
203
- <h3 id="label-Customization+and+Runtime+Options">Customization and Runtime Options<span><a href="#label-Customization+and+Runtime+Options">&para;</a> <a href="#top">&uarr;</a></span></h3>
204
-
205
- <p>You can create a file in your home directory called <code>~/.standuprc</code>. Settings located in this file will override default behavior. This file can also have settings overwritten at runtime by the use of options. You can view <a href="https://github.com/evanthegrayt/dotfiles/blob/master/dotfiles/standuprc">my config file</a> as an example. Any setting in this file can still be overridden at runtime by passing flags to the executable.</p>
206
-
207
- <p>You&#39;ll notice, a lot of settings don&#39;t have the ability to be changed at runtime when calling the executable. This is because the file structure is very important, and changing values that affect formatting will cause problems with the file parser. If you don&#39;t want to use a default, make the change in your config file before you start editing standups. There is an <a href="https://github.com/evanthegrayt/standup_md/issues/16">open issue</a> for handling this for the user, but they&#39;re not available yet.</p>
208
-
209
- <p>There are no options to change the headers at runtime because it uses the headers to detect tasks from previous entries. If changed at runtime, this would cause errors. For this reason, if you don&#39;t like the default headers, change them in your configuration file after installation, and then try to not change them again.</p>
210
-
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>
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
-
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>
216
- <span class="ruby-comment"># Defaults for how the file is formatted.</span>
217
- <span class="ruby-comment"># See https://evanthegrayt.github.io/standup_md/doc/StandupMD/Config/Cli.html</span>
218
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">header_date_format</span> = <span class="ruby-string">&#39;%Y-%m-%d&#39;</span>
219
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">header_depth</span> = <span class="ruby-value">1</span>
220
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">sub_header_depth</span> = <span class="ruby-value">2</span>
221
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">current_header</span> = <span class="ruby-string">&#39;Current&#39;</span>
222
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">previous_header</span> = <span class="ruby-string">&#39;Previous&#39;</span>
223
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">impediments_header</span> = <span class="ruby-string">&#39;Impediments&#39;</span>
224
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">notes_header</span> = <span class="ruby-string">&#39;Notes&#39;</span>
225
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">sub_header_order</span> = <span class="ruby-node">%w[previous current impediments notes]</span>
226
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">directory</span> = <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-string">&#39;HOME&#39;</span>], <span class="ruby-string">&#39;.cache&#39;</span>, <span class="ruby-string">&#39;standup_md&#39;</span>)
227
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">bullet_character</span> = <span class="ruby-string">&#39;-&#39;</span>
228
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">name_format</span> = <span class="ruby-string">&#39;%Y_%m.md&#39;</span>
229
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">create</span> = <span class="ruby-keyword">true</span>
230
-
231
- <span class="ruby-comment"># Defaults for entries</span>
232
- <span class="ruby-comment"># See https://evanthegrayt.github.io/standup_md/doc/StandupMD/Config/Entry.html</span>
233
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">entry</span>.<span class="ruby-identifier">current</span> = [<span class="ruby-string">&quot;&lt;!-- ADD TODAY&#39;S WORK HERE --&gt;&quot;</span>]
234
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">entry</span>.<span class="ruby-identifier">previous</span> = []
235
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">entry</span>.<span class="ruby-identifier">impediments</span> = [<span class="ruby-string">&#39;None&#39;</span>]
236
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">entry</span>.<span class="ruby-identifier">notes</span> = []
237
-
238
- <span class="ruby-comment"># Defaults for executable runtime behavior.</span>
239
- <span class="ruby-comment"># See https://evanthegrayt.github.io/standup_md/doc/StandupMD/Config/Cli.html</span>
240
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">cli</span>.<span class="ruby-identifier">date</span> = <span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>
241
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">cli</span>.<span class="ruby-identifier">editor</span> = <span class="ruby-string">&#39;vim&#39;</span> <span class="ruby-comment"># Checks $VISUAL and $EDITOR first, in that order</span>
242
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">cli</span>.<span class="ruby-identifier">verbose</span> = <span class="ruby-keyword">false</span>
243
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">cli</span>.<span class="ruby-identifier">edit</span> = <span class="ruby-keyword">true</span>
244
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">cli</span>.<span class="ruby-identifier">write</span> = <span class="ruby-keyword">true</span>
245
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">cli</span>.<span class="ruby-identifier">print</span> = <span class="ruby-keyword">false</span>
246
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">cli</span>.<span class="ruby-identifier">auto_fill_previous</span> = <span class="ruby-keyword">true</span>
247
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">cli</span>.<span class="ruby-identifier">preference_file</span> = <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-string">&#39;HOME&#39;</span>], <span class="ruby-string">&#39;.standuprc&#39;</span>))
248
- <span class="ruby-keyword">end</span>
249
- </pre>
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
-
253
- <h4 id="label-Executable+Flags">Executable Flags<span><a href="#label-Executable+Flags">&para;</a> <a href="#top">&uarr;</a></span></h4>
254
-
255
- <p>Some of these options can be changed at runtime. They are as follows.</p>
256
-
257
- <pre>--current ARRAY List of current entry&#39;s tasks
258
- --previous ARRAY List of precious entry&#39;s tasks
259
- --impediments ARRAY List of impediments for current entry
260
- --notes ARRAY List of notes for current entry
261
- --sub-header-order ARRAY The order of the sub-headers when writing the file
262
- -f, --file-name-format STRING Date-formattable string to use for standup file name
263
- -E, --editor EDITOR Editor to use for opening standup files
264
- -d, --directory DIRECTORY The directories where standup files are located
265
- -w --[no-]write Write current entry if it doesn&#39;t exist. Default is true
266
- -a --[no-]auto-fill-previous Auto-generate &#39;previous&#39; tasks for new entries
267
- -e --[no-]edit Open the file in the editor. Default is true
268
- -v, --[no-]verbose Verbose output. Default is false.
269
- -p, --print [DATE] Print current entry.
270
- If DATE is passed, will print entry for DATE, if it exists.
271
- DATE must be in the same format as file-name-format</pre>
272
-
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>
274
-
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>
276
-
277
- <pre># 2020-05-01
278
- ## Previous
279
- - task
280
- ## Current
281
- - task
282
- ## Impediments
283
- - impediment
284
- ## Notes
285
- - notes, if any are present</pre>
286
-
287
- <p>The order, words, date format, and header level are all customizable, but the overall format must be the same. If customization is necessary, this must be done in <code>~/.standuprc</code> before execution, or else the parser will error.</p>
288
-
289
- <p>For example, if you wanted the format to be as follows:</p>
290
-
291
- <pre>## 05/01/2020
292
- ### Today
293
- * task
294
- ### Yesterday
295
- * task
296
- ### Hold-ups
297
- * impediment
298
- ### Notes
299
- * notes, if any are present</pre>
300
-
301
- <p>Your <code>~/.standuprc</code> should contain:</p>
302
-
303
- <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>
304
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">header_depth</span> = <span class="ruby-value">2</span>
305
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">sub_header_depth</span> = <span class="ruby-value">3</span>
306
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">current_header</span> = <span class="ruby-string">&#39;Today&#39;</span>
307
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">previous_header</span> = <span class="ruby-string">&#39;Yesterday&#39;</span>
308
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">impediments_header</span> = <span class="ruby-string">&#39;Hold-ups&#39;</span>
309
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">bullet_character</span> = <span class="ruby-string">&#39;*&#39;</span>
310
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">header_date_format</span> = <span class="ruby-string">&#39;%m/%d/%Y&#39;</span>
311
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">sub_header_order</span> = <span class="ruby-node">%w[current previous impediments notes]</span>
312
- <span class="ruby-keyword">end</span>
313
- </pre>
314
-
315
- <h2 id="label-API">API<span><a href="#label-API">&para;</a> <a href="#top">&uarr;</a></span></h2>
316
-
317
- <p>The API is fully documented in the <a href="https://evanthegrayt.github.io/standup_md/doc/index.html">RDoc Documentation</a>.</p>
318
-
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>
320
-
321
- <h3 id="label-API+Examples">API Examples<span><a href="#label-API+Examples">&para;</a> <a href="#top">&uarr;</a></span></h3>
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
-
325
- <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;standup_md&#39;</span>
326
-
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>
328
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">current_header</span> = <span class="ruby-string">&#39;Today&#39;</span>,
329
- <span class="ruby-keyword">end</span>
330
-
331
- <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-constant">Date</span>.<span class="ruby-identifier">today</span>)
332
- <span class="ruby-identifier">entry</span> = <span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">Entry</span>.<span class="ruby-identifier">create</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">current</span> = [<span class="ruby-string">&#39;Stuff I will do today&#39;</span>] }
333
- <span class="ruby-identifier">file</span>.<span class="ruby-identifier">entries</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">entry</span>
334
- <span class="ruby-identifier">file</span>.<span class="ruby-identifier">write</span>
335
- </pre>
336
-
337
- <p>The above example was written as such to show how the different pieces of the API fit together. The code can actually be simplified to the following.</p>
338
-
339
- <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;standup_md&#39;</span>
340
-
341
- <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>
342
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">current_header</span> = <span class="ruby-string">&#39;Today&#39;</span>,
343
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">entry</span>.<span class="ruby-identifier">current</span> = [<span class="ruby-string">&#39;Stuff I will do today&#39;</span>]
344
- <span class="ruby-keyword">end</span>
345
-
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>
347
- </pre>
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
- <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
-
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>
386
-
387
- <h2 id="label-Self-Promotion">Self-Promotion<span><a href="#label-Self-Promotion">&para;</a> <a href="#top">&uarr;</a></span></h2>
388
-
389
- <p>I do these projects for fun, and I enjoy knowing that they&#39;re helpful to people. Consider starring <a href="https://github.com/evanthegrayt/standup_md">the repository</a> if you like it! If you love it, follow me <a href="https://github.com/evanthegrayt">on Github</a>!</p>
390
-
391
- </main>
392
-
393
-
394
-
395
- <footer id="validator-badges" role="contentinfo">
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.3.0.
398
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
399
- </footer>
400
-