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.
- checksums.yaml +4 -4
- data/AUTHORS +19 -0
- data/CHANGELOG.md +616 -0
- data/COMMANDS.md +1181 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +110 -0
- data/LICENSE +23 -0
- data/README.md +15 -699
- data/Rakefile +79 -0
- data/_config.yml +1 -0
- data/bin/doing +1055 -494
- data/doing.gemspec +34 -0
- data/doing.rdoc +1839 -0
- data/example_plugin.rb +209 -0
- data/generate_completions.sh +5 -0
- data/img/doing-colors.jpg +0 -0
- data/img/doing-printf-wrap-800.jpg +0 -0
- data/img/doing-show-note-formatting-800.jpg +0 -0
- data/lib/completion/_doing.zsh +203 -0
- data/lib/completion/doing.bash +449 -0
- data/lib/completion/doing.fish +329 -0
- data/lib/doing/array.rb +8 -0
- data/lib/doing/cli_status.rb +70 -0
- data/lib/doing/colors.rb +136 -0
- data/lib/doing/configuration.rb +312 -0
- data/lib/doing/errors.rb +109 -0
- data/lib/doing/hash.rb +31 -0
- data/lib/doing/hooks.rb +59 -0
- data/lib/doing/item.rb +155 -0
- data/lib/doing/log_adapter.rb +344 -0
- data/lib/doing/markdown_document_listener.rb +174 -0
- data/lib/doing/note.rb +59 -0
- data/lib/doing/pager.rb +95 -0
- data/lib/doing/plugin_manager.rb +208 -0
- data/lib/doing/plugins/export/csv_export.rb +48 -0
- data/lib/doing/plugins/export/html_export.rb +83 -0
- data/lib/doing/plugins/export/json_export.rb +140 -0
- data/lib/doing/plugins/export/markdown_export.rb +85 -0
- data/lib/doing/plugins/export/taskpaper_export.rb +34 -0
- data/lib/doing/plugins/export/template_export.rb +141 -0
- data/lib/doing/plugins/import/cal_to_json.scpt +0 -0
- data/lib/doing/plugins/import/calendar_import.rb +76 -0
- data/lib/doing/plugins/import/doing_import.rb +144 -0
- data/lib/doing/plugins/import/timing_import.rb +78 -0
- data/lib/doing/string.rb +348 -0
- data/lib/doing/symbol.rb +16 -0
- data/lib/doing/time.rb +18 -0
- data/lib/doing/util.rb +186 -0
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +1868 -2349
- data/lib/doing/wwidfile.rb +117 -0
- data/lib/doing.rb +43 -3
- data/lib/examples/commands/autotag.rb +63 -0
- data/lib/examples/commands/wiki.rb +81 -0
- data/lib/examples/plugins/hooks.rb +22 -0
- data/lib/examples/plugins/say_export.rb +202 -0
- data/lib/examples/plugins/templates/wiki.css +169 -0
- data/lib/examples/plugins/templates/wiki.haml +27 -0
- data/lib/examples/plugins/templates/wiki_index.haml +18 -0
- data/lib/examples/plugins/wiki_export.rb +87 -0
- data/lib/templates/doing-markdown.erb +5 -0
- data/man/doing.1 +964 -0
- data/man/doing.1.html +711 -0
- data/man/doing.1.ronn +600 -0
- data/package-lock.json +3 -0
- data/rdoc_to_mmd.rb +42 -0
- data/rdocfixer.rb +13 -0
- data/scripts/generate_bash_completions.rb +211 -0
- data/scripts/generate_fish_completions.rb +204 -0
- data/scripts/generate_zsh_completions.rb +168 -0
- metadata +82 -7
- data/lib/doing/helpers.rb +0 -191
- data/lib/doing/markdown_export.rb +0 -16
data/example_plugin.rb
ADDED
@@ -0,0 +1,209 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# title: Export plugin example
|
4
|
+
# description: Speak the most recent entry (macOS)
|
5
|
+
# author: Brett Terpstra
|
6
|
+
# url: https://brettterpstra.com
|
7
|
+
|
8
|
+
# Example
|
9
|
+
#
|
10
|
+
# doing show -o sayit
|
11
|
+
#
|
12
|
+
# ## Configuration
|
13
|
+
#
|
14
|
+
# Change what the plugin says by generating a template with
|
15
|
+
# `doing template --type say`, saving it to a file, and
|
16
|
+
# putting the path to that file in `export_templates->say` in
|
17
|
+
# .doingrc.
|
18
|
+
#
|
19
|
+
# export_templates:
|
20
|
+
# say: /path/to/template.txt
|
21
|
+
#
|
22
|
+
# Use a different voice by adding a `say_voice` key to your
|
23
|
+
# .doingrc. Use `say -v ?` to see available voices.
|
24
|
+
#
|
25
|
+
# say_voice: Zarvox
|
26
|
+
|
27
|
+
module Doing
|
28
|
+
##
|
29
|
+
## @brief Plugin class
|
30
|
+
##
|
31
|
+
class SayExport
|
32
|
+
include Doing::Util
|
33
|
+
|
34
|
+
#-------------------------------------------------------
|
35
|
+
## Plugin Settings. A plugin must have a self.settings
|
36
|
+
## method that returns a hash with plugin settings.
|
37
|
+
##
|
38
|
+
## trigger: (required) Regular expression to match
|
39
|
+
## FORMAT when used with `--output FORMAT`. Registered
|
40
|
+
## name of plugin must be able to match the trigger, but
|
41
|
+
## alternatives can be included
|
42
|
+
##
|
43
|
+
## templates: (optional) Array of templates this plugin
|
44
|
+
## can export (plugin must have :template method)
|
45
|
+
##
|
46
|
+
## Each template is a hash containing:
|
47
|
+
## - name: display name for template
|
48
|
+
## - trigger: regular expression for
|
49
|
+
## `template --type FORMAT`
|
50
|
+
##
|
51
|
+
## If a template is included, a config key will
|
52
|
+
## automatically be added for the user to override
|
53
|
+
## The config key will be available at:
|
54
|
+
##
|
55
|
+
## wwid.config['export_templates'][PLUGIN_NAME]
|
56
|
+
##
|
57
|
+
## config: (optional) A Hash which will be
|
58
|
+
## added to the main configuration in the plugins section.
|
59
|
+
## Options defined here are included when config file is
|
60
|
+
## created or updated with `config --update`. Use this to
|
61
|
+
## add new configuration keys, not to override existing
|
62
|
+
## ones.
|
63
|
+
##
|
64
|
+
## The configuration keys will be available at:
|
65
|
+
##
|
66
|
+
## wwid.config['plugins'][PLUGIN_NAME][KEY]
|
67
|
+
##
|
68
|
+
## @brief Method to return plugin settings (required)
|
69
|
+
##
|
70
|
+
## @return Hash of settings for this plugin
|
71
|
+
##
|
72
|
+
def self.settings
|
73
|
+
{
|
74
|
+
trigger: 'say(?:it)?',
|
75
|
+
templates: [
|
76
|
+
{ name: 'say', trigger: 'say(?:it)?' }
|
77
|
+
],
|
78
|
+
config: {
|
79
|
+
'say_voice' => 'Fiona'
|
80
|
+
}
|
81
|
+
}
|
82
|
+
end
|
83
|
+
|
84
|
+
|
85
|
+
#-------------------------------------------------------
|
86
|
+
## Output a template. Only required if template(s) are
|
87
|
+
## included in settings. The method should return a
|
88
|
+
## string (not output it to the STDOUT).
|
89
|
+
##
|
90
|
+
## @brief Method to return template (optional)
|
91
|
+
##
|
92
|
+
## @param trigger The trigger passed to the
|
93
|
+
## template function. When this
|
94
|
+
## method defines multiple
|
95
|
+
## templates, the trigger can be
|
96
|
+
## used to determine which one is
|
97
|
+
## output.
|
98
|
+
##
|
99
|
+
## @return (String) template contents
|
100
|
+
##
|
101
|
+
def self.template(trigger)
|
102
|
+
return unless trigger =~ /^say(it)?$/
|
103
|
+
|
104
|
+
'On %date, you were %title, recorded in section %section%took'
|
105
|
+
end
|
106
|
+
|
107
|
+
|
108
|
+
##
|
109
|
+
## @brief Render data received from an output
|
110
|
+
## command
|
111
|
+
##
|
112
|
+
## @param wwid The wwid object with config
|
113
|
+
## and public methods
|
114
|
+
## @param items An array of items to be output
|
115
|
+
## { <Date>date, <String>title,
|
116
|
+
## <String>section, <Array>note }
|
117
|
+
## @param variables Additional variables including
|
118
|
+
## flags passed to command
|
119
|
+
## (variables[:options])
|
120
|
+
##
|
121
|
+
## @return (String) Rendered output
|
122
|
+
##
|
123
|
+
def self.render(wwid, items, variables: {})
|
124
|
+
return if items.nil? || items.empty?
|
125
|
+
|
126
|
+
# the :options key includes the flags passed to the
|
127
|
+
# command that called the plugin use `puts
|
128
|
+
# variables.inspect` to see properties and methods
|
129
|
+
# when run
|
130
|
+
opt = variables[:options]
|
131
|
+
|
132
|
+
# This plugin just grabs the last item in the `items`
|
133
|
+
# list (which could be the oldest or newest, depending
|
134
|
+
# on the sort order of the command that called the
|
135
|
+
# plugin). Most of the time you'll want to use :each
|
136
|
+
# or :map to generate output.
|
137
|
+
i = items[-1]
|
138
|
+
|
139
|
+
# Format the item. Items are a hash with 4 keys: date,
|
140
|
+
# title, section (parent section), and note. Start
|
141
|
+
# time is in item.date. The wwid object has some
|
142
|
+
# methods for calculation and formatting, including
|
143
|
+
# wwid.item.end_date to convert the @done timestamp to
|
144
|
+
# an end date.
|
145
|
+
if opt[:times]
|
146
|
+
interval = i.interval
|
147
|
+
|
148
|
+
if interval
|
149
|
+
took = '. You finished on '
|
150
|
+
finished_at = i.end_date
|
151
|
+
took += finished_at.strftime('%A %B %e at %I:%M%p')
|
152
|
+
|
153
|
+
d, h, m = wwid.format_time(interval)
|
154
|
+
took += ' and it took'
|
155
|
+
took += " #{d.to_i} days" if d.to_i.positive?
|
156
|
+
took += " #{h.to_i} hours" if h.to_i.positive?
|
157
|
+
took += " #{m.to_i} minutes" if m.to_i.positive?
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
date = i.date.strftime('%A %B %e at %I:%M%p')
|
162
|
+
title = i.title.gsub(/@/, 'hashtag ')
|
163
|
+
tpl = template('say')
|
164
|
+
|
165
|
+
if wwid.config['export_templates'].key?('say')
|
166
|
+
cfg_tpl = wwid.config['export_templates']['say']
|
167
|
+
tpl = cfg_tpl unless cfg_tpl.nil? || cfg_tpl.empty?
|
168
|
+
end
|
169
|
+
output = tpl.dup
|
170
|
+
output.gsub!(/%date/, date)
|
171
|
+
output.gsub!(/%title/, title)
|
172
|
+
output.gsub!(/%section/, i.section)
|
173
|
+
output.gsub!(/%took/, took || '')
|
174
|
+
|
175
|
+
# Debugging output
|
176
|
+
# warn "Saying: #{output}"
|
177
|
+
|
178
|
+
# To provide results on the command line after the
|
179
|
+
# command runs, use Doing.logger, which responds to
|
180
|
+
# :debug, :info, :warn, and :error. e.g.:
|
181
|
+
#
|
182
|
+
# Doing.logger.info("This plugin has run")
|
183
|
+
# Doing.logger.error("This message will be displayed even if run in --quiet mode.")
|
184
|
+
#
|
185
|
+
# Results are
|
186
|
+
# provided on STDERR unless doing is run with
|
187
|
+
# `--stdout` or non-interactively.
|
188
|
+
Doing.logger.info('Spoke the last entry. Did you hear it?')
|
189
|
+
|
190
|
+
# This export runs a command for fun, most plugins won't
|
191
|
+
voice = wwid.config['plugins']['say']['say_voice'] || 'Alex'
|
192
|
+
`say -v "#{voice}" "#{output}"`
|
193
|
+
|
194
|
+
# Return the result (don't output to terminal with puts or print)
|
195
|
+
output
|
196
|
+
end
|
197
|
+
|
198
|
+
# Register the plugin with doing.
|
199
|
+
# Doing::Plugins.register 'NAME', TYPE, Class
|
200
|
+
#
|
201
|
+
# Name should be lowercase, no spaces
|
202
|
+
#
|
203
|
+
# TYPE is :import or :export
|
204
|
+
#
|
205
|
+
# Class is the plugin class (e.g. Doing::SayExport), or
|
206
|
+
# self if called within the class
|
207
|
+
Doing::Plugins.register 'say', :export, self
|
208
|
+
end
|
209
|
+
end
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,203 @@
|
|
1
|
+
compdef _doing doing
|
2
|
+
|
3
|
+
function _doing() {
|
4
|
+
local line state
|
5
|
+
|
6
|
+
function _commands {
|
7
|
+
local -a commands
|
8
|
+
|
9
|
+
commands=(
|
10
|
+
'add_section:Add a new section to the "doing" file'
|
11
|
+
'again:Repeat last entry as new entry'
|
12
|
+
'resume:Repeat last entry as new entry'
|
13
|
+
'archive:Move entries between sections'
|
14
|
+
'move:Move entries between sections'
|
15
|
+
'autotag:Autotag last entry or filtered entries'
|
16
|
+
'cancel:End last X entries with no time tracked'
|
17
|
+
'choose:Select a section to display from a menu'
|
18
|
+
'colors:List available color variables for configuration templates and views'
|
19
|
+
'config:Edit the configuration file or output a value from it'
|
20
|
+
'done:Add a completed item with @done(date)'
|
21
|
+
'did:Add a completed item with @done(date)'
|
22
|
+
'finish:Mark last X entries as @done'
|
23
|
+
'grep:Search for entries'
|
24
|
+
'search:Search for entries'
|
25
|
+
'help:Shows a list of commands or help for one command'
|
26
|
+
'import:Import entries from an external source'
|
27
|
+
'last:Show the last entry'
|
28
|
+
'later:Add an item to the Later section'
|
29
|
+
'mark:Mark last entry as flagged'
|
30
|
+
'flag:Mark last entry as flagged'
|
31
|
+
'meanwhile:Finish any running @meanwhile tasks and optionally create a new one'
|
32
|
+
'note:Add a note to the last entry'
|
33
|
+
'now:Add an entry'
|
34
|
+
'next:Add an entry'
|
35
|
+
'on:List entries for a date'
|
36
|
+
'open:Open the "doing" file in an editor'
|
37
|
+
'plugins:List installed plugins'
|
38
|
+
'recent:List recent entries'
|
39
|
+
'reset:Reset the start time of an entry'
|
40
|
+
'begin:Reset the start time of an entry'
|
41
|
+
'rotate:Move entries to archive file'
|
42
|
+
'sections:List sections'
|
43
|
+
'select:Display an interactive menu to perform operations'
|
44
|
+
'show:List all entries'
|
45
|
+
'since:List entries since a date'
|
46
|
+
'tag:Add tag(s) to last entry'
|
47
|
+
'template:Output HTML'
|
48
|
+
'test:Test Stuff'
|
49
|
+
'today:List entries from today'
|
50
|
+
'undo:Undo the last change to the doing_file'
|
51
|
+
'view:Display a user-created view'
|
52
|
+
'views:List available custom views'
|
53
|
+
'wiki:Output a tag wiki'
|
54
|
+
'yesterday:List entries from yesterday'
|
55
|
+
)
|
56
|
+
_describe 'command' commands
|
57
|
+
}
|
58
|
+
|
59
|
+
_arguments -C "1: :_commands" "*::arg:->args"
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
case $line[1] in
|
64
|
+
add_section)
|
65
|
+
args=( )
|
66
|
+
;;
|
67
|
+
again)
|
68
|
+
args=( "(--bool=)--bool=}[Boolean used to combine multiple tags]" {-e,--editor}"[Edit duplicated entry with vim before adding]" {-i,--interactive}"[Select item to resume from a menu of matching entries]" "(--in=)--in=}[Add new entry to section]" {-n,--note=}"[Note]" {-s,--section=}"[Get last entry from a specific section]" "(--search=)--search=}[Repeat last entry matching search]" "(--tag=)--tag=}[Repeat last entry matching tags]" )
|
69
|
+
;;
|
70
|
+
resume)
|
71
|
+
args=( "(--bool=)--bool=}[Boolean used to combine multiple tags]" {-e,--editor}"[Edit duplicated entry with vim before adding]" {-i,--interactive}"[Select item to resume from a menu of matching entries]" "(--in=)--in=}[Add new entry to section]" {-n,--note=}"[Note]" {-s,--section=}"[Get last entry from a specific section]" "(--search=)--search=}[Repeat last entry matching search]" "(--tag=)--tag=}[Repeat last entry matching tags]" )
|
72
|
+
;;
|
73
|
+
archive)
|
74
|
+
args=( "(--before=)--before=}[Archive entries older than date]" "(--bool=)--bool=}[Tag boolean]" {-k,--keep=}"[How many items to keep]" "(--label)--label}[Label moved items with @from(SECTION_NAME)]" "(--search=)--search=}[Search filter]" {-t,--to=}"[Move entries to]" "(--tag=)--tag=}[Tag filter]" )
|
75
|
+
;;
|
76
|
+
move)
|
77
|
+
args=( "(--before=)--before=}[Archive entries older than date]" "(--bool=)--bool=}[Tag boolean]" {-k,--keep=}"[How many items to keep]" "(--label)--label}[Label moved items with @from(SECTION_NAME)]" "(--search=)--search=}[Search filter]" {-t,--to=}"[Move entries to]" "(--tag=)--tag=}[Tag filter]" )
|
78
|
+
;;
|
79
|
+
autotag)
|
80
|
+
args=( "(--bool=)--bool=}[Boolean]" {-c,--count=}"[How many recent entries to autotag]" "(--force)--force}[Dont ask permission to autotag all entries when count is 0t ask permission to autotag all entries when count is 0]" {-i,--interactive}"[Select item(s) to tag from a menu of matching entries]" {-s,--section=}"[Section]" "(--search=)--search=}[Autotag entries matching search filter]" "(--tag=)--tag=}[Autotag the last X entries containing TAG]" {-u,--unfinished}"[Autotag last entry]" )
|
81
|
+
;;
|
82
|
+
cancel)
|
83
|
+
args=( {-a,--archive}"[Archive entries]" "(--bool=)--bool=}[Boolean]" {-i,--interactive}"[Select item(s) to cancel from a menu of matching entries]" {-s,--section=}"[Section]" "(--tag=)--tag=}[Cancel the last X entries containing TAG]" {-u,--unfinished}"[Cancel last entry]" )
|
84
|
+
;;
|
85
|
+
choose)
|
86
|
+
args=( )
|
87
|
+
;;
|
88
|
+
colors)
|
89
|
+
args=( )
|
90
|
+
;;
|
91
|
+
config)
|
92
|
+
args=( {-d,--dump}"[Show a config key value based on arguments]" {-e,--editor=}"[Editor to use]" {-o,--output=}"[Format for --dump]" {-u,--update}"[Update config file with missing configuration options]" )
|
93
|
+
;;
|
94
|
+
done)
|
95
|
+
args=( {-a,--archive}"[Immediately archive the entry]" "(--at=)--at=}[Set finish date to specific date/time]" {-b,--back=}"[Backdate start date by interval [4pm|20m|2h|yesterday noon]]" "(--date)--date}[Include date]" {-e,--editor}"[Edit entry with vim]" {-n,--note=}"[Include a note]" {-r,--remove}"[Remove @done tag]" {-s,--section=}"[Section]" {-t,--took=}"[Set completion date to start date plus interval]" {-u,--unfinished}"[Finish last entry not already marked @done]" )
|
96
|
+
;;
|
97
|
+
did)
|
98
|
+
args=( {-a,--archive}"[Immediately archive the entry]" "(--at=)--at=}[Set finish date to specific date/time]" {-b,--back=}"[Backdate start date by interval [4pm|20m|2h|yesterday noon]]" "(--date)--date}[Include date]" {-e,--editor}"[Edit entry with vim]" {-n,--note=}"[Include a note]" {-r,--remove}"[Remove @done tag]" {-s,--section=}"[Section]" {-t,--took=}"[Set completion date to start date plus interval]" {-u,--unfinished}"[Finish last entry not already marked @done]" )
|
99
|
+
;;
|
100
|
+
finish)
|
101
|
+
args=( {-a,--archive}"[Archive entries]" "(--at=)--at=}[Set finish date to specific date/time]" "(--auto)--auto}[Auto-generate finish dates from next entrys start times start time]" {-b,--back=}"[Backdate completed date to date string [4pm|20m|2h|yesterday noon]]" "(--bool=)--bool=}[Boolean]" "(--date)--date}[Include date]" {-i,--interactive}"[Select item(s) to finish from a menu of matching entries]" {-r,--remove}"[Remove done tag]" {-s,--section=}"[Section]" "(--search=)--search=}[Finish the last X entries matching search filter]" {-t,--took=}"[Set the completed date to the start date plus XX[hmd]]" "(--tag=)--tag=}[Finish the last X entries containing TAG]" {-u,--unfinished}"[Finish last entry]" )
|
102
|
+
;;
|
103
|
+
grep)
|
104
|
+
args=( "(--after=)--after=}[Constrain search to entries newer than date]" "(--before=)--before=}[Constrain search to entries older than date]" {-i,--interactive}"[Display an interactive menu of results to perform further operations]" {-o,--output=}"[Output to export format]" "(--only_timed)--only_timed}[Only show items with recorded time intervals]" {-s,--section=}"[Section]" {-t,--times}"[Show time intervals on @done tasks]" "(--tag_sort=)--tag_sort=}[Sort tags by]" "(--totals)--totals}[Show intervals with totals at the end of output]" )
|
105
|
+
;;
|
106
|
+
search)
|
107
|
+
args=( "(--after=)--after=}[Constrain search to entries newer than date]" "(--before=)--before=}[Constrain search to entries older than date]" {-i,--interactive}"[Display an interactive menu of results to perform further operations]" {-o,--output=}"[Output to export format]" "(--only_timed)--only_timed}[Only show items with recorded time intervals]" {-s,--section=}"[Section]" {-t,--times}"[Show time intervals on @done tasks]" "(--tag_sort=)--tag_sort=}[Sort tags by]" "(--totals)--totals}[Show intervals with totals at the end of output]" )
|
108
|
+
;;
|
109
|
+
help)
|
110
|
+
args=( )
|
111
|
+
;;
|
112
|
+
import)
|
113
|
+
args=( "(--after=)--after=}[Import entries newer than date]" "(--autotag)--autotag}[Autotag entries]" "(--before=)--before=}[Import entries older than date]" {-f,--from=}"[Date range to import]" "(--only_timed)--only_timed}[Only import items with recorded time intervals]" "(--overlap)--overlap}[Allow entries that overlap existing times]" "(--prefix=)--prefix=}[Prefix entries with]" {-s,--section=}"[Target section]" "(--search=)--search=}[Only import items matching search]" "(--tag=)--tag=}[Tag all imported entries]" "(--type=)--type=}[Import type]" )
|
114
|
+
;;
|
115
|
+
last)
|
116
|
+
args=( "(--bool=)--bool=}[Tag boolean]" {-e,--editor}"[Edit entry with vim]" {-s,--section=}"[Specify a section]" "(--search=)--search=}[Search filter]" "(--tag=)--tag=}[Tag filter]" )
|
117
|
+
;;
|
118
|
+
later)
|
119
|
+
args=( {-b,--back=}"[Backdate start time to date string [4pm|20m|2h|yesterday noon]]" {-e,--editor}"[Edit entry with vim]" {-n,--note=}"[Note]" )
|
120
|
+
;;
|
121
|
+
mark)
|
122
|
+
args=( "(--bool=)--bool=}[Boolean]" {-c,--count=}"[How many recent entries to tag]" {-d,--date}"[Include current date/time with tag]" "(--force)--force}[Dont ask permission to flag all entries when count is 0t ask permission to flag all entries when count is 0]" {-i,--interactive}"[Select item(s) to flag from a menu of matching entries]" {-r,--remove}"[Remove flag]" {-s,--section=}"[Section]" "(--search=)--search=}[Flag the last entry matching search filter]" "(--tag=)--tag=}[Flag the last entry containing TAG]" {-u,--unfinished}"[Flag last entry]" )
|
123
|
+
;;
|
124
|
+
flag)
|
125
|
+
args=( "(--bool=)--bool=}[Boolean]" {-c,--count=}"[How many recent entries to tag]" {-d,--date}"[Include current date/time with tag]" "(--force)--force}[Dont ask permission to flag all entries when count is 0t ask permission to flag all entries when count is 0]" {-i,--interactive}"[Select item(s) to flag from a menu of matching entries]" {-r,--remove}"[Remove flag]" {-s,--section=}"[Section]" "(--search=)--search=}[Flag the last entry matching search filter]" "(--tag=)--tag=}[Flag the last entry containing TAG]" {-u,--unfinished}"[Flag last entry]" )
|
126
|
+
;;
|
127
|
+
meanwhile)
|
128
|
+
args=( {-a,--archive}"[Archive previous @meanwhile entry]" {-b,--back=}"[Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]]" {-e,--editor}"[Edit entry with vim]" {-n,--note=}"[Note]" {-s,--section=}"[Section]" )
|
129
|
+
;;
|
130
|
+
note)
|
131
|
+
args=( "(--bool=)--bool=}[Boolean]" {-e,--editor}"[Edit entry with vim]" {-i,--interactive}"[Select item for new note from a menu of matching entries]" {-r,--remove}"[Replace/Remove last entrys notes note]" {-s,--section=}"[Section]" "(--search=)--search=}[Add/remove note from last entry matching search filter]" "(--tag=)--tag=}[Add/remove note from last entry matching tag]" )
|
132
|
+
;;
|
133
|
+
now)
|
134
|
+
args=( {-b,--back=}"[Backdate start time [4pm|20m|2h|yesterday noon]]" {-e,--editor}"[Edit entry with vim]" {-f,--finish_last}"[Timed entry]" {-n,--note=}"[Include a note]" {-s,--section=}"[Section]" )
|
135
|
+
;;
|
136
|
+
next)
|
137
|
+
args=( {-b,--back=}"[Backdate start time [4pm|20m|2h|yesterday noon]]" {-e,--editor}"[Edit entry with vim]" {-f,--finish_last}"[Timed entry]" {-n,--note=}"[Include a note]" {-s,--section=}"[Section]" )
|
138
|
+
;;
|
139
|
+
on)
|
140
|
+
args=( {-o,--output=}"[Output to export format]" {-s,--section=}"[Section]" {-t,--times}"[Show time intervals on @done tasks]" "(--tag_sort=)--tag_sort=}[Sort tags by]" "(--totals)--totals}[Show time totals at the end of output]" )
|
141
|
+
;;
|
142
|
+
open)
|
143
|
+
args=( {-a,--app=}"[Open with app name]" {-b,--bundle_id=}"[Open with app bundle id]" )
|
144
|
+
;;
|
145
|
+
plugins)
|
146
|
+
args=( {-c,--column}"[List in single column for completion]" {-t,--type=}"[List plugins of type]" )
|
147
|
+
;;
|
148
|
+
recent)
|
149
|
+
args=( {-i,--interactive}"[Select from a menu of matching entries to perform additional operations]" {-s,--section=}"[Section]" {-t,--times}"[Show time intervals on @done tasks]" "(--tag_sort=)--tag_sort=}[Sort tags by]" "(--totals)--totals}[Show intervals with totals at the end of output]" )
|
150
|
+
;;
|
151
|
+
reset)
|
152
|
+
args=( "(--bool=)--bool=}[Boolean]" {-i,--interactive}"[Select from a menu of matching entries]" {-r,--resume}"[Resume entry]" {-s,--section=}"[Set the start date of an item to now]" "(--search=)--search=}[Reset last entry matching search filter]" "(--tag=)--tag=}[Reset last entry matching tag]" )
|
153
|
+
;;
|
154
|
+
begin)
|
155
|
+
args=( "(--bool=)--bool=}[Boolean]" {-i,--interactive}"[Select from a menu of matching entries]" {-r,--resume}"[Resume entry]" {-s,--section=}"[Set the start date of an item to now]" "(--search=)--search=}[Reset last entry matching search filter]" "(--tag=)--tag=}[Reset last entry matching tag]" )
|
156
|
+
;;
|
157
|
+
rotate)
|
158
|
+
args=( "(--before=)--before=}[Rotate entries older than date]" "(--bool=)--bool=}[Tag boolean]" {-k,--keep=}"[How many items to keep in each section]" {-s,--section=}"[Section to rotate]" "(--search=)--search=}[Search filter]" "(--tag=)--tag=}[Tag filter]" )
|
159
|
+
;;
|
160
|
+
sections)
|
161
|
+
args=( {-c,--column}"[List in single column]" )
|
162
|
+
;;
|
163
|
+
select)
|
164
|
+
args=( {-a,--archive}"[Archive selected items]" "(--resume)--resume}[Copy selection as a new entry with current time and no @done tag]" {-c,--cancel}"[Cancel selected items]" {-d,--delete}"[Delete selected items]" {-e,--editor}"[Edit selected item(s)]" {-f,--finish}"[Add @done with current time to selected item(s)]" "(--flag)--flag}[Add flag to selected item(s)]" "(--force)--force}[Perform action without confirmation]" {-m,--move=}"[Move selected items to section]" "(--menu)--menu}[Use --no-menu to skip the interactive menu]" {-o,--output=}"[Output entries to format]" "(--search=)--search=}[Initial search query for filtering]" {-r,--remove}"[Reverse -c]" {-s,--section=}"[Select from a specific section]" "(--save_to=)--save_to=}[Save selected entries to file using --output format]" {-t,--tag=}"[Tag selected entries]" )
|
165
|
+
;;
|
166
|
+
show)
|
167
|
+
args=( {-a,--age=}"[Age]" "(--after=)--after=}[View entries newer than date]" {-b,--bool=}"[Tag boolean]" "(--before=)--before=}[View entries older than date]" {-c,--count=}"[Max count to show]" {-f,--from=}"[Date range to show]" {-i,--interactive}"[Select from a menu of matching entries to perform additional operations]" {-o,--output=}"[Output to export format]" "(--only_timed)--only_timed}[Only show items with recorded time intervals]" {-s,--sort=}"[Sort order]" "(--search=)--search=}[Search filter]" {-t,--times}"[Show time intervals on @done tasks]" "(--tag=)--tag=}[Tag filter]" "(--tag_order=)--tag_order=}[Tag sort direction]" "(--tag_sort=)--tag_sort=}[Sort tags by]" "(--totals)--totals}[Show intervals with totals at the end of output]" )
|
168
|
+
;;
|
169
|
+
since)
|
170
|
+
args=( {-o,--output=}"[Output to export format]" {-s,--section=}"[Section]" {-t,--times}"[Show time intervals on @done tasks]" "(--tag_sort=)--tag_sort=}[Sort tags by]" "(--totals)--totals}[Show time totals at the end of output]" )
|
171
|
+
;;
|
172
|
+
tag)
|
173
|
+
args=( {-a,--autotag}"[Autotag entries based on autotag configuration in ~/]" "(--bool=)--bool=}[Boolean]" {-c,--count=}"[How many recent entries to tag]" {-d,--date}"[Include current date/time with tag]" "(--force)--force}[Dont ask permission to tag all entries when count is 0t ask permission to tag all entries when count is 0]" {-i,--interactive}"[Select item(s) to tag from a menu of matching entries]" {-r,--remove}"[Remove given tag(s)]" "(--regex)--regex}[Interpret tag string as regular expression]" "(--rename=)--rename=}[Replace existing tag with tag argument]" {-s,--section=}"[Section]" "(--search=)--search=}[Tag entries matching search filter]" "(--tag=)--tag=}[Tag the last X entries containing TAG]" {-u,--unfinished}"[Tag last entry]" )
|
174
|
+
;;
|
175
|
+
template)
|
176
|
+
args=( {-l,--list}"[List all available templates]" )
|
177
|
+
;;
|
178
|
+
test)
|
179
|
+
args=( )
|
180
|
+
;;
|
181
|
+
today)
|
182
|
+
args=( "(--after=)--after=}[View entries after specified time]" "(--before=)--before=}[View entries before specified time]" {-o,--output=}"[Output to export format]" {-s,--section=}"[Specify a section]" {-t,--times}"[Show time intervals on @done tasks]" "(--tag_sort=)--tag_sort=}[Sort tags by]" "(--totals)--totals}[Show time totals at the end of output]" )
|
183
|
+
;;
|
184
|
+
undo)
|
185
|
+
args=( {-f,--file=}"[Specify alternate doing file]" )
|
186
|
+
;;
|
187
|
+
view)
|
188
|
+
args=( "(--after=)--after=}[View entries newer than date]" {-b,--bool=}"[Tag boolean]" "(--before=)--before=}[View entries older than date]" {-c,--count=}"[Count to display]" "(--color)--color}[Include colors in output]" {-i,--interactive}"[Select from a menu of matching entries to perform additional operations]" {-o,--output=}"[Output to export format]" "(--only_timed)--only_timed}[Only show items with recorded time intervals]" {-s,--section=}"[Section]" "(--search=)--search=}[Search filter]" {-t,--times}"[Show time intervals on @done tasks]" "(--tag=)--tag=}[Tag filter]" "(--tag_order=)--tag_order=}[Tag sort direction]" "(--tag_sort=)--tag_sort=}[Sort tags by]" "(--totals)--totals}[Show intervals with totals at the end of output]" )
|
189
|
+
;;
|
190
|
+
views)
|
191
|
+
args=( {-c,--column}"[List in single column]" )
|
192
|
+
;;
|
193
|
+
wiki)
|
194
|
+
args=( "(--after=)--after=}[Include entries newer than date]" {-b,--bool=}"[Tag boolean]" "(--before=)--before=}[Include entries older than date]" {-f,--from=}"[Date range to include]" "(--only_timed)--only_timed}[Only show items with recorded time intervals]" {-s,--section=}"[Section to rotate]" "(--search=)--search=}[Search filter]" "(--tag=)--tag=}[Tag filter]" )
|
195
|
+
;;
|
196
|
+
yesterday)
|
197
|
+
args=( "(--after=)--after=}[View entries after specified time]" "(--before=)--before=}[View entries before specified time]" {-o,--output=}"[Output to export format]" {-s,--section=}"[Specify a section]" {-t,--times}"[Show time intervals on @done tasks]" "(--tag_order=)--tag_order=}[Tag sort direction]" "(--tag_sort=)--tag_sort=}[Sort tags by]" "(--totals)--totals}[Show time totals at the end of output]" )
|
198
|
+
;;
|
199
|
+
esac
|
200
|
+
|
201
|
+
_arguments -s $args
|
202
|
+
}
|
203
|
+
|