doing 2.1.39 → 2.1.42
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/CHANGELOG.md +67 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/Rakefile +4 -4
- data/bin/commands/again.rb +1 -3
- data/bin/commands/changes.rb +50 -34
- data/bin/commands/commands.rb +77 -52
- data/bin/commands/commands_accepting.rb +57 -53
- data/bin/commands/config.rb +45 -36
- data/bin/commands/done.rb +1 -18
- data/bin/commands/finish.rb +90 -59
- data/bin/commands/flag.rb +5 -1
- data/bin/commands/grep.rb +3 -14
- data/bin/commands/last.rb +2 -8
- data/bin/commands/meanwhile.rb +13 -6
- data/bin/commands/now.rb +151 -107
- data/bin/commands/on.rb +8 -18
- data/bin/commands/recent.rb +2 -8
- data/bin/commands/reset.rb +24 -1
- data/bin/commands/select.rb +1 -1
- data/bin/commands/show.rb +6 -17
- data/bin/commands/since.rb +1 -12
- data/bin/commands/tag_dir.rb +49 -15
- data/bin/commands/today.rb +2 -13
- data/bin/commands/undo.rb +4 -6
- data/bin/commands/view.rb +1 -1
- data/bin/commands/yesterday.rb +2 -13
- data/bin/doing +15 -8
- data/{Dockerfile → docker/Dockerfile} +3 -1
- data/{Dockerfile-2.6 → docker/Dockerfile-2.6} +2 -2
- data/{Dockerfile-2.7 → docker/Dockerfile-2.7} +2 -2
- data/{Dockerfile-3.0 → docker/Dockerfile-3.0} +2 -2
- data/{bash_profile → docker/bash_profile} +0 -0
- data/{inputrc → docker/inputrc} +0 -0
- data/docs/doc/Array.html +85 -2
- data/docs/doc/BooleanTermParser/Clause.html +1 -1
- data/docs/doc/BooleanTermParser/Operator.html +1 -1
- data/docs/doc/BooleanTermParser/Query.html +1 -1
- data/docs/doc/BooleanTermParser/QueryParser.html +1 -1
- data/docs/doc/BooleanTermParser/QueryTransformer.html +1 -1
- data/docs/doc/BooleanTermParser.html +1 -1
- data/docs/doc/Doing/ArrayNestedHash.html +198 -0
- data/docs/doc/Doing/ArrayTags.html +424 -0
- data/docs/doc/Doing/CSVExport.html +266 -0
- data/docs/doc/Doing/CalendarImport.html +232 -0
- data/docs/doc/Doing/Change.html +617 -0
- data/docs/doc/Doing/Changes.html +468 -0
- data/docs/doc/Doing/ChronifyArray.html +347 -0
- data/docs/doc/Doing/ChronifyNumeric.html +271 -0
- data/docs/doc/Doing/ChronifyString.html +682 -0
- data/docs/doc/Doing/Color.html +167 -21
- data/docs/doc/Doing/Completion/BashCompletions.html +445 -0
- data/docs/doc/Doing/Completion/FishCompletions.html +445 -0
- data/docs/doc/Doing/Completion/StringUtils.html +229 -0
- data/docs/doc/Doing/Completion/ZshCompletions.html +445 -0
- data/docs/doc/Doing/Completion.html +17 -3
- data/docs/doc/Doing/Configuration.html +3 -2
- data/docs/doc/Doing/DayOneRenderer.html +383 -0
- data/docs/doc/Doing/DayoneExport.html +290 -0
- data/docs/doc/Doing/DoingImport.html +391 -0
- data/docs/doc/Doing/Entry.html +381 -0
- data/docs/doc/Doing/Errors/DoingNoTraceError.html +7 -3
- data/docs/doc/Doing/Errors/DoingRuntimeError.html +7 -3
- data/docs/doc/Doing/Errors/DoingStandardError.html +1 -1
- data/docs/doc/Doing/Errors/EmptyInput.html +10 -2
- data/docs/doc/Doing/Errors/HistoryLimitError.html +194 -0
- data/docs/doc/Doing/Errors/InvalidPlugin.html +194 -0
- data/docs/doc/Doing/Errors/MissingBackupFile.html +194 -0
- data/docs/doc/Doing/Errors/NoResults.html +10 -2
- data/docs/doc/Doing/Errors/PluginException.html +1 -1
- data/docs/doc/Doing/Errors/UserCancelled.html +10 -2
- data/docs/doc/Doing/Errors/WrongCommand.html +10 -2
- data/docs/doc/Doing/Errors.html +9 -9
- data/docs/doc/Doing/HTMLExport.html +256 -0
- data/docs/doc/Doing/Hooks.html +1 -1
- data/docs/doc/Doing/Item.html +179 -1660
- data/docs/doc/Doing/ItemDates.html +564 -0
- data/docs/doc/Doing/ItemQuery.html +614 -0
- data/docs/doc/Doing/ItemState.html +387 -0
- data/docs/doc/Doing/ItemTags.html +498 -0
- data/docs/doc/Doing/Items.html +581 -15
- data/docs/doc/Doing/JSONExport.html +222 -0
- data/docs/doc/Doing/Logger.html +1 -1
- data/docs/doc/Doing/MarkdownExport.html +266 -0
- data/docs/doc/Doing/MarkdownRenderer.html +383 -0
- data/docs/doc/Doing/Note.html +18 -4
- data/docs/doc/Doing/Pager.html +1 -1
- data/docs/doc/Doing/Plugins.html +181 -76
- data/docs/doc/Doing/Prompt.html +32 -683
- data/docs/doc/Doing/PromptChoose.html +484 -0
- data/docs/doc/Doing/PromptFZF.html +391 -0
- data/docs/doc/Doing/PromptInput.html +572 -0
- data/docs/doc/Doing/PromptSTD.html +293 -0
- data/docs/doc/Doing/PromptYN.html +237 -0
- data/docs/doc/Doing/Section.html +58 -2
- data/docs/doc/Doing/StringHighlight.html +533 -0
- data/docs/doc/Doing/StringNormalize.html +929 -0
- data/docs/doc/Doing/StringQuery.html +725 -0
- data/docs/doc/Doing/StringTags.html +884 -0
- data/docs/doc/Doing/StringTransform.html +599 -0
- data/docs/doc/Doing/StringTruncate.html +448 -0
- data/docs/doc/Doing/StringURL.html +409 -0
- data/docs/doc/Doing/SymbolNormalize.html +341 -0
- data/docs/doc/Doing/TaskPaperExport.html +222 -0
- data/docs/doc/Doing/TemplateExport.html +249 -0
- data/docs/doc/Doing/TemplateString.html +102 -3
- data/docs/doc/Doing/TimingImport.html +285 -0
- data/docs/doc/Doing/Types.html +1 -1
- data/docs/doc/Doing/Util/Backup.html +11 -163
- data/docs/doc/Doing/Util.html +67 -10
- data/docs/doc/Doing/Version.html +523 -0
- data/docs/doc/Doing/WWID/WWIDUtil.html +510 -0
- data/docs/doc/Doing/WWID.html +476 -139
- data/docs/doc/Doing/WWIDDisplay.html +865 -0
- data/docs/doc/Doing/WWIDEditor.html +466 -0
- data/docs/doc/Doing/WWIDFileTools.html +359 -0
- data/docs/doc/Doing/WWIDFilter.html +466 -0
- data/docs/doc/Doing/WWIDGuess.html +299 -0
- data/docs/doc/Doing/WWIDInteractive.html +752 -0
- data/docs/doc/Doing/WWIDModify.html +1078 -0
- data/docs/doc/Doing/WWIDTags.html +302 -0
- data/docs/doc/Doing/WWIDTimers.html +359 -0
- data/docs/doc/Doing/WWIDUtil.html +510 -0
- data/docs/doc/Doing.html +9 -6
- data/docs/doc/FalseClass.html +1 -1
- data/docs/doc/GLI/Commands/Help.html +1 -1
- data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +1 -1
- data/docs/doc/GLI/Commands.html +1 -1
- data/docs/doc/GLI.html +1 -1
- data/docs/doc/Hash.html +1 -1
- data/docs/doc/Numeric.html +23 -78
- data/docs/doc/Object.html +1 -1
- data/docs/doc/PhraseParser/Operator.html +1 -1
- data/docs/doc/PhraseParser/PhraseClause.html +1 -1
- data/docs/doc/PhraseParser/Query.html +1 -1
- data/docs/doc/PhraseParser/QueryParser.html +1 -1
- data/docs/doc/PhraseParser/QueryTransformer.html +1 -1
- data/docs/doc/PhraseParser/TermClause.html +1 -1
- data/docs/doc/PhraseParser.html +1 -1
- data/docs/doc/Status.html +1 -1
- data/docs/doc/String.html +58 -633
- data/docs/doc/Symbol.html +9 -224
- data/docs/doc/Time.html +119 -13
- data/docs/doc/TrueClass.html +1 -1
- data/docs/doc/_index.html +348 -4
- data/docs/doc/class_list.html +1 -1
- data/docs/doc/file.README.html +2 -2
- data/docs/doc/index.html +2 -2
- data/docs/doc/method_list.html +1904 -592
- data/docs/doc/top-level-namespace.html +12 -4
- data/docs/index.md +1 -1
- data/doing.rdoc +67 -15
- data/lib/completion/_doing.zsh +6 -6
- data/lib/completion/doing.bash +10 -10
- data/lib/completion/doing.fish +10 -3
- data/lib/doing/add_options.rb +39 -1
- data/lib/doing/array/array.rb +18 -12
- data/lib/doing/array/cleanup.rb +31 -0
- data/lib/doing/array/nested_hash.rb +1 -1
- data/lib/doing/array/tags.rb +6 -5
- data/lib/doing/changelog/changelog.rb +6 -0
- data/lib/doing/chronify/array.rb +65 -25
- data/lib/doing/chronify/chronify.rb +12 -0
- data/lib/doing/chronify/numeric.rb +3 -2
- data/lib/doing/chronify/string.rb +1 -1
- data/lib/doing/colors.rb +77 -30
- data/lib/doing/completion/completion_string.rb +25 -0
- data/lib/doing/completion.rb +4 -5
- data/lib/doing/configuration.rb +7 -3
- data/lib/doing/errors.rb +51 -35
- data/lib/doing/good.rb +8 -0
- data/lib/doing/hooks.rb +3 -3
- data/lib/doing/item/dates.rb +112 -0
- data/lib/doing/item/item.rb +128 -0
- data/lib/doing/{item.rb → item/query.rb} +2 -353
- data/lib/doing/item/state.rb +59 -0
- data/lib/doing/item/tags.rb +87 -0
- data/lib/doing/items/filter.rb +67 -0
- data/lib/doing/items/items.rb +57 -0
- data/lib/doing/items/modify.rb +36 -0
- data/lib/doing/items/sections.rb +83 -0
- data/lib/doing/items/util.rb +74 -0
- data/lib/doing/normalize.rb +10 -2
- data/lib/doing/note.rb +1 -1
- data/lib/doing/pager.rb +9 -3
- data/lib/doing/plugin_manager.rb +33 -8
- data/lib/doing/plugins/export/markdown_export.rb +4 -2
- data/lib/doing/plugins/export/template_export.rb +4 -4
- data/lib/doing/plugins/import/cal_to_json.scpt +0 -0
- data/lib/doing/plugins/import/doing_import.rb +1 -1
- data/lib/doing/prompt/choose.rb +118 -0
- data/lib/doing/prompt/fzf.rb +84 -0
- data/lib/doing/prompt/input.rb +129 -0
- data/lib/doing/prompt/prompt.rb +41 -0
- data/lib/doing/prompt/std.rb +32 -0
- data/lib/doing/prompt/yn.rb +64 -0
- data/lib/doing/section.rb +4 -0
- data/lib/doing/string/highlight.rb +1 -1
- data/lib/doing/string/query.rb +1 -1
- data/lib/doing/string/string.rb +18 -7
- data/lib/doing/string/tags.rb +14 -3
- data/lib/doing/string/transform.rb +7 -1
- data/lib/doing/string/truncate.rb +1 -1
- data/lib/doing/string/url.rb +1 -1
- data/lib/doing/time.rb +19 -1
- data/lib/doing/util.rb +12 -6
- data/lib/doing/util_backup.rb +62 -57
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid/display.rb +396 -0
- data/lib/doing/wwid/editor.rb +214 -0
- data/lib/doing/wwid/filetools.rb +183 -0
- data/lib/doing/wwid/filter.rb +226 -0
- data/lib/doing/wwid/guess.rb +85 -0
- data/lib/doing/wwid/interactive.rb +377 -0
- data/lib/doing/wwid/modify.rb +617 -0
- data/lib/doing/wwid/tags.rb +51 -0
- data/lib/doing/wwid/timers.rb +342 -0
- data/lib/doing/wwid/wwid.rb +121 -0
- data/lib/doing/wwid/wwidutil.rb +101 -0
- data/lib/doing.rb +7 -7
- data/lib/helpers/threaded_tests.rb +1 -0
- metadata +94 -14
- data/lib/doing/changelog.rb +0 -6
- data/lib/doing/completion/string.rb +0 -17
- data/lib/doing/items.rb +0 -196
- data/lib/doing/prompt.rb +0 -330
- data/lib/doing/wwid.rb +0 -2398
data/docs/doc/Doing/Color.html
CHANGED
@@ -81,7 +81,7 @@
|
|
81
81
|
|
82
82
|
<dl>
|
83
83
|
<dt>Included in:</dt>
|
84
|
-
<dd><span class='object_link'><a href="" title="Doing::Color (module)">Color</a></span>, <span class='object_link'><a href="Item.html" title="Doing::Item (class)">Item</a></span>, <span class='object_link'><a href="Prompt.html" title="Doing::Prompt (module)">Prompt</a></span>, <span class='object_link'><a href="TemplateString.html" title="Doing::TemplateString (class)">TemplateString</a></span>, <span class='object_link'><a href="WWID.html" title="Doing::WWID (class)">WWID</a></span></dd>
|
84
|
+
<dd><span class='object_link'><a href="" title="Doing::Color (module)">Color</a></span>, <span class='object_link'><a href="Item.html" title="Doing::Item (class)">Item</a></span>, <span class='object_link'><a href="Prompt.html" title="Doing::Prompt (module)">Prompt</a></span>, <span class='object_link'><a href="TemplateExport.html" title="Doing::TemplateExport (class)">TemplateExport</a></span>, <span class='object_link'><a href="TemplateString.html" title="Doing::TemplateString (class)">TemplateString</a></span>, <span class='object_link'><a href="WWID.html" title="Doing::WWID (class)">WWID</a></span>, <span class='object_link'><a href="../String.html" title="String (class)">String</a></span></dd>
|
85
85
|
</dl>
|
86
86
|
|
87
87
|
|
@@ -95,7 +95,7 @@
|
|
95
95
|
|
96
96
|
<h2>Overview</h2><div class="docstring">
|
97
97
|
<div class="discussion">
|
98
|
-
<p>Terminal color functions
|
98
|
+
<p>Terminal output color functions.</p>
|
99
99
|
|
100
100
|
|
101
101
|
</div>
|
@@ -115,13 +115,36 @@
|
|
115
115
|
<dt id="ATTRIBUTES-constant" class="">ATTRIBUTES =
|
116
116
|
<div class="docstring">
|
117
117
|
<div class="discussion">
|
118
|
-
<p
|
118
|
+
<p>All available color names. Available as methods and string extensions.</p>
|
119
119
|
|
120
120
|
|
121
121
|
</div>
|
122
122
|
</div>
|
123
123
|
<div class="tags">
|
124
124
|
|
125
|
+
<div class="examples">
|
126
|
+
<p class="tag_title">Examples:</p>
|
127
|
+
|
128
|
+
|
129
|
+
<p class="example_title"><div class='inline'><p>Use a color as a method. Color reset will be added to end of string.</p>
|
130
|
+
</div></p>
|
131
|
+
|
132
|
+
<pre class="example code"><code><span class='const'><span class='object_link'><a href="" title="Doing::Color (module)">Color</a></span></span><span class='period'>.</span><span class='id identifier rubyid_yellow'>yellow</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>This text is yellow</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\e[33mThis text is yellow\e[0m</span><span class='tstring_end'>"</span></span></code></pre>
|
133
|
+
|
134
|
+
|
135
|
+
<p class="example_title"><div class='inline'><p>Use a color as a string extension. Color reset added automatically.</p>
|
136
|
+
</div></p>
|
137
|
+
|
138
|
+
<pre class="example code"><code><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>This text is green</span><span class='tstring_end'>'</span></span><span class='period'>.</span><span class='id identifier rubyid_green'>green</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\e[1;32mThis text is green\e[0m</span><span class='tstring_end'>"</span></span></code></pre>
|
139
|
+
|
140
|
+
|
141
|
+
<p class="example_title"><div class='inline'><p>Send a text string as a color</p>
|
142
|
+
</div></p>
|
143
|
+
|
144
|
+
<pre class="example code"><code><span class='const'><span class='object_link'><a href="" title="Doing::Color (module)">Color</a></span></span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>red</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\e[31m</span><span class='tstring_end'>"</span></span></code></pre>
|
145
|
+
|
146
|
+
</div>
|
147
|
+
|
125
148
|
|
126
149
|
</div>
|
127
150
|
</dt>
|
@@ -186,7 +209,7 @@
|
|
186
209
|
<span class='lbracket'>[</span><span class='symbol'>:redacted</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0;30;40</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
|
187
210
|
<span class='lbracket'>[</span><span class='symbol'>:alert</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>1;31;43</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
|
188
211
|
<span class='lbracket'>[</span><span class='symbol'>:error</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>1;37;41</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
|
189
|
-
<span class='lbracket'>[</span><span class='symbol'>:default</span><span class='comma'>,</span>
|
212
|
+
<span class='lbracket'>[</span><span class='symbol'>:default</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0;39</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
190
213
|
<span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:freeze</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
|
191
214
|
|
192
215
|
<dt id="ATTRIBUTE_NAMES-constant" class="">ATTRIBUTE_NAMES =
|
@@ -208,7 +231,7 @@ uncoloring strings.</p>
|
|
208
231
|
|
209
232
|
</div>
|
210
233
|
</dt>
|
211
|
-
<dd><pre class="code"><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\e\[(?:(?:[349]|10)[0-7]|[0-9])?m</span><span class='regexp_end'>/</span></span></pre></dd>
|
234
|
+
<dd><pre class="code"><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\e\[(?:(?:[349]|10)[0-7]|[0-9])?m</span><span class='regexp_end'>/</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
|
212
235
|
|
213
236
|
</dl>
|
214
237
|
|
@@ -239,7 +262,8 @@ uncoloring strings.</p>
|
|
239
262
|
|
240
263
|
|
241
264
|
|
242
|
-
<span class="summary_desc"><div class='inline'
|
265
|
+
<span class="summary_desc"><div class='inline'><p>Enables colored output.</p>
|
266
|
+
</div></span>
|
243
267
|
|
244
268
|
</li>
|
245
269
|
|
@@ -260,7 +284,7 @@ uncoloring strings.</p>
|
|
260
284
|
<li class="public ">
|
261
285
|
<span class="summary_signature">
|
262
286
|
|
263
|
-
<a href="#
|
287
|
+
<a href="#coloring%3F-class_method" title="coloring? (class method)">.<strong>coloring?</strong> ⇒ Boolean </a>
|
264
288
|
|
265
289
|
|
266
290
|
|
@@ -274,7 +298,7 @@ uncoloring strings.</p>
|
|
274
298
|
|
275
299
|
|
276
300
|
|
277
|
-
<span class="summary_desc"><div class='inline'><p>Returns
|
301
|
+
<span class="summary_desc"><div class='inline'><p>Returns true if the coloring function of this module is switched on, false otherwise.</p>
|
278
302
|
</div></span>
|
279
303
|
|
280
304
|
</li>
|
@@ -283,7 +307,7 @@ uncoloring strings.</p>
|
|
283
307
|
<li class="public ">
|
284
308
|
<span class="summary_signature">
|
285
309
|
|
286
|
-
<a href="#
|
310
|
+
<a href="#template-class_method" title="template (class method)">.<strong>template</strong>(input) ⇒ String </a>
|
287
311
|
|
288
312
|
|
289
313
|
|
@@ -297,7 +321,7 @@ uncoloring strings.</p>
|
|
297
321
|
|
298
322
|
|
299
323
|
|
300
|
-
<span class="summary_desc"><div class='inline'><p>
|
324
|
+
<span class="summary_desc"><div class='inline'><p>Convert a template string to a colored string.</p>
|
301
325
|
</div></span>
|
302
326
|
|
303
327
|
</li>
|
@@ -315,6 +339,29 @@ uncoloring strings.</p>
|
|
315
339
|
<li class="public ">
|
316
340
|
<span class="summary_signature">
|
317
341
|
|
342
|
+
<a href="#attributes-instance_method" title="#attributes (instance method)">#<strong>attributes</strong> ⇒ Object </a>
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
</span>
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
<span class="summary_desc"><div class='inline'><p>Returns an array of all Doing::Color attributes as symbols.</p>
|
357
|
+
</div></span>
|
358
|
+
|
359
|
+
</li>
|
360
|
+
|
361
|
+
|
362
|
+
<li class="public ">
|
363
|
+
<span class="summary_signature">
|
364
|
+
|
318
365
|
<a href="#support%3F-instance_method" title="#support? (instance method)">#<strong>support?</strong>(feature) ⇒ Boolean </a>
|
319
366
|
|
320
367
|
|
@@ -376,7 +423,28 @@ uncoloring strings.</p>
|
|
376
423
|
|
377
424
|
|
378
425
|
|
379
|
-
</h3>
|
426
|
+
</h3><div class="docstring">
|
427
|
+
<div class="discussion">
|
428
|
+
<p>Enables colored output</p>
|
429
|
+
|
430
|
+
|
431
|
+
</div>
|
432
|
+
</div>
|
433
|
+
<div class="tags">
|
434
|
+
|
435
|
+
<div class="examples">
|
436
|
+
<p class="tag_title">Examples:</p>
|
437
|
+
|
438
|
+
|
439
|
+
<p class="example_title"><div class='inline'><p>Turn color on or off based on TTY</p>
|
440
|
+
</div></p>
|
441
|
+
|
442
|
+
<pre class="example code"><code><span class='const'><span class='object_link'><a href="../Doing.html" title="Doing (module)">Doing</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Doing::Color (module)">Color</a></span></span><span class='period'>.</span><span class='id identifier rubyid_coloring'>coloring</span> <span class='op'>=</span> <span class='const'>STDOUT</span><span class='period'>.</span><span class='id identifier rubyid_isatty'>isatty</span></code></pre>
|
443
|
+
|
444
|
+
</div>
|
445
|
+
|
446
|
+
|
447
|
+
</div>
|
380
448
|
</div>
|
381
449
|
|
382
450
|
</div>
|
@@ -387,9 +455,9 @@ uncoloring strings.</p>
|
|
387
455
|
|
388
456
|
|
389
457
|
<div class="method_details first">
|
390
|
-
<h3 class="signature first" id="
|
458
|
+
<h3 class="signature first" id="coloring?-class_method">
|
391
459
|
|
392
|
-
.<strong>
|
460
|
+
.<strong>coloring?</strong> ⇒ <tt>Boolean</tt>
|
393
461
|
|
394
462
|
|
395
463
|
|
@@ -397,21 +465,35 @@ uncoloring strings.</p>
|
|
397
465
|
|
398
466
|
</h3><div class="docstring">
|
399
467
|
<div class="discussion">
|
400
|
-
<p>Returns
|
468
|
+
<p>Returns true if the coloring function of this module
|
469
|
+
is switched on, false otherwise.</p>
|
401
470
|
|
402
471
|
|
403
472
|
</div>
|
404
473
|
</div>
|
405
474
|
<div class="tags">
|
406
475
|
|
476
|
+
<p class="tag_title">Returns:</p>
|
477
|
+
<ul class="return">
|
478
|
+
|
479
|
+
<li>
|
480
|
+
|
481
|
+
|
482
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
483
|
+
|
484
|
+
|
485
|
+
|
486
|
+
</li>
|
487
|
+
|
488
|
+
</ul>
|
407
489
|
|
408
490
|
</div>
|
409
491
|
</div>
|
410
492
|
|
411
493
|
<div class="method_details ">
|
412
|
-
<h3 class="signature " id="
|
494
|
+
<h3 class="signature " id="template-class_method">
|
413
495
|
|
414
|
-
.<strong>
|
496
|
+
.<strong>template</strong>(input) ⇒ <tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>
|
415
497
|
|
416
498
|
|
417
499
|
|
@@ -419,23 +501,65 @@ uncoloring strings.</p>
|
|
419
501
|
|
420
502
|
</h3><div class="docstring">
|
421
503
|
<div class="discussion">
|
422
|
-
<p>
|
423
|
-
|
504
|
+
<p>Convert a template string to a colored string.
|
505
|
+
Colors are specified with single letters inside
|
506
|
+
curly braces. Uppercase changes background color.</p>
|
507
|
+
|
508
|
+
<p>w: white, k: black, g: green, l: blue, y: yellow, c: cyan,
|
509
|
+
m: magenta, r: red, b: bold, u: underline, i: italic,
|
510
|
+
x: reset (remove background, color, emphasis)</p>
|
424
511
|
|
425
512
|
|
426
513
|
</div>
|
427
514
|
</div>
|
428
515
|
<div class="tags">
|
429
516
|
|
517
|
+
<div class="examples">
|
518
|
+
<p class="tag_title">Examples:</p>
|
519
|
+
|
520
|
+
|
521
|
+
<p class="example_title"><div class='inline'><p>Convert a templated string</p>
|
522
|
+
</div></p>
|
523
|
+
|
524
|
+
<pre class="example code"><code><span class='const'><span class='object_link'><a href="" title="Doing::Color (module)">Color</a></span></span><span class='period'>.</span><span class='id identifier rubyid_template'>template</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>{Rwb}Warning:{x} {w}you look a little {g}ill{x}</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span></code></pre>
|
525
|
+
|
526
|
+
</div>
|
527
|
+
<p class="tag_title">Parameters:</p>
|
528
|
+
<ul class="param">
|
529
|
+
|
530
|
+
<li>
|
531
|
+
|
532
|
+
<span class='name'>input</span>
|
533
|
+
|
534
|
+
|
535
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>, <tt><span class='object_link'><a href="../Array.html" title="Array (class)">Array</a></span></tt>)</span>
|
536
|
+
|
537
|
+
|
538
|
+
|
539
|
+
—
|
540
|
+
<div class='inline'><p>The template
|
541
|
+
string. If this is an array, the
|
542
|
+
elements will be joined with a
|
543
|
+
space.</p>
|
544
|
+
</div>
|
545
|
+
|
546
|
+
</li>
|
547
|
+
|
548
|
+
</ul>
|
549
|
+
|
430
550
|
<p class="tag_title">Returns:</p>
|
431
551
|
<ul class="return">
|
432
552
|
|
433
553
|
<li>
|
434
554
|
|
435
555
|
|
436
|
-
<span class='type'>(<tt>
|
556
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
|
557
|
+
|
437
558
|
|
438
559
|
|
560
|
+
—
|
561
|
+
<div class='inline'><p>Colorized string</p>
|
562
|
+
</div>
|
439
563
|
|
440
564
|
</li>
|
441
565
|
|
@@ -451,7 +575,29 @@ is switched on, false otherwise.</p>
|
|
451
575
|
|
452
576
|
|
453
577
|
<div class="method_details first">
|
454
|
-
<h3 class="signature first" id="
|
578
|
+
<h3 class="signature first" id="attributes-instance_method">
|
579
|
+
|
580
|
+
#<strong>attributes</strong> ⇒ <tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>
|
581
|
+
|
582
|
+
|
583
|
+
|
584
|
+
|
585
|
+
|
586
|
+
</h3><div class="docstring">
|
587
|
+
<div class="discussion">
|
588
|
+
<p>Returns an array of all Doing::Color attributes as symbols.</p>
|
589
|
+
|
590
|
+
|
591
|
+
</div>
|
592
|
+
</div>
|
593
|
+
<div class="tags">
|
594
|
+
|
595
|
+
|
596
|
+
</div>
|
597
|
+
</div>
|
598
|
+
|
599
|
+
<div class="method_details ">
|
600
|
+
<h3 class="signature " id="support?-instance_method">
|
455
601
|
|
456
602
|
#<strong>support?</strong>(feature) ⇒ <tt>Boolean</tt>
|
457
603
|
|
@@ -518,7 +664,7 @@ ANSI-sequences are stripped from the string.</p>
|
|
518
664
|
</div>
|
519
665
|
|
520
666
|
<div id="footer">
|
521
|
-
Generated on
|
667
|
+
Generated on Fri Mar 18 12:56:57 2022 by
|
522
668
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
523
669
|
0.9.27 (ruby-3.0.1).
|
524
670
|
</div>
|