doing 1.0.93 → 2.0.6.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHORS +19 -0
  3. data/CHANGELOG.md +616 -0
  4. data/COMMANDS.md +1181 -0
  5. data/Gemfile +2 -0
  6. data/Gemfile.lock +110 -0
  7. data/LICENSE +23 -0
  8. data/README.md +15 -699
  9. data/Rakefile +79 -0
  10. data/_config.yml +1 -0
  11. data/bin/doing +1055 -494
  12. data/doing.gemspec +34 -0
  13. data/doing.rdoc +1839 -0
  14. data/example_plugin.rb +209 -0
  15. data/generate_completions.sh +5 -0
  16. data/img/doing-colors.jpg +0 -0
  17. data/img/doing-printf-wrap-800.jpg +0 -0
  18. data/img/doing-show-note-formatting-800.jpg +0 -0
  19. data/lib/completion/_doing.zsh +203 -0
  20. data/lib/completion/doing.bash +449 -0
  21. data/lib/completion/doing.fish +329 -0
  22. data/lib/doing/array.rb +8 -0
  23. data/lib/doing/cli_status.rb +70 -0
  24. data/lib/doing/colors.rb +136 -0
  25. data/lib/doing/configuration.rb +312 -0
  26. data/lib/doing/errors.rb +109 -0
  27. data/lib/doing/hash.rb +31 -0
  28. data/lib/doing/hooks.rb +59 -0
  29. data/lib/doing/item.rb +155 -0
  30. data/lib/doing/log_adapter.rb +344 -0
  31. data/lib/doing/markdown_document_listener.rb +174 -0
  32. data/lib/doing/note.rb +59 -0
  33. data/lib/doing/pager.rb +95 -0
  34. data/lib/doing/plugin_manager.rb +208 -0
  35. data/lib/doing/plugins/export/csv_export.rb +48 -0
  36. data/lib/doing/plugins/export/html_export.rb +83 -0
  37. data/lib/doing/plugins/export/json_export.rb +140 -0
  38. data/lib/doing/plugins/export/markdown_export.rb +85 -0
  39. data/lib/doing/plugins/export/taskpaper_export.rb +34 -0
  40. data/lib/doing/plugins/export/template_export.rb +141 -0
  41. data/lib/doing/plugins/import/cal_to_json.scpt +0 -0
  42. data/lib/doing/plugins/import/calendar_import.rb +76 -0
  43. data/lib/doing/plugins/import/doing_import.rb +144 -0
  44. data/lib/doing/plugins/import/timing_import.rb +78 -0
  45. data/lib/doing/string.rb +348 -0
  46. data/lib/doing/symbol.rb +16 -0
  47. data/lib/doing/time.rb +18 -0
  48. data/lib/doing/util.rb +186 -0
  49. data/lib/doing/version.rb +1 -1
  50. data/lib/doing/wwid.rb +1868 -2349
  51. data/lib/doing/wwidfile.rb +117 -0
  52. data/lib/doing.rb +43 -3
  53. data/lib/examples/commands/autotag.rb +63 -0
  54. data/lib/examples/commands/wiki.rb +81 -0
  55. data/lib/examples/plugins/hooks.rb +22 -0
  56. data/lib/examples/plugins/say_export.rb +202 -0
  57. data/lib/examples/plugins/templates/wiki.css +169 -0
  58. data/lib/examples/plugins/templates/wiki.haml +27 -0
  59. data/lib/examples/plugins/templates/wiki_index.haml +18 -0
  60. data/lib/examples/plugins/wiki_export.rb +87 -0
  61. data/lib/templates/doing-markdown.erb +5 -0
  62. data/man/doing.1 +964 -0
  63. data/man/doing.1.html +711 -0
  64. data/man/doing.1.ronn +600 -0
  65. data/package-lock.json +3 -0
  66. data/rdoc_to_mmd.rb +42 -0
  67. data/rdocfixer.rb +13 -0
  68. data/scripts/generate_bash_completions.rb +211 -0
  69. data/scripts/generate_fish_completions.rb +204 -0
  70. data/scripts/generate_zsh_completions.rb +168 -0
  71. metadata +82 -7
  72. data/lib/doing/helpers.rb +0 -191
  73. data/lib/doing/markdown_export.rb +0 -16
