standup_md 0.0.10

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 +7 -0
  2. data/.github/workflows/ruby.yml +24 -0
  3. data/.gitignore +1 -0
  4. data/Gemfile +10 -0
  5. data/Gemfile.lock +23 -0
  6. data/LICENSE +21 -0
  7. data/README.md +252 -0
  8. data/Rakefile +36 -0
  9. data/_config.yml +1 -0
  10. data/bin/standup +5 -0
  11. data/doc/README_md.html +290 -0
  12. data/doc/StandupMD/Cli.html +898 -0
  13. data/doc/StandupMD.html +1453 -0
  14. data/doc/TestHelper.html +282 -0
  15. data/doc/TestStandupMD.html +1938 -0
  16. data/doc/created.rid +8 -0
  17. data/doc/css/fonts.css +167 -0
  18. data/doc/css/rdoc.css +611 -0
  19. data/doc/fonts/Lato-Light.ttf +0 -0
  20. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  21. data/doc/fonts/Lato-Regular.ttf +0 -0
  22. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  23. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  24. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  25. data/doc/images/add.png +0 -0
  26. data/doc/images/arrow_up.png +0 -0
  27. data/doc/images/brick.png +0 -0
  28. data/doc/images/brick_link.png +0 -0
  29. data/doc/images/bug.png +0 -0
  30. data/doc/images/bullet_black.png +0 -0
  31. data/doc/images/bullet_toggle_minus.png +0 -0
  32. data/doc/images/bullet_toggle_plus.png +0 -0
  33. data/doc/images/date.png +0 -0
  34. data/doc/images/delete.png +0 -0
  35. data/doc/images/find.png +0 -0
  36. data/doc/images/loadingAnimation.gif +0 -0
  37. data/doc/images/macFFBgHack.png +0 -0
  38. data/doc/images/package.png +0 -0
  39. data/doc/images/page_green.png +0 -0
  40. data/doc/images/page_white_text.png +0 -0
  41. data/doc/images/page_white_width.png +0 -0
  42. data/doc/images/plugin.png +0 -0
  43. data/doc/images/ruby.png +0 -0
  44. data/doc/images/tag_blue.png +0 -0
  45. data/doc/images/tag_green.png +0 -0
  46. data/doc/images/transparent.png +0 -0
  47. data/doc/images/wrench.png +0 -0
  48. data/doc/images/wrench_orange.png +0 -0
  49. data/doc/images/zoom.png +0 -0
  50. data/doc/index.html +286 -0
  51. data/doc/js/darkfish.js +84 -0
  52. data/doc/js/navigation.js +105 -0
  53. data/doc/js/navigation.js.gz +0 -0
  54. data/doc/js/search.js +110 -0
  55. data/doc/js/search_index.js +1 -0
  56. data/doc/js/search_index.js.gz +0 -0
  57. data/doc/js/searcher.js +229 -0
  58. data/doc/js/searcher.js.gz +0 -0
  59. data/doc/table_of_contents.html +551 -0
  60. data/lib/standup_md/cli.rb +301 -0
  61. data/lib/standup_md/version.rb +9 -0
  62. data/lib/standup_md.rb +530 -0
  63. data/standup_md.gemspec +36 -0
  64. metadata +108 -0
