standup_md 0.3.11 → 0.3.12

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