data/man/doing.1.html ADDED
@@ -0,0 +1,711 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv='content-type' value='text/html;charset=utf8'>
5
+ <meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
6
+ <title>doing(1) - doing(1) Command line time tracking</title>
7
+ <style type='text/css' media='all'>
8
+ /* style: man */
9
+ body#manpage {margin:0}
10
+ .mp {max-width:100ex;padding:0 9ex 1ex 4ex}
11
+ .mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
12
+ .mp h2 {margin:10px 0 0 0}
13
+ .mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
14
+ .mp h3 {margin:0 0 0 4ex}
15
+ .mp dt {margin:0;clear:left}
16
+ .mp dt.flush {float:left;width:8ex}
17
+ .mp dd {margin:0 0 0 9ex}
18
+ .mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
19
+ .mp pre {margin-bottom:20px}
20
+ .mp pre+h2,.mp pre+h3 {margin-top:22px}
21
+ .mp h2+pre,.mp h3+pre {margin-top:5px}
22
+ .mp img {display:block;margin:auto}
23
+ .mp h1.man-title {display:none}
24
+ .mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
25
+ .mp h2 {font-size:16px;line-height:1.25}
26
+ .mp h1 {font-size:20px;line-height:2}
27
+ .mp {text-align:justify;background:#fff}
28
+ .mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
29
+ .mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
30
+ .mp u {text-decoration:underline}
31
+ .mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
32
+ .mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
33
+ .mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
34
+ .mp b.man-ref {font-weight:normal;color:#434241}
35
+ .mp pre {padding:0 4ex}
36
+ .mp pre code {font-weight:normal;color:#434241}
37
+ .mp h2+pre,h3+pre {padding-left:0}
38
+ ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
39
+ ol.man-decor {width:100%}
40
+ ol.man-decor li.tl {text-align:left}
41
+ ol.man-decor li.tc {text-align:center;letter-spacing:4px}
42
+ ol.man-decor li.tr {text-align:right;float:right}
43
+ </style>
44
+ </head>
45
+ <!--
46
+ The following styles are deprecated and will be removed at some point:
47
+ div#man, div#man ol.man, div#man ol.head, div#man ol.man.
48
+
49
+ The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
50
+ .man-navigation should be used instead.
51
+ -->
52
+ <body id='manpage'>
53
+ <div class='mp' id='man'>
54
+
55
+ <div class='man-navigation' style='display:none'>
56
+ <a href="#SYNOPSIS">SYNOPSIS</a>
57
+ <a href="#DESCRIPTION">DESCRIPTION</a>
58
+ <a href="#USAGE">USAGE</a>
59
+ <a href="#CONFIGURATION">CONFIGURATION</a>
60
+ <a href="#EXTRAS">EXTRAS</a>
61
+ </div>
62
+
63
+ <ol class='man-decor man-head man head'>
64
+ <li class='tl'>doing(1)</li>
65
+ <li class='tc'></li>
66
+ <li class='tr'>doing(1)</li>
67
+ </ol>
68
+
69
+ <h1>doing(1) Command line time tracking</h1>
70
+ <h2 id="SYNOPSIS">SYNOPSIS</h2>
71
+
72
+ <p><code>doing [global options] command [command options] [arguments...]</code></p>
73
+
74
+ <h2 id="DESCRIPTION">DESCRIPTION</h2>
75
+
76
+ <p><em>A command line tool for remembering what you were doing and tracking what you've done.</em></p>
77
+
78
+ <p><code>doing</code> is a basic CLI for adding and listing "what was I doing" reminders in a <a href="https://www.taskpaper.com">TaskPaper-formatted</a> text file. It allows for multiple sections/categories, tag-based time tracking, and flexible output formatting.</p>
79
+
80
+ <h2 id="USAGE">USAGE</h2>
81
+
82
+ <pre><code>doing [global options] command [command options] [arguments...]
83
+ </code></pre>
84
+
85
+ <h3 id="GLOBAL-OPTIONS-">GLOBAL OPTIONS:</h3>
86
+
87
+ <pre><code>-f, --doing_file=arg - Specify a different doing_file (default: none)
88
+ --help - Show this message
89
+ --[no-]notes - Output notes if included in the template (default: enabled)
90
+ --stdout - Send results report to STDOUT instead of STDERR
91
+ --version - Display the program version
92
+ -x, --[no-]noauto - Exclude auto tags and default tags
93
+ </code></pre>
94
+
95
+ <h3 id="COMMANDS-">COMMANDS:</h3>
96
+
97
+ <pre><code>help - Shows a list of commands and global options
98
+ help [command] - Shows help for any command (`doing help now`)
99
+
100
+
101
+ add_section - Add a new section to the "doing" file
102
+ again, resume - Repeat last entry as new entry
103
+ archive - Move entries between sections
104
+ cancel - End last X entries with no time tracked
105
+ choose - Select a section to display from a menu
106
+ colors - List available color variables for configuration templates and views
107
+ config - Edit the configuration file
108
+ done, did - Add a completed item with @done(date). No argument finishes last entry.
109
+ finish - Mark last X entries as @done
110
+ grep, search - Search for entries
111
+ import - Import entries from an external source
112
+ last - Show the last entry, optionally edit
113
+ later - Add an item to the Later section
114
+ mark, flag - Mark last entry as highlighted
115
+ meanwhile - Finish any running @meanwhile tasks and optionally create a new one
116
+ note - Add a note to the last entry
117
+ now, next - Add an entry
118
+ on - List entries for a date
119
+ open - Open the "doing" file in an editor
120
+ recent - List recent entries
121
+ sections - List sections
122
+ select - Display an interactive menu to perform operations (requires fzf)
123
+ show - List all entries
124
+ since - List entries since a date
125
+ tag - Add tag(s) to last entry
126
+ template - Output HTML and CSS templates for customization
127
+ today - List entries from today
128
+ undo - Undo the last change to the doing_file
129
+ view - Display a user-created view
130
+ views - List available custom views
131
+ yesterday - List entries from yesterday
132
+ </code></pre>
133
+
134
+ <h2 id="CONFIGURATION">CONFIGURATION</h2>
135
+
136
+ <p>Run <code>doing config</code> to open your <code>~/.doingrc</code> file in the editor defined in the <code>$EDITOR</code> environment variable. Set up your <code>doing_file</code> right away (where you want entries to be stored), and cover the rest after you've read the docs.</p>
137
+
138
+ <p>See the <a href="#SUPPORT" data-bare-link="true">SUPPORT</a> section below for troubleshooting details.</p>
139
+
140
+ <h3 id="THE-DOING-FILE">THE DOING FILE</h3>
141
+
142
+ <p>The file that stores all of your entries is generated the first time you add an entry (with <code>doing now</code> or <code>doing later</code>). By default, the file is created in <code>~/what_was_i_doing.md</code>, but you can modify this in the config file.</p>
143
+
144
+ <p>The format of the "doing" file is TaskPaper-compatible. You can edit it by hand at any time (in TaskPaper or any text editor), but it uses a specific format for parsing, so be sure to maintain the dates and pipe characters.</p>
145
+
146
+ <p>Notes are anything in the list without a leading hyphen and date. They belong to the entry directly before them, and they should be indented one level beyond the parent item.</p>
147
+
148
+ <p>When using the <code>now</code> and <code>later</code> commands on the command line, you can start the entry with a quote and hit return, then type the note and close the quote. Anything after the first line will be turned into a TaskPaper-compatible note for the task and can be displayed in templates using <code>%note</code>.</p>
149
+
150
+ <p>Notes can be prevented from ever appearing in output with the global option <code>--no-notes</code>: <code>doing --no-notes show all</code>.</p>
151
+
152
+ <p>Auto tagging (adding tags listed in .doingrc under <code>autotag</code> and <code>default_tags</code>) can be skipped for an entry with the <code>-x</code> global option: <code>doing -x done skipping some automatic tagging</code>.</p>
153
+
154
+ <h3 id="CONFIGURATION-OPTIONS">CONFIGURATION OPTIONS</h3>
155
+
156
+ <p>A basic configuration looks like this:</p>
157
+
158
+ <pre><code>---
159
+ doing_file: /Users/username/Dropbox/doing.taskpaper
160
+ current_section: Currently
161
+ default_template: '%date: %title%note'
162
+ default_date_format: '%Y-%m-%d %H:%M'
163
+ marker_tag: flagged
164
+ marker_color: yellow
165
+ tags_color: boldcyan
166
+ default_tags: []
167
+ editor_app: TaskPaper
168
+ config_editor_app: Sublime Text
169
+ :include_notes: true
170
+ views:
171
+ color:
172
+ date_format: '%F %_I:%M%P'
173
+ section: Currently
174
+ count: 10
175
+ wrap_width: 0
176
+ template: '%boldblack%date %boldgreen| %boldwhite%title%default%note'
177
+ order: desc
178
+ templates:
179
+ default:
180
+ date_format: '%Y-%m-%d %H:%M'
181
+ template: '%date | %title%note'
182
+ wrap_width: 0
183
+ today:
184
+ date_format: '%_I:%M%P'
185
+ template: '%date: %title%odnote'
186
+ wrap_width: 0
187
+ last:
188
+ date_format: '%_I:%M%P on %a'
189
+ template: '%title (at %date)%odnote'
190
+ wrap_width: 0
191
+ recent:
192
+ date_format: '%_I:%M%P'
193
+ template: '%date &gt; %title%odnote'
194
+ wrap_width: 50
195
+ autotag:
196
+ whitelist:
197
+ - coding
198
+ - design
199
+ synonyms:
200
+ brainstorming:
201
+ - thinking
202
+ - idea
203
+ html_template:
204
+ haml:
205
+ css:
206
+ </code></pre>
207
+
208
+ <p>The config file is stored in <code>~/.doingrc</code>, and a skeleton file is created on the first run. Just run <code>doing</code> on its own to create the file.</p>
209
+
210
+ <h3 id="PER-FOLDER-CONFIGURATION">PER-FOLDER CONFIGURATION</h3>
211
+
212
+ <p>Any options found in a <code>.doingrc</code> anywhere in the hierarchy between your current folder and your home folder will be appended to the base configuration, overriding or extending existing options. This allows you to put a <code>.doingrc</code> file into the base of a project and add specific configurations (such as default tags) when working in that project on the command line. These can be cascaded, with the closest <code>.doingrc</code> to your current directory taking precedence, though I'm not sure why you'd want to deal with that.</p>
213
+
214
+ <p>Possible uses:</p>
215
+
216
+ <ul>
217
+ <li>Define custom HTML output on a per-project basis using the html_template option for custom templates. Customize time tracking reports based on project or client.</li>
218
+ <li>Define <code>default_tags</code> for a project so that every time you <code>doing now</code> from within that project directory or its subfolders, it gets tagged with that project automatically.</li>
219
+ </ul>
220
+
221
+
222
+ <p>Any part of the configuration can be copied into these local files and modified. You only need to include the parts you want to change or add.</p>
223
+
224
+ <h3 id="DOING-FILE-LOCATION">DOING FILE LOCATION</h3>
225
+
226
+ <p>The one thing you'll probably want to adjust is the file that the notes are stored in. That's the <code>doing_file</code> key:</p>
227
+
228
+ <pre><code>doing_file: /Users/username/Dropbox/nvALT2.2/?? What was I doing.md
229
+ </code></pre>
230
+
231
+ <p>I keep mine in my nvALT folder for quick access and syncing between machines. If desired, you can give it a <code>.taskpaper</code> extension to make it more recognizable to other applications. (If you do that in nvALT, make sure to add <code>taskpaper</code> as a recognized extension in preferences).</p>
232
+
233
+ <h3 id="CURRENT-ACTIONS-SECTION">CURRENT ACTIONS SECTION</h3>
234
+
235
+ <p>You can rename the section that holds your current tasks. By default, this is <code>Currently</code>, but if you have some other bright idea, feel free:</p>
236
+
237
+ <pre><code>current_section: Currently
238
+ </code></pre>
239
+
240
+ <h3 id="DEFAULT-EDITORS">DEFAULT EDITORS</h3>
241
+
242
+ <p>The setting <code>editor_app</code> only applies to Mac OS X users. It's the default application that the command <code>doing open</code> will open your WWID file in. Personally, I use <code>editor_app: TaskPaper</code>. If this is blank, it will be opened by whatever the system default is for the doing file extension (default is <code>.md</code>), or you can use <code>-a app_name</code> or <code>-b bundle_id</code> to override.</p>
243
+
244
+ <p>You can define a separate app to open the config file in when running <code>doing config</code>. The key for this is <code>config_editor_app</code>.</p>
245
+
246
+ <p>In the case of the <code>doing now -e</code> command, your <code>$EDITOR</code> environment variable will be used to complete the entry text and notes. Set it in your <code>~/.bash_profile</code> or whatever is appropriate for your system:</p>
247
+
248
+ <pre><code>export EDITOR="mate -w"
249
+ </code></pre>
250
+
251
+ <p>The only requirements are that your editor be launchable from the command line and able to "wait." In the case of Sublime Text and TextMate, just use <code>-w</code> like this: <code>export EDITOR="subl -w"</code>.</p>
252
+
253
+ <h3 id="TEMPLATES">TEMPLATES</h3>
254
+
255
+ <p>The config also contains templates for various command outputs. Include placeholders by placing a % before the keyword. The available tokens are:</p>
256
+
257
+ <ul>
258
+ <li><code>%title</code>: the "what was I doing" entry line</li>
259
+ <li><code>%date</code>: the date based on the template's <code>date_format</code> setting</li>
260
+ <li><code>%shortdate</code>: a custom date formatter that removes the day/month/year from the entry if they match the current day/month/year</li>
261
+ <li><code>%note</code>: Any note in the entry will be included here, a newline and tabs are automatically added.</li>
262
+ <li><code>%odnote</code>: The notes with a leading tab removed (outdented note)</li>
263
+ <li><code>%chompnote</code>: Notes on one line, beginning and trailing whitespace removed.</li>
264
+ <li><code>%section</code>: The section/project the entry is currently in</li>
265
+ <li><code>%hr</code>: a horizontal rule (<code>-</code>) the width of the terminal</li>
266
+ <li><code>%hr_under</code>: a horizontal rule (<code>_</code>) the width of the terminal</li>
267
+ <li><code>%n</code>: inserts a newline</li>
268
+ <li><code>%t</code>: inserts a tab</li>
269
+ <li><code>%[color]</code>: color can be <code>black</code>, <code>red</code>, <code>green</code>, <code>blue</code>, <code>yellow</code>, <code>magenta</code>, <code>cyan</code>, or <code>white</code>
270
+
271
+ <ul>
272
+ <li>you can prefix <code>bg</code> to affect background colors (<code>%bgyellow</code>)</li>
273
+ <li>prefix <code>bold</code> and <code>boldbg</code> for strong colors (<code>%boldgreen</code>, <code>%boldbgblue</code>)</li>
274
+ <li>there are some random special combo colors. Use <code>doing colors</code> to see the list</li>
275
+ </ul>
276
+ </li>
277
+ <li><code>%interval</code>: when used with the <code>-t</code> switch on the <code>show</code> command, it will display the time between a timestamp or <em>@start(date)</em> tag and the <em>@done(date)</em> tag, if it exists. Otherwise, it will remain empty.</li>
278
+ </ul>
279
+
280
+
281
+ <p>Date formats are based on Ruby <a href="http://www.ruby-doc.org/stdlib-2.1.1/libdoc/date/rdoc/Date.html#method-i-strftime"><code>strftime</code></a> formatting.</p>
282
+
283
+ <p>My normal template for the <code>recent</code> command looks like this:</p>
284
+
285
+ <pre><code>recent:
286
+ date_format: '%_I:%M%P'
287
+ template: '%date &gt; %title%odnote'
288
+ wrap_width: 88
289
+ </code></pre>
290
+
291
+ <p>And it outputs:</p>
292
+
293
+ <pre><code>$ doing recent 3
294
+ 4:30am &gt; Made my `console` script smarter...
295
+ Checks first argument to see if it's a file, if it is, that's the log
296
+
297
+ Else, it checks the first argument for a ".log" suffix and does a search in the user
298
+ application logs with `find` for it.
299
+
300
+ Otherwise, system.log.
301
+
302
+ I also made an awesome Cope wrapper for it...
303
+ 12:00pm &gt; Working on `doing` again.
304
+ 12:45pm &gt; I think this thing (doing) is ready to document and distribute
305
+ $
306
+ </code></pre>
307
+
308
+ <p>You can get pretty clever and include line breaks and other formatting inside of double quotes. If you want multiline templates, just use <code>\n</code> in the template line, and after the next run it will be rewritten as proper YAML automatically.</p>
309
+
310
+ <p>For example, this block:</p>
311
+
312
+ <pre><code>recent:
313
+ date_format: '%_I:%M%P'
314
+ template: "\n%hr\n%date\n &gt; %title%odnote\n%hr_under"
315
+ wrap_width: 100
316
+ </code></pre>
317
+
318
+ <p>will rewrite to:</p>
319
+
320
+ <pre><code>recent:
321
+ date_format: '%_I:%M%P'
322
+ template: |2-
323
+
324
+ %hr
325
+ %date
326
+ &gt; %title%odnote
327
+ %hr_under
328
+ wrap_width: 100
329
+ </code></pre>
330
+
331
+ <p>and output my recent entries like this:</p>
332
+
333
+ <pre><code>$ doing recent 3
334
+ -----------------------------------------------------------------------
335
+ 4:30am
336
+ &gt; Made my `console` script smarter...
337
+ Checks first argument to see if it's a file, if it is, that's the log
338
+
339
+ Else, it checks the first argument for a ".log" suffix and does a search in the user application
340
+ logs with `find` for it.
341
+
342
+ Otherwise, system.log.
343
+
344
+ I also made an awesome Cope wrapper for it...
345
+ _______________________________________________________________________
346
+
347
+ -----------------------------------------------------------------------
348
+ 12:00pm
349
+ &gt; Working on `doing` again.
350
+ _______________________________________________________________________
351
+
352
+ -----------------------------------------------------------------------
353
+ 12:45pm
354
+ &gt; I think this thing (doing) is ready to document and distribute
355
+ _______________________________________________________________________
356
+
357
+ $
358
+ </code></pre>
359
+
360
+ <h3 id="CUSTOM-VIEWS">CUSTOM VIEWS</h3>
361
+
362
+ <p>You can create your own "views" in the <code>~/.doingrc</code> file and view them with <code>doing view view_name</code>. Just add a section like this:</p>
363
+
364
+ <pre><code>views:
365
+ old:
366
+ section: Old
367
+ count: 5
368
+ wrap_width: 0
369
+ date_format: '%F %_I:%M%P'
370
+ template: '%date | %title%note'
371
+ order: asc
372
+ tags: done finished cancelled
373
+ tags_bool: ANY
374
+ </code></pre>
375
+
376
+ <p>You can add additional custom views. Just nest them under the <code>views</code> key (indented two spaces from the edge). Multiple views would look like this:</p>
377
+
378
+ <pre><code>views:
379
+ later:
380
+ section: Later
381
+ count: 5
382
+ wrap_width: 60
383
+ date_format: '%F %_I:%M%P'
384
+ template: '%date | %title%note'
385
+ old:
386
+ section: Old
387
+ count: 5
388
+ wrap_width: 0
389
+ date_format: '%F %_I:%M%P'
390
+ template: '%date | %title%note'
391
+ </code></pre>
392
+
393
+ <p>The <code>section</code> key is the default section to pull entries from. Count and section can be overridden at runtime with the <code>-c</code> and <code>-s</code> flags. Setting <code>section</code> to <code>All</code> will combine all sections in the output.</p>
394
+
395
+ <p>You can add new sections with <code>doing add_section section_name</code>. You can also create them on the fly by using the <code>-s section_name</code> flag when running <code>doing now</code>. For example, <code>doing now -s Misc just a random side note</code> would create the "just a random side note" entry in a new section called "Misc," if Misc didn't already exist.</p>
396
+
397
+ <p>The <code>tags</code> and <code>tags_bool</code> keys allow you to specify tags that the view is filtered by. You can list multiple tags separated by spaces, and then use <code>tags_bool</code> to specify <code>ALL</code>, <code>ANY</code>, or <code>NONE</code> to determine how it handles the multiple tags.</p>
398
+
399
+ <p>The <code>order</code> key defines the sort order of the output. This is applied <em>after</em> the tasks are retrieved and cut off at the maximum number specified in <code>count</code>.</p>
400
+
401
+ <p>Regarding colors, you can use them to create very nice displays if you're outputting to a color terminal. Example:</p>
402
+
403
+ <pre><code>color:
404
+ date_format: '%F %_I:%M%P'
405
+ section: Currently
406
+ count: 10
407
+ wrap_width: 0
408
+ template: '%boldblack%date %boldgreen| %boldwhite%title%default%note'
409
+ </code></pre>
410
+
411
+ <p>You can also specify a default output format for a view. Most of the optional output formats override the template specification (<code>html</code>, <code>csv</code>, <code>json</code>). If the <code>view</code> command is used with the <code>-o</code> flag, it will override what's specified in the file.</p>
412
+
413
+ <h3 id="COLORS">COLORS</h3>
414
+
415
+ <p>You can use the following colors in view templates. Set a foreground color with a named color:</p>
416
+
417
+ <pre><code>%black
418
+ %red
419
+ %green
420
+ %yellow
421
+ %blue
422
+ %magenta
423
+ %cyan
424
+ %white
425
+ </code></pre>
426
+
427
+ <p>You can also add a background color (<code>%bg[color]</code>) by placing one after the foreground color:</p>
428
+
429
+ <pre><code>%white%bgblack
430
+ %black%bgred
431
+ ...etc.
432
+ </code></pre>
433
+
434
+ <p>There are bold variants for both foreground and background colors</p>
435
+
436
+ <pre><code>%boldblack
437
+ %boldred
438
+ ... etc.
439
+
440
+ %boldbgblack
441
+ %boldbgred
442
+ ... etc.
443
+ </code></pre>
444
+
445
+ <p>And a few special colors you'll just have to try out to see (or just run <code>doing colors</code>):</p>
446
+
447
+ <pre><code>%softpurple
448
+ %hotpants
449
+ %knightrider
450
+ %flamingo
451
+ %yeller
452
+ %whiteboard
453
+ </code></pre>
454
+
455
+ <p>Any time you use one of the foreground colors it will reset the bold and background settings to their default automatically. You can force a reset to default terminal colors using <code>%default</code>.</p>
456
+
457
+ <h3 id="HTML-TEMPLATES">HTML TEMPLATES</h3>
458
+
459
+ <p>For commands that provide an HTML output option, you can customize the templates used for markup and CSS. The markup uses <a href="http://haml.info/">HAML</a>, and the styles are pure CSS.</p>
460
+
461
+ <p>To export the default configurations for customization, use <code>doing templates --type=[HAML|CSS]</code>. This will output to STDOUT where you can pipe it to a file, e.g. <code>doing templates --type=HAML &gt; my_template.haml</code>. You can modify the markup, the CSS, or both.</p>
462
+
463
+ <p>Once you have either or both of the template files, edit <code>.doingrc</code> and look for the <code>html_template:</code> section. There are two subvalues, <code>haml:</code> and <code>css:</code>. Add the path to the templates you want to use. A tilde may be substituted for your home directory, e.g. <code>css: ~/styles/doing.css</code>.</p>
464
+
465
+ <h3 id="AUTOTAGGING">AUTOTAGGING</h3>
466
+
467
+ <p>Keywords in your entries can trigger automatic tagging, just to make life easier. There are three tools available: default tags, whitelisting, and synonym tagging.</p>
468
+
469
+ <p>Default tags are tags that are applied to every entry. You probably don't want to add these in the root configuration, but using a local <code>.doingrc</code> in a project directory that defines default tags for that project allows anything added from that directory to be tagged automatically. A local <code>.doingrc</code> in my Marked development directory might contain:</p>
470
+
471
+ <pre><code>---
472
+ default_tags: [marked,coding]
473
+ </code></pre>
474
+
475
+ <p>And anything I enter while in the directory gets tagged with <em>@marked</em> and <em>@coding</em>.</p>
476
+
477
+ <p>A whitelist is a list of words that should be converted directly into <em>@tags</em>. If my whitelist contains "design" and I type <code>doing now working on site design</code>, that's automatically converted to "working on site @design."</p>
478
+
479
+ <p>Synonyms allow you to define keywords that will trigger their parent tag. If I have a tag called <em>@design</em>, I can add "typography" as a synonym. Then entering <code>doing now working on site typography</code> will become "working on site typography @design."</p>
480
+
481
+ <p>White lists and synonyms are defined like this:</p>
482
+
483
+ <pre><code>autotag:
484
+ synonyms:
485
+ design:
486
+ - typography
487
+ - layout
488
+ brainstorming
489
+ - thinking
490
+ - idea
491
+ whitelist:
492
+ - brainstorming
493
+ - coding
494
+ </code></pre>
495
+
496
+ <p>Note that you can include a tag with synonyms in the whitelist as well to tag it directly when used.</p>
497
+
498
+ <p><em><strong>Adding entries:</strong></em></p>
499
+
500
+ <pre><code>now, did - Add an entry
501
+ later - Add an item to the Later section
502
+ done - Add a completed item with @done(date). No argument finishes last entry.
503
+ meanwhile - Finish any @meanwhile tasks and optionally create a new one
504
+ again, resume - Duplicate the last entry as new entry (without @done tag)
505
+ </code></pre>
506
+
507
+ <p>The <code>doing now</code> command can accept <code>-s section_name</code> to send the new entry straight to a non-default section. It also accepts <code>--back=AMOUNT</code> to let you specify a start date in the past using "natural language." For example, <code>doing now --back=25m ENTRY</code> or <code>doing now --back="yesterday 3:30pm" ENTRY</code>.</p>
508
+
509
+ <p>If you want to use <code>--back</code> with <code>doing done</code> but want the end time to be different than the start time, you can either use <code>--took</code> in addition, or just use <code>--took</code> on its own as it will backdate the start time such that the end time is now and the duration is equal to the value of the <code>--took</code> argument.</p>
510
+
511
+ <p>You can finish the last unfinished task when starting a new one using <code>doing now</code> with the <code>-f</code> switch. It will look for the last task not marked <em>@done</em> and add the <em>@done</em> tag with the start time of the new task (either the current time or what you specified with <code>--back</code>).</p>
512
+
513
+ <p><code>doing done</code> is used to add an entry that you've already completed. Like <code>now</code>, you can specify a section with <code>-s section_name</code>. You can also skip straight to Archive with <code>-a</code>.</p>
514
+
515
+ <p><code>doing done</code> can also backdate entries using natural language with <code>--back 15m</code> or <code>--back "3/15 3pm"</code>. That will modify the starting timestamp of the entry. You can also use <code>--took 1h20m</code> or <code>--took 1:20</code> to set the finish date based on a "natural language" time interval. If <code>--took</code> is used without <code>--back</code>, then the start date is adjusted (<code>--took</code> interval is subtracted) so that the completion date is the current time.</p>
516
+
517
+ <p>When used with <code>doing done</code>, <code>--back</code> and <code>--took</code> allow time intervals to be accurately counted when entering items after the fact. <code>--took</code> is also available for the <code>doing finish</code> command, but cannot be used in conjunction with <code>--back</code>. (In <code>finish</code> they both set the end date, and neither has priority. <code>--back</code> allows specific days/times, <code>--took</code> uses time intervals.)</p>
518
+
519
+ <p>All of these commands accept a <code>-e</code> argument. This opens your command line editor (as defined in the environment variable <code>$EDITOR</code>). Add your entry, save the temp file, and close it. The new entry is added. Anything after the first line is included as a note on the entry.</p>
520
+
521
+ <p><code>doing again</code> (or <code>doing resume</code>) will duplicate the last @done entry (most recently completed) with a new start date (and without the @done tag). To resume the last entry matching specific tags, use <code>--tag=TAG</code>. You can specify multiple tags by separating with a comma. Multiple tags are combined with 'AND' by default (all tags must exist on the entry to match), but you can use <code>--bool=</code> to set it to 'OR' or 'NOT'. By default the new entry will be added to the same section as the matching entry, but you can specify a section with <code>--in=SECTION</code>.</p>
522
+
523
+ <p><code>doing meanwhile</code> is a special command for creating and finishing tasks that may have other entries come before they're complete. When you create an entry with <code>doing meanwhile [entry text]</code>, it will automatically complete the last <em>@meanwhile</em> item (dated <em>@done</em> tag) and add the <em>@meanwhile</em> tag to the new item. This allows time tracking on a more general basis, and still lets you keep track of the smaller things you do while working on an overarching project. The <code>meanwhile</code> command accepts <code>--back [time]</code> and will backdate the <em>@done</em> tag and start date of the new task at the same time. Running <code>meanwhile</code> with no arguments will simply complete the last <em>@meanwhile</em> task.</p>
524
+
525
+ <p>See <code>doing help meanwhile</code> for more options.</p>
526
+
527
+ <p><em><strong>Modifying entries:</strong></em></p>
528
+
529
+ <pre><code>finish - Mark last X entries as @done
530
+ cancel - Mark last X entries as @done without completion date
531
+ tag - Tag last entry
532
+ note - Add a note to the last entry
533
+ </code></pre>
534
+
535
+ <p><em><strong>Finishing</strong></em></p>
536
+
537
+ <p><code>doing finish</code> by itself is the same as <code>doing done</code> by itself. It adds <em>@done(timestamp)</em> to the last entry. It also accepts a numeric argument to complete X number of tasks back in history. Add <code>-a</code> to also archive the affected entries.</p>
538
+
539
+ <p><code>doing finish</code> also provides an <code>--auto</code> flag, which you can use to set the end time of any entry to 1 minute before the start time of the next. Running a command such as <code>doing finish --auto 10</code> will go through the last 10 entries and sequentially update any without a <em>@done</em> tag with one set to the time just before the next entry in the list.</p>
540
+
541
+ <p>As mentioned above, <code>finish</code> also accepts <code>--back "2 hours"</code> (sets the finish date from time now minus interval) or <code>--took 30m</code> (sets the finish date to time started plus interval) so you can accurately add times to completed tasks, even if you don't do it in the moment.</p>
542
+
543
+ <p>Both <code>done</code> and <code>finish</code> accept an <code>--archive</code> switch which immediately moves the completed entries to the Archive section with a <code>@from(Project)</code> tag.</p>
544
+
545
+ <p>You can finish the last entry containing a specific tag or combination of tags using the <code>--tag</code> flag. Multiple tags are separated by commas. By default tags are combined with an AND boolean, meaning the entry must contain all specified tags to be considered. For example, to finish the last entry containing both "@work" and "@project1", you would use:</p>
546
+
547
+ <pre><code>doing finish --tag=work,project1
548
+ </code></pre>
549
+
550
+ <p>You can change the boolean using <code>--bool=OR</code> (last entry containing any of the specified tags) or <code>--bool=NOT</code> (last entry containing none of the tags).</p>
551
+
552
+ <p>You can also include a <code>--no-date</code> switch to add <code>@done</code> without a finish date, meaning no time is tracked for the task. <code>doing cancel</code> is an alias for this. Like <code>finish</code>, <code>cancel</code> accepts a count to act on the last X entries, as well as <code>--archive</code> and <code>--section</code> options. <code>cancel</code> also accepts the <code>--tag</code> and <code>--bool</code> flags for tag filtering.</p>
553
+
554
+ <p><em><strong>Tagging and Autotagging</strong></em></p>
555
+
556
+ <p><code>tag</code> adds one or more tags to the last entry, or specify a count with <code>-c X</code>. Tags are specified as basic arguments, separated by spaces. For example:</p>
557
+
558
+ <pre><code>doing tag -c 3 client cancelled
559
+ </code></pre>
560
+
561
+ <p>... will mark the last three entries as <em>@client @cancelled</em>. Add <code>-r</code> as a switch to remove the listed tags instead.</p>
562
+
563
+ <p>You can optionally define keywords for common tasks and projects in your <code>.doingrc</code> file. When these keywords appear in an item title, they'll automatically be converted into @tags. The <code>whitelist</code> tags are exact (but case insensitive) matches.</p>
564
+
565
+ <p>You can also define <code>synonyms</code>, which will add a tag at the end based on keywords associated with it. When defining <code>synonym</code> keys, be sure to indent but <em>not</em> hyphenate the keys themselves, while hyphenating the list of synonyms at the same indent level as their key. See <code>playing</code> and <code>writing</code> in the example below for illustration. Follow standard YAML syntax.</p>
566
+
567
+ <p>To add autotagging, include a section like this in your <code>~/.doingrc</code> file:</p>
568
+
569
+ <pre><code>autotag:
570
+ whitelist:
571
+ - doing
572
+ - mindmeister
573
+ - marked
574
+ - playing
575
+ - working
576
+ - writing
577
+ synonyms:
578
+ playing:
579
+ - hacking
580
+ - tweaking
581
+ - toying
582
+ - messing
583
+ writing:
584
+ - blogging
585
+ - posting
586
+ - publishing
587
+ </code></pre>
588
+
589
+ <p><em><strong>Tag transformation</strong></em></p>
590
+
591
+ <p>You can include a <code>transform</code> section in the autotag config which contains pairs of regular expressions and replacement patterns separated by a colon. These will be used to look at existing tags in the text and generate additional tags from them. For example:</p>
592
+
593
+ <p> autotag:
594
+ transform:
595
+ - (\w+)-\d+:$1</p>
596
+
597
+ <p>This creates a search pattern looking for a string of word characters followed by a hyphen and one or more digits, e.g. <code>@projecttag-12</code>. Do not include the @ symbol in the pattern. The replacement (<code>$1</code>) indicates that the first matched group (in parenthesis) should be used to generate the new tag, resulting in <code>@projecttag</code> being added to the entry.</p>
598
+
599
+ <p><em><strong>Annotating</strong></em></p>
600
+
601
+ <p><code>note</code> lets you append a note to the last entry. You can specify a section to grab the last entry from with <code>-s section_name</code>. <code>-e</code> will open your <code>$EDITOR</code> for typing the note, but you can also just include it on the command line after any flags. You can also pipe a note in on STDIN (<code>echo "fun stuff"|doing note</code>). If you don't use the <code>-r</code> switch, new notes will be appended to the existing notes, and using the <code>-e</code> switch will let you edit and add to an existing note. The <code>-r</code> switch will remove/replace a note; if there's new note text passed when using the <code>-r</code> switch, it will replace any existing note. If the <code>-r</code> switch is used alone, any existing note will be removed.</p>
602
+
603
+ <p>You can also add notes at the time of entry by using the <code>-n</code> or <code>--note</code> flag with <code>doing now</code>, <code>doing later</code>, or <code>doing done</code>. If you pass text to any of the creation commands which has multiple lines, everything after the first line break will become the note.</p>
604
+
605
+ <p>If a string passed to <code>now</code>, <code>later</code>, or <code>done</code> has a parenthetical at the end, the parenthetical will be removed from the title and its contents added as a note. So <code>doing now Working on @project1 (Adding some unit tests)</code> would create an entry titled "Working on @project1" with a note "Adding some unit tests." This is the equivalent of <code>doing now Working on @project1 -n "Adding some unit tests"</code>.</p>
606
+
607
+ <p><em><strong>Displaying entries:</strong></em></p>
608
+
609
+ <pre><code>show - List all entries
610
+ recent - List recent entries
611
+ today - List entries from today
612
+ yesterday - List entries from yesterday
613
+ last - Show the last entry
614
+ grep - Show entries matching text or pattern
615
+ </code></pre>
616
+
617
+ <p><code>doing show</code> on its own will list all entries in the "Currently" section. Add a section name as an argument to display that section instead. Use "all" to display all entries from all sections.</p>
618
+
619
+ <p>You can filter the <code>show</code> command by tags. Simply list them after the section name (or <code>all</code>). The boolean defaults to <code>ANY</code>, meaning any entry that contains any of the listed tags will be shown. You can use <code>-b ALL</code> or <code>-b NONE</code> to change the filtering behavior: <code>doing show all done cancelled -b NONE</code> will show all tasks from all sections that do not have either <em>@done</em> or <em>@cancelled</em> tags.</p>
620
+
621
+ <p>Use <code>-c X</code> to limit the displayed results. Combine it with <code>-a newest</code> or <code>-a oldest</code> to choose which chronological end it trims from. You can also set the sort order of the output with <code>-s asc</code> or <code>-s desc</code>.</p>
622
+
623
+ <p>The <code>show</code> command can also show the time spent on a task if it has a <em>@done(date)</em> tag with the <code>-t</code> option. This requires that you include a <code>%interval</code> token in template -> default in the config. You can also include <em>@start(date)</em> tags, which override the timestamp when calculating the intervals.</p>
624
+
625
+ <p>If you have a use for it, you can use <code>-o csv</code> on the show or view commands to output the results as a comma-separated CSV to STDOUT. Redirect to a file to save it: <code>doing show all done -o csv &gt; ~/Desktop/done.csv</code>. You can do the same with <code>-o json</code>.</p>
626
+
627
+ <p><code>doing yesterday</code> is great for stand-ups (thanks to <a href="https://github.com/sc68cal">Sean Collins</a> for that!). Note that you can show yesterday's activity from an alternate section by using the section name as an argument (e.g. <code>doing yesterday archive</code>).</p>
628
+
629
+ <p><code>doing on</code> allows for full date ranges and filtering. <code>doing on saturday</code>, or <code>doing on one month to today</code> will give you ranges. You can use the same terms with the <code>show</code> command by adding the <code>-f</code> or <code>--from</code> flag. <code>doing show @done --from "monday to friday"</code> will give you all of your completed items for the last week (assuming it's the weekend).</p>
630
+
631
+ <p>You can also show entries matching a search string with <code>doing grep</code> (synonym <code>doing search</code>). If you want to search with regular expressions or for an exact match, surround your search query with forward slashes, e.g. <code>doing search /project name/</code>. If you pass a search string without slashes, it's treated as a fuzzy search string, meaning matches can be found as long as the characters in the search string are in order and with no more than three other characters between each. By default searches are across all sections, but you can limit it to one with the <code>-s SECTION_NAME</code> flag. Searches can be displayed with the default template, or output as HTML, CSV, or JSON.</p>
632
+
633
+ <p><em><strong>Modifying the last entry</strong></em></p>
634
+
635
+ <p>If you want to make a change to the last entry added, use <code>doing last -e</code>. The <code>-e</code> flag opens the last entry (including note) in your editor, and when you close your editor, your doing file will be updated with any changes you made to the entry.</p>
636
+
637
+ <p>You can choose the last entry in a specific section by including the <code>-s</code> flag, so <code>doing last -s Later -e</code> would edit the most recent entry in the Later section.</p>
638
+
639
+ <p>You can also use text search or a tag filter to get an entry earlier than the most recent one. A tag search with <code>doing last --tag=project1 -e</code> will edit the last entry tagged <code>@project1</code>. Multiple tags can be combined with commas, and you can use <code>--bool</code> to specify whether the search is <code>AND</code> (matches all tags given), <code>OR</code> (matches any tag given), or <code>NOT</code> (matches none of the tags).</p>
640
+
641
+ <p>You can edit the last entry that matches a search string with <code>--search=QUERY</code>. <code>QUERY</code> can either be a raw string, or you can surround it with slashes to search by regex (<code>doing last --search="/project./" -e</code>). If the string is raw text, fuzzy matching will be used, so the characters must be in order but can be separated by up to three other characters.</p>
642
+
643
+ <p>Both <code>--tag</code> and <code>--search</code> can be constrained to a single section with <code>-s SECTION</code>.</p>
644
+
645
+ <p><em><strong>Views</strong></em></p>
646
+
647
+ <pre><code>view - Display a user-created view
648
+ views - List available custom views
649
+ </code></pre>
650
+
651
+ <p>Display any of the custom views you make in <code>~/.doingrc</code> with the <code>view</code> command. Use <code>doing views</code> to get a list of available views. Any time a section or view is specified on the command line, fuzzy matching will be used to find the closest match. Thus, <code>lat</code> will match <code>Later</code>, etc..</p>
652
+
653
+ <p><em><strong>Sections</strong></em></p>
654
+
655
+ <pre><code>sections - List sections
656
+ choose - Select a section to display from a menu
657
+ add_section - Add a new section to the "doing" file
658
+ </code></pre>
659
+
660
+ <p><em><strong>Utilities</strong></em></p>
661
+
662
+ <pre><code>archive - Move entries between sections
663
+ open - Open the "doing" file in an editor (OS X)
664
+ config - Edit the default configuration
665
+ </code></pre>
666
+
667
+ <p><em><strong>Archiving</strong></em></p>
668
+
669
+ <pre><code>COMMAND OPTIONS
670
+ -k, --keep=arg - Count to keep (ignored if archiving by tag) (default: 5)
671
+ -t, --to=arg - Move entries to (default: Archive)
672
+ -b, --bool=arg - Tag boolean (default: AND)
673
+ </code></pre>
674
+
675
+ <p>The <code>archive</code> command will move entries from one section (default: <code>Currently</code>) to another section (default: <code>Archive</code>).</p>
676
+
677
+ <p><code>doing archive</code> on its own will move all but the most recent 5 entries from <code>currently</code> into the archive.</p>
678
+
679
+ <p><code>doing archive other_section</code> will archive from <code>other_section</code> to <code>Archive</code>.</p>
680
+
681
+ <p><code>doing archive other_section -t alternate</code> will move from <code>other_section</code> to <code>alternate</code>. You can use the <code>-k</code> flag on any of these to change the number of items to leave behind. To move everything, use <code>-k 0</code>.</p>
682
+
683
+ <p>You can also use tags to archive. You define the section first, and anything following it is treated as tags. If your first argument starts with <code>@</code>, it will assume all sections and assume any following arguments are tags.</p>
684
+
685
+ <p>By default, tag archiving uses an <code>AND</code> boolean, meaning all the tags listed must exist on the entry for it to be moved. You can change this behavior with <code>-b OR</code> or <code>-b NONE</code> (<code>ALL</code> and <code>ANY</code> also work).</p>
686
+
687
+ <p>Example: Archive all Currently items for <em>@client</em> that are marked <em>@done</em></p>
688
+
689
+ <pre><code>doing archive @client @done
690
+ </code></pre>
691
+
692
+ <h2 id="EXTRAS">EXTRAS</h2>
693
+
694
+ <h3 id="SHELL-COMPLETION">SHELL COMPLETION</h3>
695
+
696
+ <p><strong>Bash:</strong> See the file <a href="https://github.com/ttscoff/doing/blob/master/doing.completion.bash"><code>doing.completion.bash</code></a> in the git repository for full bash completion. Thanks to <a href="https://github.com/fcrespo82">fcrespo82</a> for getting it <a href="https://gist.github.com/fcrespo82/9609318">started</a>.</p>
697
+
698
+ <p><strong>Zsh:</strong> See the file <a href="https://github.com/ttscoff/doing/blob/master/doing.completion.zsh"><code>doing.completion.zsh</code></a> in the git repository for zsh completion. Courtesy of <a href="https://github.com/gabeanzelini">Gabe Anzelini</a>.</p>
699
+
700
+ <p><strong>Fish:</strong> See the file <a href="https://github.com/ttscoff/doing/blob/master/doing.fish"><code>doing.fish</code></a> in the git repository for Fish completion. This is the least complete of all of the completions, but it will autocomplete the first level of subcommands, and your custom sections and views for the <code>doing show</code> and <code>doing view</code> commands.</p>
701
+
702
+
703
+ <ol class='man-decor man-foot man foot'>
704
+ <li class='tl'></li>
705
+ <li class='tc'>October 2021</li>
706
+ <li class='tr'>doing(1)</li>
707
+ </ol>
708
+
709
+ </div>
710
+ </body>
711
+ </html>