standup_md 0.3.10 → 0.3.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +2 -4
  5. data/Rakefile +1 -1
  6. data/lib/standup_md/cli/helpers.rb +3 -8
  7. data/lib/standup_md/config/cli.rb +3 -2
  8. data/lib/standup_md/config/entry_list.rb +0 -2
  9. data/lib/standup_md/config/file.rb +11 -15
  10. data/lib/standup_md/entry.rb +1 -1
  11. data/lib/standup_md/entry_list.rb +12 -6
  12. data/lib/standup_md/file/helpers.rb +7 -2
  13. data/lib/standup_md/version.rb +3 -1
  14. data/standup_md.gemspec +2 -2
  15. metadata +3 -60
  16. data/doc/README_md.html +0 -393
  17. data/doc/StandupMD/Cli/Helpers.html +0 -146
  18. data/doc/StandupMD/Cli.html +0 -406
  19. data/doc/StandupMD/Config/Cli.html +0 -296
  20. data/doc/StandupMD/Config/Entry.html +0 -240
  21. data/doc/StandupMD/Config/EntryList.html +0 -171
  22. data/doc/StandupMD/Config/File.html +0 -481
  23. data/doc/StandupMD/Config.html +0 -193
  24. data/doc/StandupMD/Entry.html +0 -367
  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/StandupMD.html +0 -238
  29. data/doc/created.rid +0 -15
  30. data/doc/css/fonts.css +0 -167
  31. data/doc/css/rdoc.css +0 -619
  32. data/doc/fonts/Lato-Light.ttf +0 -0
  33. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  34. data/doc/fonts/Lato-Regular.ttf +0 -0
  35. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  36. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  37. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  38. data/doc/images/add.png +0 -0
  39. data/doc/images/arrow_up.png +0 -0
  40. data/doc/images/brick.png +0 -0
  41. data/doc/images/brick_link.png +0 -0
  42. data/doc/images/bug.png +0 -0
  43. data/doc/images/bullet_black.png +0 -0
  44. data/doc/images/bullet_toggle_minus.png +0 -0
  45. data/doc/images/bullet_toggle_plus.png +0 -0
  46. data/doc/images/date.png +0 -0
  47. data/doc/images/delete.png +0 -0
  48. data/doc/images/find.png +0 -0
  49. data/doc/images/loadingAnimation.gif +0 -0
  50. data/doc/images/macFFBgHack.png +0 -0
  51. data/doc/images/package.png +0 -0
  52. data/doc/images/page_green.png +0 -0
  53. data/doc/images/page_white_text.png +0 -0
  54. data/doc/images/page_white_width.png +0 -0
  55. data/doc/images/plugin.png +0 -0
  56. data/doc/images/ruby.png +0 -0
  57. data/doc/images/tag_blue.png +0 -0
  58. data/doc/images/tag_green.png +0 -0
  59. data/doc/images/transparent.png +0 -0
  60. data/doc/images/wrench.png +0 -0
  61. data/doc/images/wrench_orange.png +0 -0
  62. data/doc/images/zoom.png +0 -0
  63. data/doc/index.html +0 -382
  64. data/doc/js/darkfish.js +0 -84
  65. data/doc/js/navigation.js +0 -105
  66. data/doc/js/navigation.js.gz +0 -0
  67. data/doc/js/search.js +0 -110
  68. data/doc/js/search_index.js +0 -1
  69. data/doc/js/search_index.js.gz +0 -0
  70. data/doc/js/searcher.js +0 -229
  71. data/doc/js/searcher.js.gz +0 -0
  72. data/doc/table_of_contents.html +0 -401
