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/README.md CHANGED
@@ -2,20 +2,13 @@
2
2
 
3
3
  **A command line tool for remembering what you were doing and tracking what you've done.**
4
4
 
5
- _If you're one of the rarev people like me who find this useful, feel free to [buy me some coffee](http://brettterpstra.com/donate/)._
5
+ _If you're one of the rare people like me who find this useful, feel free to [buy me some coffee](http://brettterpstra.com/donate/)._
6
6
 
7
- ## Contents
7
+ <!--README-->
8
8
 
9
- - [What and why](#what-and-why)
10
- - [Installation](#installation)
11
- - [The "doing" file](#the-doing-file)
12
- - [Configuration](#configuration)
13
- - [Usage](#usage)
14
- - [Extras](#extras)
15
- - [Troubleshooting](#troubleshooting)
16
- - [Changelog](#changelog)
9
+ The current version of `doing` is <!--VER-->2.0.5<!--END VER-->.
17
10
 
18
- <!--README-->
11
+ Find all of the documentation in the [doing wiki](https://github.com/ttscoff/doing/wiki).
19
12
 
20
13
  ## What and why
21
14
 
@@ -23,659 +16,13 @@ _If you're one of the rarev people like me who find this useful, feel free to [b
23
16
 
24
17
  While I'm working, I have hourly reminders to record what I'm working on, and I try to remember to punch in quick notes if I'm unexpectedly called away from a project. I can do this just by typing `doing now tracking down the CG bug`.
25
18
 
26
- If there's something I want to look at later but doesn't need to be added to a task list or tracker, I can type `doing later check out the pinboard bookmarks from macdrifter`. When I get back to my computer --- or just need a refresher after a distraction --- I can type `doing last` to see what the last thing on my plate was. I can also type `doing recent` (or just `doing`) to get a list of the last few entries. `doing today` gives me everything since midnight for the current day, making it easy to see what I've accomplished over a sleepless night.
27
-
28
- ## Installation
29
-
30
- The current version of `doing` is <!--VER-->1.0.92<!--END VER-->.
31
-
32
- $ [sudo] gem install doing
33
-
34
- Only use `sudo` if your environment requires it. If you're using the system Ruby on a Mac, for example, it will likely be necessary. If `gem install doing` fails, then run `sudo gem install doing` and provide your administrator password.
35
-
36
- Run `doing config` to open your `~/.doingrc` file in the editor defined in the `$EDITOR` environment variable. Set up your `doing_file` right away (where you want entries to be stored), and cover the rest after you've read the docs.
37
-
38
- See the [support](#support) section below for troubleshooting details.
39
-
40
- ## The "doing" file
41
-
42
- The file that stores all of your entries is generated the first time you add an entry (with `doing now` or `doing later`). By default, the file is created in `~/what_was_i_doing.md`, but you can modify this in the config file.
43
-
44
- 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.
45
-
46
- 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.
47
-
48
- When using the `now` and `later` 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 `%note`.
49
-
50
- Notes can be prevented from ever appearing in output with the global option `--no-notes`: `doing --no-notes show all`.
51
-
52
- Auto tagging (adding tags listed in .doingrc under `autotag` and `default_tags`) can be skipped for an entry with the `-x` global option: `doing -x done skipping some automatic tagging`.
53
-
54
- ## Configuration
55
-
56
- A basic configuration looks like this:
57
-
58
- ---
59
- doing_file: /Users/username/Dropbox/doing.taskpaper
60
- current_section: Currently
61
- default_template: '%date: %title%note'
62
- default_date_format: '%Y-%m-%d %H:%M'
63
- marker_tag: flagged
64
- marker_color: yellow
65
- tags_color: boldcyan
66
- default_tags: []
67
- editor_app: TaskPaper
68
- config_editor_app: Sublime Text
69
- :include_notes: true
70
- views:
71
- color:
72
- date_format: '%F %_I:%M%P'
73
- section: Currently
74
- count: 10
75
- wrap_width: 0
76
- template: '%boldblack%date %boldgreen| %boldwhite%title%default%note'
77
- order: desc
78
- templates:
79
- default:
80
- date_format: '%Y-%m-%d %H:%M'
81
- template: '%date | %title%note'
82
- wrap_width: 0
83
- today:
84
- date_format: '%_I:%M%P'
85
- template: '%date: %title%odnote'
86
- wrap_width: 0
87
- last:
88
- date_format: '%_I:%M%P on %a'
89
- template: '%title (at %date)%odnote'
90
- wrap_width: 0
91
- recent:
92
- date_format: '%_I:%M%P'
93
- template: '%date > %title%odnote'
94
- wrap_width: 50
95
- count: 10
96
- autotag:
97
- whitelist:
98
- - coding
99
- - design
100
- synonyms:
101
- brainstorming:
102
- - thinking
103
- - idea
104
- html_template:
105
- haml:
106
- css:
107
- markdown:
108
-
109
-
110
- The config file is stored in `~/.doingrc`, and a skeleton file is created on the first run. Just run `doing` on its own to create the file.
111
-
112
- ### Per-folder configuration
113
-
114
- Any options found in a `.doingrc` 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 `.doingrc` 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 `.doingrc` to your current directory taking precedence, though I'm not sure why you'd want to deal with that.
115
-
116
- Possible uses:
117
-
118
- - Define custom HTML or Markdown output on a per-project basis using the html_template option for custom templates. Customize time tracking reports based on project or client.
119
- - Define `default_tags` for a project so that every time you `doing now` from within that project directory or its subfolders, it gets tagged with that project automatically.
120
-
121
- 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.
122
-
123
- ### Doing file location
124
-
125
- The one thing you'll probably want to adjust is the file that the notes are stored in. That's the `doing_file` key:
126
-
127
- doing_file: /Users/username/Dropbox/nvALT2.2/?? What was I doing.md
128
-
129
- I keep mine in my nvALT folder for quick access and syncing between machines. If desired, you can give it a `.taskpaper` extension to make it more recognizable to other applications. (If you do that in nvALT, make sure to add `taskpaper` as a recognized extension in preferences).
130
-
131
- ### "Current actions" section
132
-
133
- You can rename the section that holds your current tasks. By default, this is `Currently`, but if you have some other bright idea, feel free:
134
-
135
- current_section: Currently
136
-
137
- ### Default editors
138
-
139
- The setting `editor_app` only applies to Mac OS X users. It's the default application that the command `doing open` will open your WWID file in. Personally, I use `editor_app: TaskPaper`. If this is blank, it will be opened by whatever the system default is for the doing file extension (default is `.md`), or you can use `-a app_name` or `-b bundle_id` to override.
140
-
141
- You can define a separate app to open the config file in when running `doing config`. The key for this is `config_editor_app`.
142
-
143
- In the case of the `doing now -e` command, your `$EDITOR` environment variable will be used to complete the entry text and notes. Set it in your `~/.bash_profile` or whatever is appropriate for your system:
144
-
145
- export EDITOR="mate -w"
146
-
147
- 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 `-w` like this: `export EDITOR="subl -w"`.
148
-
149
- ### Templates
150
-
151
- The config also contains templates for various command outputs. Include placeholders by placing a % before the keyword. The available tokens are:
152
-
153
- - `%title`: the "what was I doing" entry line
154
- - `%date`: the date based on the template's `date_format` setting
155
- - `%shortdate`: a custom date formatter that removes the day/month/year from the entry if they match the current day/month/year
156
- - `%note`: Any note in the entry will be included here, a newline and tabs are automatically added.
157
- - `%odnote`: The notes with a leading tab removed (outdented note)
158
- - `%chompnote`: Notes on one line, beginning and trailing whitespace removed.
159
- - `%section`: The section/project the entry is currently in
160
- - `%hr`: a horizontal rule (`-`) the width of the terminal
161
- - `%hr_under`: a horizontal rule (`_`) the width of the terminal
162
- - `%n`: inserts a newline
163
- - `%t`: inserts a tab
164
- - `%[color]`: color can be `black`, `red`, `green`, `blue`, `yellow`, `magenta`, `cyan`, or `white`
165
- - you can prefix `bg` to affect background colors (`%bgyellow`)
166
- - prefix `bold` and `boldbg` for strong colors (`%boldgreen`, `%boldbgblue`)
167
- - there are some random special combo colors. Use `doing colors` to see the list
168
- - `%interval`: when used with the `-t` switch on the `show` command, it will display the time between a timestamp or _@start(date)_ tag and the _@done(date)_ tag, if it exists. Otherwise, it will remain empty.
169
-
170
- Date formats are based on Ruby [`strftime`](http://www.ruby-doc.org/stdlib-2.1.1/libdoc/date/rdoc/Date.html#method-i-strftime) formatting. You can try it out [here](http://strftime.net).
171
-
172
- My normal template for the `recent` command looks like this:
173
-
174
- recent:
175
- date_format: '%_I:%M%P'
176
- template: '%date > %title%odnote'
177
- wrap_width: 88
178
-
179
- And it outputs:
180
-
181
- $ doing recent 3
182
- 4:30am > Made my `console` script smarter...
183
- Checks first argument to see if it's a file, if it is, that's the log
184
-
185
- Else, it checks the first argument for a ".log" suffix and does a search in the user
186
- application logs with `find` for it.
187
-
188
- Otherwise, system.log.
189
-
190
- I also made an awesome Cope wrapper for it...
191
- 12:00pm > Working on `doing` again.
192
- 12:45pm > I think this thing (doing) is ready to document and distribute
193
- $
194
-
195
- You can get pretty clever and include line breaks and other formatting inside of double quotes. If you want multi-line templates, just use `\n` in the template line, and after the next run it will be rewritten as proper YAML automatically.
196
-
197
- For example, this block:
198
-
199
- recent:
200
- date_format: '%_I:%M%P'
201
- template: "\n%hr\n%date\n > %title%odnote\n%hr_under"
202
- wrap_width: 100
203
-
204
- will rewrite to:
205
-
206
- recent:
207
- date_format: '%_I:%M%P'
208
- template: |2-
209
-
210
- %hr
211
- %date
212
- > %title%odnote
213
- %hr_under
214
- wrap_width: 100
215
-
216
- and output my recent entries like this:
217
-
218
- $ doing recent 3
219
- -----------------------------------------------------------------------
220
- 4:30am
221
- > Made my `console` script smarter...
222
- Checks first argument to see if it's a file, if it is, that's the log
223
-
224
- Else, it checks the first argument for a ".log" suffix and does a search in the user application
225
- logs with `find` for it.
226
-
227
- Otherwise, system.log.
228
-
229
- I also made an awesome Cope wrapper for it...
230
- _______________________________________________________________________
231
-
232
- -----------------------------------------------------------------------
233
- 12:00pm
234
- > Working on `doing` again.
235
- _______________________________________________________________________
236
-
237
- -----------------------------------------------------------------------
238
- 12:45pm
239
- > I think this thing (doing) is ready to document and distribute
240
- _______________________________________________________________________
241
-
242
- $
243
-
244
- The recent template can include a `count` key to specify the number of entries shown when run without an argument. Default is 10.
245
-
246
- ### Custom views
247
-
248
- You can create your own "views" in the `~/.doingrc` file and view them with `doing view view_name`. Just add a section like this:
249
-
250
- views:
251
- old:
252
- section: Archive
253
- count: 5
254
- wrap_width: 0
255
- date_format: '%F %_I:%M%P'
256
- template: '%date | %title%note'
257
- order: asc
258
- tags: done finished cancelled
259
- tags_bool: ANY
260
- only_timed: false
261
- tag_sort: time
262
- tag_order: asc
263
- totals: true
264
-
265
- You can add additional custom views. Just nest them under the `views` key (indented two spaces from the edge). Multiple views would look like this:
266
-
267
- views:
268
- later:
269
- section: Later
270
- count: 5
271
- wrap_width: 60
272
- date_format: '%F %_I:%M%P'
273
- template: '%date | %title%note'
274
- old:
275
- section: Old
276
- count: 5
277
- wrap_width: 0
278
- date_format: '%F %_I:%M%P'
279
- template: '%date | %title%note'
280
-
281
- The `section` key is the default section to pull entries from. Count and section can be overridden at runtime with the `-c` and `-s` flags. Setting `section` to `All` will combine all sections in the output.
282
-
283
- You can add new sections with `doing add_section section_name`. You can also create them on the fly by using the `-s section_name` flag when running `doing now`. For example, `doing now -s Misc just a random side note` would create the "just a random side note" entry in a new section called "Misc," if Misc didn't already exist.
284
-
285
- The `tags` and `tags_bool` keys allow you to specify tags that the view is filtered by. You can list multiple tags separated by spaces, and then use `tags_bool` to specify `ALL`, `ANY`, or `NONE` to determine how it handles the multiple tags.
286
-
287
- The `order` key defines the sort order of the output (asc or desc). This is applied _after_ the tasks are retrieved and cut off at the maximum number specified in `count`.
288
-
289
- You can include tag timers and totals in the output with `totals: true`. Control tag output using `tag_sort` (name or title) and `tag_order` (asc or desc). You can also output only timed entries using `only_timed: true`. All of these options can be overridden using flags on the `doing view` command.
290
-
291
- Regarding colors, you can use them to create very nice displays if you're outputting to a color terminal. Example:
292
-
293
- color:
294
- date_format: '%F %_I:%M%P'
295
- section: Currently
296
- count: 10
297
- wrap_width: 0
298
- template: '%boldblack%date %boldgreen| %boldwhite%title%default%note'
299
-
300
- Outputs:
301
-
302
- ![](http://ckyp.us/XKpj+)
303
-
304
- You can also specify a default output format for a view. Most of the optional output formats override the template specification (`html`, `csv`, `json`, `markdown`). If the `view` command is used with the `-o` flag, it will override what's specified for the view in the config.
305
-
306
- ### Colors
307
-
308
- You can use the following colors in view templates. Set a foreground color with a named color:
309
-
310
- %black
311
- %red
312
- %green
313
- %yellow
314
- %blue
315
- %magenta
316
- %cyan
317
- %white
318
-
319
- You can also add a background color (`%bg[color]`) by placing one after the foreground color:
320
-
321
- %white%bgblack
322
- %black%bgred
323
- ...etc.
324
-
325
- There are bold variants for both foreground and background colors
326
-
327
- %boldblack
328
- %boldred
329
- ... etc.
330
-
331
- %boldbgblack
332
- %boldbgred
333
- ... etc.
334
-
335
- And a few special colors you'll just have to try out to see (or just run `doing colors`):
336
-
337
- %softpurple
338
- %hotpants
339
- %knightrider
340
- %flamingo
341
- %yeller
342
- %whiteboard
343
-
344
- 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 `%default`.
345
-
346
- ### HTML/Markdown Templates
347
-
348
- For commands that provide an HTML or Markdown output option, you can customize the templates used for markup and CSS. The HTML markup uses [HAML](http://haml.info/), and the styles are pure CSS. The Markdown template uses Ruby ERB templating.
349
-
350
- To export the default configurations for customization, use `doing templates --type=[HAML|CSS|MARKDOWN]`. This will output to STDOUT where you can pipe it to a file, e.g. `doing templates --type=HAML > my_template.haml`. You can modify the markup, the CSS, or both.
351
-
352
- Once you have a template file prepared, edit `.doingrc` and look for the `html_template:` section. There are three sub-values, `haml:`, `css:`, and `markdown:`. Add the template paths to the appropriate keys. A tilde may be substituted for your home directory, e.g. `css: ~/styles/doing.css`.
353
-
354
- ### Autotagging
355
-
356
- Keywords in your entries can trigger automatic tagging, just to make life easier. There are three tools available: default tags, whitelisting, and synonym tagging.
357
-
358
- 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 `.doingrc` in a project directory that defines default tags for that project allows anything added from that directory to be tagged automatically. A local `.doingrc` in my Marked development directory might contain:
359
-
360
- ---
361
- default_tags: [marked,coding]
362
-
363
- And anything I enter while in the directory gets tagged with _@marked_ and _@coding_.
364
-
365
- A whitelist is a list of words that should be converted directly into _@tags_. If my whitelist contains "design" and I type `doing now working on site design`, that's automatically converted to "working on site @design."
366
-
367
- Synonyms allow you to define keywords that will trigger their parent tag. If I have a tag called _@design_, I can add "typography" as a synonym. Then entering `doing now working on site typography` will become "working on site typography @design."
368
-
369
- White lists and synonyms are defined like this:
370
-
371
- autotag:
372
- synonyms:
373
- design:
374
- - typography
375
- - layout
376
- brainstorming
377
- - thinking
378
- - idea
379
- whitelist:
380
- - brainstorming
381
- - coding
382
-
383
- Note that you can include a tag with synonyms in the whitelist as well to tag it directly when used.
384
-
385
- ## Usage
386
-
387
- doing [global options] command [command options] [arguments...]
388
-
389
- ### Global options:
390
-
391
- -f, --doing_file=arg - Specify a different doing_file (default: none)
392
- --help - Show this message
393
- --[no-]notes - Output notes if included in the template (default: enabled)
394
- --stdout - Send results report to STDOUT instead of STDERR
395
- --version - Display the program version
396
- -x, --[no-]noauto - Exclude auto tags and default tags
397
-
398
- ### Commands:
399
-
400
- help - Shows a list of commands and global options
401
- help [command] - Shows help for any command (`doing help now`)
402
-
403
- #### Adding entries:
404
-
405
- now, next - Add an entry
406
- later - Add an item to the Later section
407
- done, did - Add a completed item with @done(date). No argument finishes last entry.
408
- meanwhile - Finish any @meanwhile tasks and optionally create a new one
409
- again, resume - Duplicate the last entry as new entry (without @done tag)
410
-
411
- ##### now
412
-
413
- The `doing now` command adds an entry to the "Currently" section by default. It accepts `-s section_name` to send the new entry straight to a non-default section. It also accepts `--back=AMOUNT` to let you specify a start date in the past using "natural language." For example, `doing now --back=25m ENTRY` or `doing now --back="yesterday 3:30pm" ENTRY`.
414
-
415
- You can finish the last unfinished task when starting a new one using `doing now` with the `-f` switch. It will look for the last task not marked _@done_ and add the _@done_ tag with the start time of the new task (either the current time or what you specified with `--back`).
416
-
417
- > __Examples:__
418
- >
419
- > - `doing now Working on project X` --- Add a new entry at the current time
420
- > - `doing now --section=Projects Working on @projectX` --- Add a new entry to a section titled "Projects"
421
- > - `doing now --back 30m` --- Add a new entry with a backdated start time, indicating you've been working on it for 30 minutes already
422
- > - `doing now --back 8am` --- Backdate a new entry to a specific time
423
- > - `doing now -f Starting the next thing` --- Add a new entry at the current time, and add a @done tag to the previous item with the current time as its completion date
424
- > - `doing now -f --back 30m Working on something new` --- Add a new entry and complete the last entry, but use a timestamp from 30 minutes ago for both.
425
-
426
- ##### done/finish
19
+ If there's something I want to look at later but doesn't need to be added to a task list or tracker, I can type `doing later check out the pinboard bookmarks from macdrifter`. When I get back to my computer --- or just need a refresher after a distraction --- I can type `doing last` to see what the last thing on my plate was. I can also type `doing recent` (or just `doing`) to get a list of the last few entries. `doing today` gives me everything since midnight for the current day, making it easy to see what I've accomplished over a sleepless night.
427
20
 
428
- `doing done` is used to add an entry that you've already completed. Like `now`, you can specify a section with `-s section_name`. You can also skip straight to the Archive with `-a`.
21
+ Doing has over 30 commands for tracking your status, recording your time, and analyzing the results.
429
22
 
430
- `doing done` can also backdate entries using natural language with `--back 15m` or `--back "3/15 3pm"`. That will modify the starting timestamp of the entry. Used on its own, it will set the start date, and the finish date will be the current time. You can also use `--took 1h20m` or `--took 1:20` to set the finish date based on a "natural language" time interval. If `--took` is used without `--back`, then the start date is adjusted (`--took` interval is subtracted) so that the completion date is the current time.
23
+ See [the wiki](https://github.com/ttscoff/doing/wiki) for installation and usage instructions.
431
24
 
432
- When used with `doing done`, `--back` and `--took` allow time intervals to be accurately counted when entering items after the fact. `--took` is also available for the `doing finish` command, but cannot be used in conjunction with `--back`. (In `finish` they both set the end date, and neither has priority. `--back` allows specific days/times, `--took` uses time intervals.)
433
-
434
- > __Examples:__
435
- >
436
- > - `doing done --back 1h The thing I just did` --- Add an entry for a completed task that you started an hour ago and just finished
437
- > - `doing done --back 1h --took 20m The thing I just finished` --- Record an entry you started an hour ago and finished 20 minutes later
438
- > - `doing done --took 20m` --- Finish the last task but change the finish date so that the total elapsed time is only 20 minutes (if the finish date would be in the future, start date will be adjusted accordingly)
439
-
440
- All of these commands accept a `-e` argument. This opens your command line editor (as defined in the environment variable `$EDITOR`). 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.
441
-
442
- `doing again` (or `doing resume`) 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 `--tag=TAG`. 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 `--bool=` 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 `--in=SECTION`.
443
-
444
- `doing meanwhile` 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 `doing meanwhile [entry text]`, it will automatically complete the last _@meanwhile_ item (dated _@done_ tag) and add the _@meanwhile_ 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 `meanwhile` command accepts `--back [time]` and will backdate the _@done_ tag and start date of the new task at the same time. Running `meanwhile` with no arguments will simply complete the last _@meanwhile_ task.
445
-
446
- See `doing help meanwhile` for more options.
447
-
448
- #### Modifying entries:
449
-
450
- finish - Mark last X entries as @done
451
- cancel - Mark last X entries as @done without completion date
452
- tag - Tag last entry
453
- note - Add a note to the last entry
454
-
455
- ##### Finishing
456
-
457
- `doing finish` by itself is the same as `doing done` by itself. It adds _@done(timestamp)_ to the last entry. It also accepts a numeric argument to complete X number of tasks back in history (0 affects all entries). Add `-a` to also archive the affected entries.
458
-
459
- `doing finish` also provides an `--auto` 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 `doing finish --auto 10` will go through the last 10 entries and sequentially update any without a _@done_ tag with one set to the time just before the next entry in the list.
460
-
461
- As mentioned above, `finish` also accepts `--back "2 hours"` (sets the finish date from time now minus interval) or `--took 30m` (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.
462
-
463
- Both `done` and `finish` accept an `--archive` switch which immediately moves the completed entries to the Archive section with a `@from(Project)` tag.
464
-
465
- You can finish the last entry containing a specific tag or combination of tags using the `--tag` 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:
466
-
467
- doing finish --tag=work,project1
468
-
469
- You can change the boolean using `--bool=OR` (last entry containing any of the specified tags) or `--bool=NOT` (last entry containing none of the tags).
470
-
471
- You can also include a `--no-date` switch to add `@done` without a finish date, meaning no time is tracked for the task. `doing cancel` is an alias for this. Like `finish`, `cancel` accepts a count to act on the last X entries, as well as `--archive` and `--section` options. `cancel` also accepts the `--tag` and `--bool` flags for tag filtering.
472
-
473
- By default `doing finish` works on a single entry, the last entry or the most recent entry matching a `--tag` or `--search` query. Specifying `doing finish 10` would finish any unfinished entries within the last 10 entries. In the case of `--tag` or `--search` queries, the count serves as the maximum number of matches doing will act on, sorted in reverse date order (most recent first). A count of 0 will disable the limit entirely, acting on all matching entries.
474
-
475
- Both `finish` and `cancel` accept `--unfinished` as an argument. This causes them to act on the last entry not already marked @done, no matter how far back it's dated or how many @done entries come after it. You can use `doing finish --unfinished X -s SECTION` to finish the last X unfinished entries in SECTION.
476
-
477
- ##### Tagging and Autotagging
478
-
479
- `tag` adds one or more tags to the last entry, or specify a count with `-c X`. Tags are specified as basic arguments, separated by spaces. For example:
480
-
481
- doing tag -c 3 client cancelled
482
-
483
- ... will mark the last three entries as _@client @cancelled_. Add `-r` as a switch to remove the listed tags instead.
484
-
485
- You can optionally define keywords for common tasks and projects in your `.doingrc` file. When these keywords appear in an item title, they'll automatically be converted into @tags. The `whitelist` tags are exact (but case insensitive) matches.
486
-
487
- You can also define `synonyms`, which will add a tag at the end based on keywords associated with it. When defining `synonym` keys, be sure to indent but _not_ hyphenate the keys themselves, while hyphenating the list of synonyms at the same indent level as their key. See `playing` and `writing` in the example below for illustration. Follow standard YAML syntax.
488
-
489
- To add autotagging, include a section like this in your `~/.doingrc` file:
490
-
491
- autotag:
492
- whitelist:
493
- - doing
494
- - mindmeister
495
- - marked
496
- - playing
497
- - working
498
- - writing
499
- synonyms:
500
- playing:
501
- - hacking
502
- - tweaking
503
- - toying
504
- - messing
505
- writing:
506
- - blogging
507
- - posting
508
- - publishing
509
-
510
- ###### Tag transformation
511
-
512
- You can include a `transform` 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:
513
-
514
- autotag:
515
- transform:
516
- - (\w+)-\d+:$1
517
-
518
- This creates a search pattern looking for a string of word characters followed by a hyphen and one or more digits, e.g. `@projecttag-12`. Do not include the @ symbol in the pattern. The replacement (`$l`) indicates that the first matched group (in parenthesis) should be used to generate the new tag, resulting in `@projecttag` being added to the entry.
519
-
520
- ##### Annotating
521
-
522
- `note` lets you append a note to the last entry. You can specify a section to grab the last entry from with `-s section_name`. `-e` will open your `$EDITOR` 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 (`echo "fun stuff"|doing note`). If you don't use the `-r` switch, new notes will be appended to the existing notes, and using the `-e` switch will let you edit and add to an existing note. The `-r` switch will remove/replace a note; if there's new note text passed when using the `-r` switch, it will replace any existing note. If the `-r` switch is used alone, any existing note will be removed.
523
-
524
- You can also add notes at the time of entry by using the `-n` or `--note` flag with `doing now`, `doing later`, or `doing done`. If you pass text to any of the creation commands which has multiple lines, everything after the first line break will become the note.
525
-
526
- If a string passed to `now`, `later`, or `done` has a parenthetical at the end, the parenthetical will be removed from the title and its contents added as a note. So `doing now Working on @project1 (Adding some unit tests)` would create an entry titled "Working on @project1" with a note "Adding some unit tests." This is the equivalent of `doing now Working on @project1 -n "Adding some unit tests"`.
527
-
528
- #### Displaying entries:
529
-
530
- show - List all entries
531
- recent - List recent entries
532
- today - List entries from today
533
- yesterday - List entries from yesterday
534
- last - Show the last entry
535
- grep - Show entries matching text or pattern
536
-
537
- `doing show` 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.
538
-
539
- You can filter the `show` command by tags. Simply list them after the section name (or `all`). The boolean defaults to `ANY`, meaning any entry that contains any of the listed tags will be shown. You can use `-b ALL` or `-b NONE` to change the filtering behavior: `doing show all done cancelled -b NONE` will show all tasks from all sections that do not have either _@done_ or _@cancelled_ tags.
540
-
541
- Use `-c X` to limit the displayed results. Combine it with `-a newest` or `-a oldest` to choose which chronological end it trims from. You can also set the sort order of the output with `-s asc` or `-s desc`.
542
-
543
- The `show` command can also show the time spent on a task if it has a _@done(date)_ tag with the `-t` option. This requires that you include a `%interval` token in template -> default in the config. You can also include _@start(date)_ tags, which override the timestamp when calculating the intervals.
544
-
545
- If you have a use for it, you can use `-o csv` on the show or view commands to output the results as a comma-separated CSV to STDOUT. Redirect to a file to save it: `doing show all done -o csv > ~/Desktop/done.csv`. You can do the same with `-o json`.
546
-
547
- `doing yesterday` is great for stand-ups (thanks to [Sean Collins](https://github.com/sc68cal) for that!). Note that you can show yesterday's activity from an alternate section by using the section name as an argument (e.g. `doing yesterday archive`).
548
-
549
- All of the display commands (view, show, today, yesterday, search) support date ranges in addition to other filtering options. Results can be narrowed to a date/time span using `--before DATE` and `--after DATE`. The `DATE` accepts a natural language string but works best in formats like `10/20/21` or `2021-05-13 3pm` (or shortened to just `5/13 3pm`). For the `today` and `yesterday` commands the `DATE` should just be a time, e.g. `12pm` or `15:00`, and results will be filtered within the timespan for just that day. Both flags are optional, and you can use just `--before` to get everything older than a certain date, or use just `--after` to get everything newer.
550
-
551
- `doing on` allows for full date ranges and filtering. `doing on saturday`, or `doing on one month to today` will give you ranges. You can use the same terms with the `show` command by adding the `-f` or `--from` flag. `doing show @done --from "monday to friday"` will give you all of your completed items for the last week (assuming it's the weekend). There's also `doing since` a simple alias for `doing on PAST_DATE to now`, e.g. `doing since monday`.
552
-
553
- You can also show entries matching a search string with `doing grep` (synonym `doing search`). If you want to search with regular expressions or for an exact match, surround your search query with forward slashes, e.g. `doing search /project name/`. 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 `-s SECTION_NAME` flag. Searches can be displayed with the default template, or output as HTML, Markdown, CSV, or JSON.
554
-
555
- ##### Modifying the last entry
556
-
557
- If you want to make a change to the last entry added, use `doing last -e`. The `-e` 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.
558
-
559
- You can choose the last entry in a specific section by including the `-s` flag, so `doing last -s Later -e` would edit the most recent entry in the Later section.
560
-
561
- You can also use text search or a tag filter to get an entry earlier than the most recent one. A tag search with `doing last --tag=project1 -e` will edit the last entry tagged `@project1`. Multiple tags can be combined with commas, and you can use `--bool` to specify whether the search is `AND` (matches all tags given), `OR` (matches any tag given), or `NOT` (matches none of the tags).
562
-
563
- You can edit the last entry that matches a search string with `--search=QUERY`. `QUERY` can either be a raw string, or you can surround it with slashes to search by regex (`doing last --search="/project./" -e`). 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.
564
-
565
- Both `--tag` and `--search` can be constrained to a single section with `-s SECTION`.
566
-
567
- #### Views
568
-
569
- view - Display a user-created view
570
- views - List available custom views
571
-
572
- Display any of the custom views you make in `~/.doingrc` with the `view` command. Use `doing views` 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, `lat` will match `Later`, etc..
573
-
574
- #### Sections
575
-
576
- sections - List sections
577
- choose - Select a section to display from a menu
578
- add_section - Add a new section to the "doing" file
579
-
580
- #### Utilities
581
-
582
- archive - Move entries between sections
583
- open - Open the "doing" file in an editor (OS X)
584
- config - Edit the default configuration
585
-
586
- #### Archiving
587
-
588
- COMMAND OPTIONS
589
- -k, --keep=arg - Count to keep (ignored if archiving by tag) (default: 5)
590
- -t, --to=arg - Move entries to (default: Archive)
591
- -b, --bool=arg - Tag boolean (default: AND)
592
-
593
- The `archive` command will move entries from one section (default: `Currently`) to another section (default: `Archive`).
594
-
595
- `doing archive` on its own will move all but the most recent 5 entries from `currently` into the archive.
596
-
597
- `doing archive other_section` will archive from `other_section` to `Archive`.
598
-
599
- `doing archive other_section -t alternate` will move from `other_section` to `alternate`. You can use the `-k` flag on any of these to change the number of items to leave behind. To move everything, use `-k 0`.
600
-
601
- 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 `@`, it will assume all sections and assume any following arguments are tags.
602
-
603
- By default, tag archiving uses an `AND` boolean, meaning all the tags listed must exist on the entry for it to be moved. You can change this behavior with `-b OR` or `-b NONE` (`ALL` and `ANY` also work).
604
-
605
- Example: Archive all Currently items for _@client_ that are marked _@done_
606
-
607
- doing archive @client @done
608
-
609
- ##### Importing
610
-
611
- Doing can currently only import tasks from Timing.app reports. If you want to sync up your Doing file with Timing's tracking:
612
-
613
- 1. Open Timing and go to Reports
614
- 2. Set the date span you want to import into doing
615
- 3. Group by Project, Then by None
616
- 4. Include Tasks with Title, (not as subgroup), Timespan, and Notes
617
- 5. Uncheck App Usage
618
- 6. Set File Format to JSON and Duration format to "XX:YY:ZZ"
619
- 7. Include short entries if desired
620
- 8. Export the report to a new file
621
-
622
- Now you can run `doing import --type timing -s SECTION PATH`, where SECTION is the name of the section you want to import the entries to (defaults to Currently), and PATH is the path to the JSON file. You can also add a tag (or tags) to all entries, or a custom prefix.
623
-
624
- (`--type timing` is the only option right now, so it doesn't need to be included)
625
-
626
- # Import entries to Projects section and add @timing to all new entries
627
- doing import -s Projects --tag=timing "~/Desktop/All Activities.json"
628
-
629
- # Import to default section (Currently) and prefix entries with '[Imported]'
630
- doing import --prefix="[Imported]" "~/Desktop/All Activities.json"
631
-
632
- #### Interactive Usage
633
-
634
- FuzzyFileFinder (`fzf`) is included with doing (<https://github.com/junegunn/fzf>), and you can use `doing select` to get a menu of all your items (or items in a given section) which can be searched with fuzzy matching. The menu allows multiple selections to be acted on directly.
635
-
636
- To use the menu, type a search string or use the arrow keys to navigate up and down. Tip: searching is "fuzzy" by default, but you can start your search with a single quote (`'`) to force an exact match. Press tab on an entry you'd like to perform an action on. A marker will show up on the left indicating the entry is selected. Repeat the process and select as many entries as needed. When you hit Return, the selection will be passed back to doing. Use Control-A to select all visible entries.
637
-
638
- Doing can perform several functions with this menu. Not all of doing's features are available, but the core functionality you'd need is there, plus you can open the selected entries on one page in your text editor, make changes to them, and when you save and close the entries are updated accordingly. This allows editing of everything from timestamps to tags to notes.
639
-
640
- If no actions are specified, an interactive menu of options will be
641
- presented.
642
-
643
- Run `doing help select` for a list of options:
644
-
645
- -a, --archive - Archive selected items
646
- -c, --cancel - Cancel selected items (add @done without timestamp)
647
- -d, --delete - Delete selected items
648
- -e, --editor - Edit selected item(s)
649
- -f, --finish - Add @done with current time to selected item(s)
650
- --flag - Add flag to selected item(s)
651
- -m, --move=SECTION - Move selected items to section (default: none)
652
- -o, --output=FORMAT - Output format for export (doing|taskpaper|csv|html|json|template|timeline) (default: none)
653
- -q, --query=QUERY - Initial search query for filtering (default: none)
654
- -r, --remove - Reverse -c, -f, --flag, and -t (remove instead of adding)
655
- -s, --section=SECTION - Select from a specific section (default: none)
656
- --save_to=FILE - Save selected entries to file using --output format (default: none)
657
- -t, --tag=TAG - Tag selected entries (default: none)
658
-
659
- For example, `doing select -d -a` would present the menu, and then mark selected entries as @done (with timestamp) and move them to the Archive section.
660
-
661
- Multiple actions can be performed at once by combining options. You can also combine the `--editor` switch with any other options. Other actions will be performed first, then the entries --- with any modifications performed --- will be presented in the editor for tweaking.
662
-
663
- **Note:** when using the `--editor` flag to open selections in your text editor, entries will be separated by `---` lines. These must remain in place for doing to track the changes. You can do anything you want to the entries, modify dates, change text, add notes, etc., as long as you leave the dividers in place. You can even delete an entry entirely, leaving the dividers around the missing line and the entry will be removed from your doing file when you save and exit the editor.
664
-
665
- ---
666
-
667
- ## Extras
668
-
669
- ### Shell completion
670
-
671
- __Bash:__ See the file [`doing.completion.bash`](https://github.com/ttscoff/doing/blob/master/doing.completion.bash) in the git repository for full bash completion. Thanks to [fcrespo82](https://github.com/fcrespo82) for getting it [started](https://gist.github.com/fcrespo82/9609318).
672
-
673
-
674
- __Zsh:__ See the file [`doing.completion.zsh`](https://github.com/ttscoff/doing/blob/master/doing.completion.zsh) in the git repository for zsh completion. Courtesy of [Gabe Anzelini](https://github.com/gabeanzelini).
675
-
676
- __Fish:__ See the file [`doing.fish`](https://github.com/ttscoff/doing/blob/master/doing.fish) 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 `doing show` and `doing view` commands.
677
-
678
- ### Launchbar/Alfred
25
+ ## Launchbar/Alfred
679
26
 
680
27
  The LaunchBar action requires that `doing` be available in `/usr/local/bin/doing`. If it's not (because you're using RVM or similar), you'll need to symlink it there. Running the action with Return will show the latest 9 items from Currently, along with any time intervals recorded, and includes a submenu of Timers for each tag.
681
28
 
@@ -683,52 +30,21 @@ Pressing Spacebar and typing allows you to add a new entry to currently. You an
683
30
 
684
31
  Point of interest, the LaunchBar Action makes use of the `-o json` flag for outputting JSON to the action's script for parsing.
685
32
 
686
- <!--GITHUB-->See <https://brettterpstra.com/projects/doing/> for the download.<!--END GITHUB-->
33
+ <!--GITHUB-->
34
+
35
+ See the [doing project on BrettTerpstra.com](https://brettterpstra.com/projects/doing/) for the download.
36
+
37
+ <!--END GITHUB-->
687
38
  <!--JEKYLL
688
39
  {% download 117 %}
689
40
  -->
690
41
 
691
42
  Evan Lovely has [created an Alfred workflow as well](http://www.evanlovely.com/blog/technology/alfred-for-terpstras-doing/).
692
43
 
693
- ## Troubleshooting
694
-
695
- ### Errors after "Successfully installed..."
696
-
697
- If you get errors in the terminal immediately after a message like:
698
-
699
- Successfully installed doing-x.x.x
700
- 2 gems installed
701
-
702
- ...it may just be documentation related. If running `doing` works, you can ignore them. If not, try running the install command again with `--no-document`:
703
-
704
- $ gem install --no-document doing
705
-
706
- ### Command not found
707
-
708
- If running `doing` after a successful install gives you a "command not found" error, then your gem path isn't in your `$PATH`, meaning the system can't find it. To locate the gem and link it into your path, you can try this:
709
-
710
- cd $GEM_PATH/bin
711
- ln -s doing /usr/local/bin/
712
-
713
- Then try running `doing` and see if it works.
714
-
715
- ### Encoding errors
716
-
717
- Ruby is rife with encoding inconsistencies across platforms and versions. Feel free to file issues (see below).
718
-
719
- ### Support
720
-
721
-
722
- As a free project, `doing` isn't heavily supported, but you can get support from myself and other users on GitHub. If you run into a replicable bug in your environment, please [post an issue](https://github.com/ttscoff/doing/issues) and include your platform, OS version, and the result of `ruby -v`, along with a copy/paste of the error message. To get a more verbose error message, try running `GLI_DEBUG=true doing [...]` for a full trace.
723
-
724
- Please try not to email me directly about GitHub projects.
725
-
726
- ### Developer notes
727
-
728
- Feel free to [poke around](http://github.com/ttscoff/doing/), I'll try to add more comments in the future (and retroactively).
729
-
730
44
  <!--END README-->
731
45
 
46
+ ---
47
+
732
48
  PayPal link: [paypal.me/ttscoff](https://paypal.me/ttscoff)
733
49
 
734
50
  ## Changelog