Skip to content

Commit

Permalink
update readme and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
evanthegrayt committed Apr 30, 2021
1 parent 78b914b commit 5203eac
Show file tree
Hide file tree
Showing 23 changed files with 148 additions and 1,269 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
standup_md (0.3.5)
standup_md (0.3.7)

GEM
remote: https://rubygems.org/
Expand Down
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,9 @@ end
The API is fully documented in the
[RDoc Documentation](https://evanthegrayt.github.io/standup_md/doc/index.html).

This was mainly written as a command line utility, but the API is ridiculously
robust, and is available for use in your own projects. A quick example of how
to write a new entry via code could look like the following:
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:

### API Examples
#### Adding an entry for today
Expand Down Expand Up @@ -320,16 +320,13 @@ While there's no official support for vim, you can add this to your `vimrc`
file, or something like `~/.vim/plugin/standup.vim`.

```vim
if executable('standup')
command! -complete=custom,s:StandupCompletion -nargs=? -bang Standup
\ call s:OpenStandupFile(<bang>0, <f-args>)
endif
command! -complete=custom,<SID>StandupCompletion -nargs=? -bang Standup
\ call s:OpenStandupFile(<bang>0, <f-args>)
function! s:StandupCompletion(...) abort
let l:dir = get(g:, 'standup_dir', $HOME . '/.cache/standup_md') . '/'
if !isdirectory(l:dir) | return '' | endif
let l:list = glob(l:dir . '*.md', 0, 1)
return join(map(l:list, "substitute(v:val, l:dir, '', '')"), "\n")
return join(map(glob(l:dir . '*.md', 0, 1), "fnamemodify(v:val, ':t')"), "\n")
endfunction
function! s:OpenStandupFile(split, ...)
Expand Down
20 changes: 7 additions & 13 deletions doc/README_md.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
<link href="./css/rdoc.css" rel="stylesheet">




<body id="top" role="document" class="file">
<nav role="navigation">
<div id="project-navigation">
Expand Down Expand Up @@ -88,13 +86,12 @@ <h3>Table of Contents</h3>


<div id="project-metadata">
<div id="fileindex-section" class="nav-section">

<div id="fileindex-section" class="nav-section">
<h3>Pages</h3>

<ul class="link-list">

<li><a href="./README_md.html">README</a>

</ul>
</div>

Expand Down Expand Up @@ -319,7 +316,7 @@ <h2 id="label-API">API<span><a href="#label-API">&para;</a> <a href="#top">&uarr

<p>The API is fully documented in the <a href="https://evanthegrayt.github.io/standup_md/doc/index.html">RDoc Documentation</a>.</p>

<p>This was mainly written as a command line utility, but the API is ridiculously robust, and is available for use in your own projects. A quick example of how to write a new entry via code could look like the following:</p>
<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>

<h3 id="label-API+Examples">API Examples<span><a href="#label-API+Examples">&para;</a> <a href="#top">&uarr;</a></span></h3>

Expand Down Expand Up @@ -362,16 +359,13 @@ <h2 id="label-Vim">Vim<span><a href="#label-Vim">&para;</a> <a href="#top">&uarr

<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>

<pre>if executable(&#39;standup&#39;)
command! -complete=custom,s:StandupCompletion -nargs=? -bang Standup
\ call s:OpenStandupFile(&lt;bang&gt;0, &lt;f-args&gt;)
endif
<pre>command! -complete=custom,&lt;SID&gt;StandupCompletion -nargs=? -bang Standup
\ call s:OpenStandupFile(&lt;bang&gt;0, &lt;f-args&gt;)

function! s:StandupCompletion(...) abort
let l:dir = get(g:, &#39;standup_dir&#39;, $HOME . &#39;/.cache/standup_md&#39;) . &#39;/&#39;
if !isdirectory(l:dir) | return &#39;&#39; | endif
let l:list = glob(l:dir . &#39;*.md&#39;, 0, 1)
return join(map(l:list, &quot;substitute(v:val, l:dir, &#39;&#39;, &#39;&#39;)&quot;), &quot;\n&quot;)
return join(map(glob(l:dir . &#39;*.md&#39;, 0, 1), &quot;fnamemodify(v:val, &#39;:t&#39;)&quot;), &quot;\n&quot;)
endfunction

function! s:OpenStandupFile(split, ...)
Expand Down Expand Up @@ -400,7 +394,7 @@ <h2 id="label-Self-Promotion">Self-Promotion<span><a href="#label-Self-Promotion

<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.1.
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
</footer>

84 changes: 5 additions & 79 deletions doc/StandupMD.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
<link href="./css/rdoc.css" rel="stylesheet">




<body id="top" role="document" class="module">
<nav role="navigation">
<div id="project-navigation">
Expand Down Expand Up @@ -62,22 +60,17 @@ <h2>



<!-- Method Quickref -->

<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
<h3>Methods</h3>

<ul class="link-list" role="directory">

<li ><a href="#method-c-config">::config</a>

<li ><a href="#method-c-config_file_loaded-3F">::config_file_loaded?</a>

<li ><a href="#method-c-configure">::configure</a>

<li ><a href="#method-c-load_config_file">::load_config_file</a>

<li ><a href="#method-c-reset_config">::reset_config</a>

</ul>
</div>

Expand All @@ -95,151 +88,101 @@ <h1 id="module-StandupMD" class="module">

</section>


<section id="5Buntitled-5D" class="documentation-section">









<section id="public-class-5Buntitled-5D-method-details" class="method-section">
<header>
<h3>Public Class Methods</h3>
</header>


<div id="method-c-config" class="method-detail ">

<div class="method-heading">
<span class="method-name">config</span><span
class="method-args">()</span>

<span class="method-click-advice">click to toggle source</span>

</div>


<div class="method-description">

<p>Method for accessing the configuration.</p>

<p>@return [StanupMD::Cli]</p>




<div class="method-source-code" id="config-source">
<pre><span class="ruby-comment"># File lib/standup_md.rb, line 19</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">config</span>
<span class="ruby-ivar">@config</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span>.<span class="ruby-identifier">new</span>
<span class="ruby-keyword">end</span></pre>
</div>

</div>




</div>


<div id="method-c-config_file_loaded-3F" class="method-detail ">

<div class="method-heading">
<span class="method-name">config_file_loaded?</span><span
class="method-args">()</span>

<span class="method-click-advice">click to toggle source</span>

</div>


<div class="method-description">

<p>Has a config file been loaded?</p>

<p>@return [Boolean]</p>




<div class="method-source-code" id="config_file_loaded-3F-source">
<pre><span class="ruby-comment"># File lib/standup_md.rb, line 44</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">config_file_loaded?</span>
<span class="ruby-ivar">@config_file_loaded</span>
<span class="ruby-keyword">end</span></pre>
</div>

</div>




</div>


<div id="method-c-configure" class="method-detail ">

<div class="method-heading">
<span class="method-name">configure</span><span
class="method-args">() { |config| ... }</span>

<span class="method-click-advice">click to toggle source</span>

</div>


<div class="method-description">

<p>Allows for configuration via a block. Useful when making config files.</p>

<p>@example</p>

<pre class="ruby"><span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">configure</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">cli</span>.<span class="ruby-identifier">editor</span> = <span class="ruby-string">&#39;mate&#39;</span> }
</pre>




<div class="method-source-code" id="configure-source">
<pre><span class="ruby-comment"># File lib/standup_md.rb, line 36</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">configure</span>
<span class="ruby-keyword">yield</span> <span class="ruby-identifier">config</span>
<span class="ruby-keyword">end</span></pre>
</div>

</div>




</div>


<div id="method-c-load_config_file" class="method-detail ">

<div class="method-heading">
<span class="method-name">load_config_file</span><span
class="method-args">(file)</span>

<span class="method-click-advice">click to toggle source</span>

</div>


<div class="method-description">

<p>Loads a config file.</p>

<p>@param [String] file</p>




<div class="method-source-code" id="load_config_file-source">
<pre><span class="ruby-comment"># File lib/standup_md.rb, line 52</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">load_config_file</span>(<span class="ruby-identifier">file</span>)
Expand All @@ -250,60 +193,43 @@ <h3>Public Class Methods</h3>
<span class="ruby-identifier">load</span> <span class="ruby-identifier">file</span>
<span class="ruby-keyword">end</span></pre>
</div>

</div>




</div>


<div id="method-c-reset_config" class="method-detail ">

<div class="method-heading">
<span class="method-name">reset_config</span><span
class="method-args">()</span>

<span class="method-click-advice">click to toggle source</span>

</div>


<div class="method-description">

<p>Reset all configuration values to their defaults.</p>

<p>@return [StandupMD::Config]</p>




<div class="method-source-code" id="reset_config-source">
<pre><span class="ruby-comment"># File lib/standup_md.rb, line 27</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">reset_config</span>
<span class="ruby-ivar">@config</span> = <span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span>.<span class="ruby-identifier">new</span>
<span class="ruby-keyword">end</span></pre>
</div>

</div>




</div>


</section>

</section>

</section>
</main>


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.1.
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
</footer>

Loading

0 comments on commit 5203eac

Please sign in to comment.