data/doc/README_md.html DELETED
@@ -1,393 +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-Customization+and+Runtime+Options">Customization and Runtime Options</a>
73
- <li><a href="#label-Available+Config+File+Options+and+Defaults">Available Config File Options and Defaults</a>
74
- <li><a href="#label-Executable+Flags">Executable Flags</a>
75
- <li><a href="#label-Using+Existing+Standup+Files">Using Existing Standup Files</a>
76
- <li><a href="#label-API">API</a>
77
- <li><a href="#label-API+Examples">API Examples</a>
78
- <li><a href="#label-Adding+an+entry+for+today">Adding an entry for today</a>
79
- <li><a href="#label-Finding+a+past+entry">Finding a past entry</a>
80
- <li><a href="#label-Vim">Vim</a>
81
- <li><a href="#label-Reporting+Bugs+and+Requesting+Features">Reporting Bugs and Requesting Features</a>
82
- <li><a href="#label-Self-Promotion">Self-Promotion</a>
83
- </ul>
84
- </div>
85
-
86
-
87
- <div id="project-metadata">
88
-
89
- <div id="fileindex-section" class="nav-section">
90
- <h3>Pages</h3>
91
-
92
- <ul class="link-list">
93
- <li><a href="./README_md.html">README</a>
94
- </ul>
95
- </div>
96
-
97
- </div>
98
- </nav>
99
-
100
- <main role="main" aria-label="Page README.md">
101
-
102
- <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>
103
- <!-- vi: set ts=4 sw=4 : -->
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>
105
-
106
- <blockquote>
107
- <p>The cure for all your standup woes.</p>
108
- </blockquote>
109
-
110
- <p>A highly customizable and automated way to keep track of daily standups in markdown files.</p>
111
-
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>
113
-
114
- <h2 id="label-About">About<span><a href="#label-About">&para;</a> <a href="#top">&uarr;</a></span></h2>
115
-
116
- <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>
117
-
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&#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>
119
-
120
- <h2 id="label-Installation">Installation<span><a href="#label-Installation">&para;</a> <a href="#top">&uarr;</a></span></h2>
121
-
122
- <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>
123
-
124
- <h3 id="label-Via+RubyGems">Via RubyGems<span><a href="#label-Via+RubyGems">&para;</a> <a href="#top">&uarr;</a></span></h3>
125
-
126
- <p>Just install the gem!</p>
127
-
128
- <pre class="ruby"><span class="ruby-identifier">gem</span> <span class="ruby-identifier">install</span> <span class="ruby-identifier">standup_md</span>
129
- </pre>
130
-
131
- <p>To include in your project, add the following to your <code>Gemfile</code>.</p>
132
-
133
- <pre class="ruby"><span class="ruby-identifier">gem</span> <span class="ruby-string">&#39;standup_md&#39;</span>
134
- </pre>
135
-
136
- <h3 id="label-Manual+Installation">Manual Installation<span><a href="#label-Manual+Installation">&para;</a> <a href="#top">&uarr;</a></span></h3>
137
-
138
- <p>From your terminal, clone the repository where you want it, and use <code>rake</code> to install the gem.</p>
139
-
140
- <pre>git clone https://github.com/evanthegrayt/standup_md.git
141
- cd standup_md
142
-
143
- # Use rake to build and install the gem.
144
- rake install</pre>
145
-
146
- <h2 id="label-Usage">Usage<span><a href="#label-Usage">&para;</a> <a href="#top">&uarr;</a></span></h2>
147
-
148
- <h3 id="label-Command+Line">Command Line<span><a href="#label-Command+Line">&para;</a> <a href="#top">&uarr;</a></span></h3>
149
-
150
- <p>For the most basic usage, simply call the executable.</p>
151
-
152
- <pre class="ruby"><span class="ruby-identifier">standup</span>
153
- </pre>
154
-
155
- <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>
156
-
157
- <h3 id="label-CLI+Examples">CLI Examples<span><a href="#label-CLI+Examples">&para;</a> <a href="#top">&uarr;</a></span></h3>
158
-
159
- <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>
160
-
161
- <p>For example, if the standup entry from yesterday reads as follows:</p>
162
-
163
- <pre># 2020-04-13
164
- ## Previous
165
- - Did something else.
166
- ## Current
167
- - Write new feature for `standup_md`
168
- - Fix bug in `standup_md`
169
- ## Impediments
170
- - None</pre>
171
-
172
- <p>The following scaffolding will be added for current entry at the top of the file:</p>
173
-
174
- <pre># 2020-04-14
175
- ## Previous
176
- - Write new feature for `standup_md`
177
- - Fix bug in `standup_md`
178
- ## Current
179
- - &lt;!-- ADD TODAY&#39;S WORK HERE --&gt;
180
- ## Impediments
181
- - None</pre>
182
-
183
- <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>
184
-
185
- <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>
186
-
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>
188
- </pre>
189
-
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">&para;</a> <a href="#top">&uarr;</a></span></h4>
191
-
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>
193
-
194
- <pre>standup --no-edit --current &quot;Work on this thing&quot;,&quot;And another thing&quot;</pre>
195
-
196
- <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>
197
-
198
- <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>
199
-
200
- <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>
201
-
202
- <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>
203
-
204
- <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>
205
-
206
- <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>
207
-
208
- <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>
209
- <span class="ruby-comment"># Defaults for how the file is formatted.</span>
210
- <span class="ruby-comment"># See https://evanthegrayt.github.io/standup_md/doc/StandupMD/Config/Cli.html</span>
211
- <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>
212
- <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>
213
- <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>
214
- <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>
215
- <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>
216
- <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>
217
- <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>
218
- <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>
219
- <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>)
220
- <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>
221
- <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>
222
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">create</span> = <span class="ruby-keyword">true</span>
223
-
224
- <span class="ruby-comment"># Defaults for entries</span>
225
- <span class="ruby-comment"># See https://evanthegrayt.github.io/standup_md/doc/StandupMD/Config/Entry.html</span>
226
- <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>]
227
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">entry</span>.<span class="ruby-identifier">previous</span> = []
228
- <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>]
229
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">entry</span>.<span class="ruby-identifier">notes</span> = []
230
-
231
- <span class="ruby-comment"># Defaults for executable runtime behavior.</span>
232
- <span class="ruby-comment"># See https://evanthegrayt.github.io/standup_md/doc/StandupMD/Config/Cli.html</span>
233
- <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>
234
- <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>
235
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">cli</span>.<span class="ruby-identifier">verbose</span> = <span class="ruby-keyword">false</span>
236
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">cli</span>.<span class="ruby-identifier">edit</span> = <span class="ruby-keyword">true</span>
237
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">cli</span>.<span class="ruby-identifier">write</span> = <span class="ruby-keyword">true</span>
238
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">cli</span>.<span class="ruby-identifier">print</span> = <span class="ruby-keyword">false</span>
239
- <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>
240
- <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>))
241
- <span class="ruby-keyword">end</span>
242
- </pre>
243
-
244
- <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>
245
-
246
- <h4 id="label-Executable+Flags">Executable Flags<span><a href="#label-Executable+Flags">&para;</a> <a href="#top">&uarr;</a></span></h4>
247
-
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&#39;s tasks
251
- --previous ARRAY List of precious entry&#39;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&#39;t exist. Default is true
259
- -a --[no-]auto-fill-previous Auto-generate &#39;previous&#39; 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>
265
-
266
- <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>
267
-
268
- <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>
269
-
270
- <pre># 2020-05-01
271
- ## Previous
272
- - task
273
- ## Current
274
- - task
275
- ## Impediments
276
- - impediment
277
- ## Notes
278
- - notes, if any are present</pre>
279
-
280
- <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>
281
-
282
- <p>For example, if you wanted the format to be as follows:</p>
283
-
284
- <pre>## 05/01/2020
285
- ### Today
286
- * task
287
- ### Yesterday
288
- * task
289
- ### Hold-ups
290
- * impediment
291
- ### Notes
292
- * notes, if any are present</pre>
293
-
294
- <p>Your <code>~/.standuprc</code> should contain:</p>
295
-
296
- <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>
297
- <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>
298
- <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>
299
- <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>
300
- <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>
301
- <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>
302
- <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>
303
- <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>
304
- <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>
305
- <span class="ruby-keyword">end</span>
306
- </pre>
307
-
308
- <h2 id="label-API">API<span><a href="#label-API">&para;</a> <a href="#top">&uarr;</a></span></h2>
309
-
310
- <p>The API is fully documented in the <a href="https://evanthegrayt.github.io/standup_md/doc/index.html">RDoc Documentation</a>.</p>
311
-
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>
313
-
314
- <h3 id="label-API+Examples">API Examples<span><a href="#label-API+Examples">&para;</a> <a href="#top">&uarr;</a></span></h3>
315
-
316
- <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>
317
-
318
- <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;standup_md&#39;</span>
319
-
320
- <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>
321
- <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>,
322
- <span class="ruby-keyword">end</span>
323
-
324
- <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>)
325
- <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>] }
326
- <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>
327
- <span class="ruby-identifier">file</span>.<span class="ruby-identifier">write</span>
328
- </pre>
329
-
330
- <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>
331
-
332
- <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;standup_md&#39;</span>
333
-
334
- <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>
335
- <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>,
336
- <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>]
337
- <span class="ruby-keyword">end</span>
338
-
339
- <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>
340
- </pre>
341
-
342
- <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>
343
-
344
- <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;standup_md&#39;</span>
345
-
346
- <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>)
347
- <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>
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>)
349
- </pre>
350
-
351
- <h2 id="label-Vim">Vim<span><a href="#label-Vim">&para;</a> <a href="#top">&uarr;</a></span></h2>
352
-
353
- <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>
354
-
355
- <pre>command! -complete=custom,&lt;SID&gt;StandupCompletion -nargs=? -bang Standup
356
- \ call &lt;SID&gt;OpenStandupFile(&lt;bang&gt;0, &lt;f-args&gt;)
357
-
358
- function! s:StandupCompletion(...) abort
359
- let l:dir = get(g:, &#39;standup_dir&#39;, $HOME . &#39;/.cache/standup_md&#39;) . &#39;/&#39;
360
- if !isdirectory(l:dir) | return &#39;&#39; | endif
361
- return join(map(glob(l:dir . &#39;*.md&#39;, 0, 1), &quot;fnamemodify(v:val, &#39;:t&#39;)&quot;), &quot;\n&quot;)
362
- endfunction
363
-
364
- function! s:OpenStandupFile(split, ...)
365
- let l:dir = get(g:, &#39;standup_dir&#39;, $HOME . &#39;/.cache/standup_md&#39;) . &#39;/&#39;
366
- let l:file = a:0 ? a:1 : get(g:, &#39;standup_file&#39;, strftime(&#39;%Y_%m.md&#39;))
367
- call system(&#39;standup --no-edit&#39;)
368
- execute a:split ? &#39;vsplit&#39; : &#39;split&#39; 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&#39;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 . &#39;/.cache/standup_md&#39; &quot; the directory where your file are
374
- g:standup_file = strftime(&#39;%Y_%m.md&#39;) &quot; the file format to use</pre>
375
-
376
- <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>
377
-
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&#39;t already exist. Better yet, you can always submit a Pull Request.</p>
379
-
380
- <h2 id="label-Self-Promotion">Self-Promotion<span><a href="#label-Self-Promotion">&para;</a> <a href="#top">&uarr;</a></span></h2>
381
-
382
- <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>
383
-
384
- </main>
385
-
386
-
387
-
388
- <footer id="validator-badges" role="contentinfo">
389
- <p><a href="https://validator.w3.org/check/referer">Validate</a>
390
- <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
391
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
392
- </footer>
393
-
@@ -1,146 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta charset="UTF-8">
6
-
7
- <title>module StandupMD::Cli::Helpers - 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="module">
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
-
58
- <div id="class-metadata">
59
-
60
-
61
-
62
-
63
-
64
- <!-- Method Quickref -->
65
- <div id="method-list-section" class="nav-section">
66
- <h3>Methods</h3>
67
-
68
- <ul class="link-list" role="directory">
69
- <li ><a href="#method-i-print">#print</a>
70
- </ul>
71
- </div>
72
-
73
- </div>
74
- </nav>
75
-
76
- <main role="main" aria-labelledby="module-StandupMD::Cli::Helpers">
77
- <h1 id="module-StandupMD::Cli::Helpers" class="module">
78
- module StandupMD::Cli::Helpers
79
- </h1>
80
-
81
- <section class="description">
82
-
83
- <p>Module responsible for reading and writing standup files.</p>
84
-
85
- </section>
86
-
87
- <section id="5Buntitled-5D" class="documentation-section">
88
-
89
-
90
-
91
-
92
-
93
- <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
94
- <header>
95
- <h3>Public Instance Methods</h3>
96
- </header>
97
-
98
- <div id="method-i-print" class="method-detail ">
99
- <div class="method-heading">
100
- <span class="method-name">print</span><span
101
- class="method-args">(entry)</span>
102
- <span class="method-click-advice">click to toggle source</span>
103
- </div>
104
-
105
- <div class="method-description">
106
- <p>Print an entry to the command line.</p>
107
-
108
- <p>@param [StandupMD::Entry] entry</p>
109
-
110
- <p>@return [nil]</p>
111
-
112
- <div class="method-source-code" id="print-source">
113
- <pre><span class="ruby-comment"># File lib/standup_md/cli/helpers.rb, line 14</span>
114
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">print</span>(<span class="ruby-identifier">entry</span>)
115
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">nil?</span>
116
- <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;No record found for #{config.cli.date}&quot;</span>
117
- <span class="ruby-keyword">return</span>
118
- <span class="ruby-keyword">end</span>
119
- <span class="ruby-identifier">puts</span> <span class="ruby-identifier">header</span>(<span class="ruby-identifier">entry</span>)
120
- <span class="ruby-identifier">config</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">sub_header_order</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">header_type</span><span class="ruby-operator">|</span>
121
- <span class="ruby-identifier">tasks</span> = <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">public_send</span>(<span class="ruby-identifier">header_type</span>)
122
- <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">tasks</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">empty?</span>
123
-
124
- <span class="ruby-identifier">puts</span> <span class="ruby-identifier">sub_header</span>(<span class="ruby-identifier">header_type</span>)
125
- <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span> <span class="ruby-identifier">puts</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">bullet_character</span> <span class="ruby-operator">+</span> <span class="ruby-string">&#39; &#39;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">task</span> }
126
- <span class="ruby-keyword">end</span>
127
- <span class="ruby-identifier">puts</span>
128
- <span class="ruby-keyword">end</span></pre>
129
- </div>
130
- </div>
131
-
132
-
133
- </div>
134
-
135
- </section>
136
-
137
- </section>
138
- </main>
139
-
140
-
141
- <footer id="validator-badges" role="contentinfo">
142
- <p><a href="https://validator.w3.org/check/referer">Validate</a>
143
- <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
144
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
145
- </footer>
146
-