@@ -0,0 +1,290 @@
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
+
25
+
26
+ <body id="top" role="document" class="file">
27
+ <nav role="navigation">
28
+ <div id="project-navigation">
29
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
30
+ <h2>
31
+ <a href="./index.html" rel="home">Home</a>
32
+ </h2>
33
+
34
+ <div id="table-of-contents-navigation">
35
+ <a href="./table_of_contents.html#pages">Pages</a>
36
+ <a href="./table_of_contents.html#classes">Classes</a>
37
+ <a href="./table_of_contents.html#methods">Methods</a>
38
+ </div>
39
+ </div>
40
+
41
+ <div id="search-section" role="search" class="project-section initially-hidden">
42
+ <form action="#" method="get" accept-charset="utf-8">
43
+ <div id="search-field-wrapper">
44
+ <input id="search-field" role="combobox" aria-label="Search"
45
+ aria-autocomplete="list" aria-controls="search-results"
46
+ type="text" name="search" placeholder="Search" spellcheck="false"
47
+ title="Type to search, Up and Down to navigate, Enter to load">
48
+ </div>
49
+
50
+ <ul id="search-results" aria-label="Search Results"
51
+ aria-busy="false" aria-expanded="false"
52
+ aria-atomic="false" class="initially-hidden"></ul>
53
+ </form>
54
+ </div>
55
+
56
+ </div>
57
+
58
+
59
+ <div class="nav-section">
60
+ <h3>Table of Contents</h3>
61
+
62
+ <ul class="link-list" role="directory">
63
+ <li><a href="#label-The+Standup+Doctor"><a href="https://evanthegrayt.github.io/standup_md/">The Standup Doctor</a></a>
64
+ <li><a href="#label-Table+of+Contents">Table of Contents</a>
65
+ <li><a href="#label-About">About</a>
66
+ <li><a href="#label-Installation">Installation</a>
67
+ <li><a href="#label-Via+RubyGems">Via RubyGems</a>
68
+ <li><a href="#label-Manual+Installation">Manual Installation</a>
69
+ <li><a href="#label-Usage">Usage</a>
70
+ <li><a href="#label-Example">Example</a>
71
+ <li><a href="#label-Customization+and+Runtime+Options">Customization and Runtime Options</a>
72
+ <li><a href="#label-Available+Config+File+Keys+and+Defaults">Available Config File Keys and Defaults</a>
73
+ <li><a href="#label-Executable+Flags">Executable Flags</a>
74
+ <li><a href="#label-API">API</a>
75
+ <li><a href="#label-Reporting+Bugs+and+Requesting+Features">Reporting Bugs and Requesting Features</a>
76
+ <li><a href="#label-Self-Promotion">Self-Promotion</a>
77
+ </ul>
78
+ </div>
79
+
80
+
81
+ <div id="project-metadata">
82
+ <div id="fileindex-section" class="nav-section">
83
+ <h3>Pages</h3>
84
+
85
+ <ul class="link-list">
86
+
87
+ <li><a href="./README_md.html">README</a>
88
+
89
+ </ul>
90
+ </div>
91
+
92
+ </div>
93
+ </nav>
94
+
95
+ <main role="main" aria-label="Page README.md">
96
+
97
+ <h1 id="label-The+Standup+Doctor"><a href="https://evanthegrayt.github.io/standup_md/">The Standup Doctor</a><span><a href="#label-The+Standup+Doctor">&para;</a> <a href="#top">&uarr;</a></span></h1>
98
+
99
+ <blockquote>
100
+ <p>The cure for all your standup woes.</p>
101
+ </blockquote>
102
+
103
+ <p>A highly customizable and automated way to keep track of daily standups in markdown files.</p>
104
+
105
+ <h2 id="label-Table+of+Contents">Table of Contents<span><a href="#label-Table+of+Contents">&para;</a> <a href="#top">&uarr;</a></span></h2>
106
+ <ul><li>
107
+ <p><a href="#about">About</a></p>
108
+ </li><li>
109
+ <p><a href="#Installation">Installation</a></p>
110
+ </li><li>
111
+ <p><a href="#via-rubygems">Via RubyGems</a></p>
112
+ </li><li>
113
+ <p><a href="#manual-installation">Manual Installation</a></p>
114
+ </li><li>
115
+ <p><a href="#usage">Usage</a></p>
116
+ </li><li>
117
+ <p><a href="#example">Example</a></p>
118
+ </li><li>
119
+ <p><a href="#customization-and-runtime-options">Customization and Runtime Options</a></p>
120
+ </li><li>
121
+ <p><a href="#api">API</a></p>
122
+ </li><li>
123
+ <p><a href="https://evanthegrayt.github.io/standup_md/doc/index.html">Documentation</a></p>
124
+ </li><li>
125
+ <p><a href="#reporting-bugs-and-requesting-features">Reporting Bugs and Requesting Features</a></p>
126
+ </li><li>
127
+ <p><a href="#self-promotion">Self-Promotion</a></p>
128
+ </li></ul>
129
+
130
+ <h2 id="label-About">About<span><a href="#label-About">&para;</a> <a href="#top">&uarr;</a></span></h2>
131
+
132
+ <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 displaying entries from the command line.</p>
133
+
134
+ <p>I wasn&#39;t sure that others would find this useful, but then the pandemic happened, which I assume made doing standups via chat much more common.</p>
135
+
136
+ <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, and if a previous entry exists, it will be added to today&#39;s entry as what your previous day&#39;s work. See <a href="#example">example</a>. There&#39;s also an API if you&#39;d like to use this in your own code somehow.</p>
137
+
138
+ <p>This is a new project, and I have a lot of <a href="https://github.com/evanthegrayt/standup_md/issues">updates planned</a>, but I won&#39;t push to <code>master</code> unless all <a href="https://github.com/evanthegrayt/standup_md/blob/master/test/standup_md_test.rb">tests</a> are passing and the gem is working as expected. The first official release will be once <a href="https://github.com/evanthegrayt/standup_md/milestone/1">this milestone</a> is complete. Until then, consider this gem to be in alpha, and the version will remain <code>&lt; 0.1.0</code>.</p>
139
+
140
+ <h2 id="label-Installation">Installation<span><a href="#label-Installation">&para;</a> <a href="#top">&uarr;</a></span></h2>
141
+
142
+ <h3 id="label-Via+RubyGems">Via RubyGems<span><a href="#label-Via+RubyGems">&para;</a> <a href="#top">&uarr;</a></span></h3>
143
+
144
+ <p><em>COMING SOON. For now, please use the <a href="#manual-installation">manual installation instructions</a>. The gem will be officially released once <a href="https://github.com/evanthegrayt/standup_md/milestone/1">this milestone</a> is completed</em>.</p>
145
+ <!-- Just install the gem! --><!-- ```sh --><!-- gem install standup_md --><!-- ``` --><!-- If you don't have permission on your system to install ruby or gems, I recommend --><!-- using [rvm](https://rvm.io/) or --><!-- [rbenv](http://www.rubyinside.com/rbenv-a-simple-new-ruby-version-management-tool-5302.html), --><!-- or you can try to use a manual method below. -->
146
+ <h3 id="label-Manual+Installation">Manual Installation<span><a href="#label-Manual+Installation">&para;</a> <a href="#top">&uarr;</a></span></h3>
147
+
148
+ <p>From your terminal, clone the repository where you want it. From there, you have a couple of installation options.</p>
149
+
150
+ <pre>git clone https://github.com/evanthegrayt/standup_md.git
151
+ cd standup_md
152
+
153
+ # Use rake to build and install the gem.
154
+ rake install
155
+
156
+ # OR manually link the executable somewhere. If you use this method, you cannot
157
+ # move the repository after you link it!
158
+ ln -s $PWD/bin/standup /usr/local/bin</pre>
159
+
160
+ <h2 id="label-Usage">Usage<span><a href="#label-Usage">&para;</a> <a href="#top">&uarr;</a></span></h2>
161
+
162
+ <p>Call the executable.</p>
163
+
164
+ <pre class="ruby"><span class="ruby-identifier">standup</span>
165
+ </pre>
166
+
167
+ <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; do not change anything, except for adding entries for today.</p>
168
+
169
+ <h3 id="label-Example">Example<span><a href="#label-Example">&para;</a> <a href="#top">&uarr;</a></span></h3>
170
+
171
+ <p>For example, if the standup entry from yesterday reads as follows:</p>
172
+
173
+ <pre># 2020-04-13
174
+ ## Previous
175
+ - Did something else.
176
+ ## Current
177
+ - Write new feature for `standup_md`
178
+ - Fix bug in `standup_md`
179
+ ## Impediments
180
+ - None</pre>
181
+
182
+ <p>The following scaffolding will be added for current entry at the top of the file: <code>markdown # 2020-04-14 ## Previous - Write new feature for `standup_md` - Fix bug in `standup_md` ## Current - &lt;!-- ADD TODAY&#39;S WORK HERE --&gt; ## Impediments - None </code></p>
183
+
184
+ <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>
185
+
186
+ <pre class="ruby"><span class="ruby-identifier">standup</span> <span class="ruby-operator">-</span><span class="ruby-identifier">c</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">pbcopy</span>
187
+ </pre>
188
+
189
+ <h2 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></h2>
190
+
191
+ <p>You can create a file in your home directory called <code>~/.standup_md.yml</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/standup_md.yml">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>
192
+
193
+ <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>
194
+
195
+ <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>
196
+
197
+ <h3 id="label-Available+Config+File+Keys+and+Defaults">Available Config File Keys and Defaults<span><a href="#label-Available+Config+File+Keys+and+Defaults">&para;</a> <a href="#top">&uarr;</a></span></h3>
198
+
199
+ <pre># Key: Default
200
+ header_depth: 1
201
+ header_date_format: &#39;%Y-%m-%d&#39;
202
+ sub_header_depth: 2
203
+ current_header: &#39;Current&#39;
204
+ previous_header: &#39;Previous&#39;
205
+ impediments_header: &#39;Impediments&#39;
206
+ file_name_format: &#39;%Y_%m.md&#39;
207
+ bullet_character: &#39;-&#39; # (dash)
208
+ directory: &#39;~/.cache/standup_md&#39;
209
+ editor: # $VISUAL, $EDITOR or vim, in that order
210
+ current_entry_tasks:
211
+ - &quot;&lt;!-- ADD TODAY&#39;S WORK HERE --&gt;&quot;
212
+ previous_entry_tasks: # An array of the tasks from the previous entry
213
+ impediments:
214
+ - &#39;None&#39;
215
+ notes: null # If not null, must be array
216
+ sub_header_order:
217
+ - &#39;previous&#39;
218
+ - &#39;current&#39;
219
+ - &#39;impediments&#39;
220
+ - &#39;notes&#39;</pre>
221
+
222
+ <h3 id="label-Executable+Flags">Executable Flags<span><a href="#label-Executable+Flags">&para;</a> <a href="#top">&uarr;</a></span></h3>
223
+
224
+ <pre>The Standup Doctor
225
+ --current-entry-tasks=ARRAY List of current entry&#39;s tasks
226
+ --previous-entry-tasks=ARRAY List of yesterday&#39;s tasks
227
+ --impediments=ARRAY List of impediments for current entry
228
+ --notes=ARRAY List of notes for current entry
229
+ --sub-header-order=ARRAY The order of the sub-headers when writing the file
230
+ --[no-]append-previous Append previous tasks? Default is true
231
+ -f, --file-name-format=STRING Date-formattable string to use for standup file name
232
+ -e, --editor=EDITOR Editor to use for opening standup files
233
+ -d, --directory=DIRECTORY The directories where standup files are located
234
+ --[no-]write Write current entry if it doesn&#39;t exist. Default is true
235
+ --[no-]edit Open the file in the editor. Default is true
236
+ -j, --[no-]json Print output as formatted json. Default is false.
237
+ -v, --[no-]verbose Verbose output. Default is false.
238
+ -c, --current Print current entry. Disables editing
239
+ -a, --all Print all previous entries. Disables editing</pre>
240
+
241
+ <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>
242
+
243
+ <p>If you wanted to add some tasks at runtime, and without opening the file in an editor, you could use the following:</p>
244
+
245
+ <pre>standup --no-edit --current-entry-tasks=&quot;Work on this thing&quot;,&quot;And another thing!&quot;</pre>
246
+
247
+ <h2 id="label-API">API<span><a href="#label-API">&para;</a> <a href="#top">&uarr;</a></span></h2>
248
+
249
+ <p>Below are some quick examples, but the API is fully documented in the <a href="https://evanthegrayt.github.io/standup_md/doc/index.html">documentation</a>.</p>
250
+
251
+ <p>This was mainly written as a command line utility, but I made the API available for scripting. There are attribute accessors for most of the settings in the <a href="#customization-and-runtime-options">customization table</a> above. To view all available methods, read the comments in the <a href="lib/standup_md.rb">source</a>. A quick-and-dirty example of how to write a new entry via code could look like the following:</p>
252
+
253
+ <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;standup_md&#39;</span>
254
+
255
+ <span class="ruby-identifier">standup</span> = <span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">load</span>(
256
+ <span class="ruby-value">current_header:</span> <span class="ruby-string">&#39;Today&#39;</span>,
257
+ <span class="ruby-value">current_entry_tasks:</span> [<span class="ruby-string">&#39;Thing to do today&#39;</span>, <span class="ruby-string">&#39;Another thing to do today&#39;</span>],
258
+ <span class="ruby-value">impediments:</span> [<span class="ruby-string">&#39;Not enough time in the day&#39;</span>]
259
+ )
260
+
261
+ <span class="ruby-identifier">standup</span>.<span class="ruby-identifier">write</span>
262
+ </pre>
263
+
264
+ <p>Entries are just hashes, so you can easily transform them to <code>json</code> objects.</p>
265
+
266
+ <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;standup_md&#39;</span>
267
+ <span class="ruby-identifier">require</span> <span class="ruby-string">&#39;json&#39;</span>
268
+
269
+ <span class="ruby-identifier">standup</span> = <span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">load</span>
270
+ <span class="ruby-identifier">standup_entries_as_json</span> = <span class="ruby-identifier">standup</span>.<span class="ruby-identifier">all_entries</span>.<span class="ruby-identifier">to_json</span>
271
+ </pre>
272
+
273
+ <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>
274
+
275
+ <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>
276
+
277
+ <h2 id="label-Self-Promotion">Self-Promotion<span><a href="#label-Self-Promotion">&para;</a> <a href="#top">&uarr;</a></span></h2>
278
+
279
+ <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>
280
+
281
+ </main>
282
+
283
+
284
+
285
+ <footer id="validator-badges" role="contentinfo">
286
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
287
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.1.2.
288
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
289
+ </footer>
290
+