-
-
Notifications
You must be signed in to change notification settings - Fork 91
Tagging
Doing uses TaskPaper @tags for searching and filtering, as well as for time tracking. Just include @tags in the text of your entries to make them searchable, sortable, and trackable.
For example, tag a an entry with @coding and @project1 by running doing now @coding a new plugin for @project1
, and another entry with doing now @coding some stuff for @project2
. Now you can display both entries with doing show @coding
, or just show a single project's entries with doing show @project1
. All of the display and view commands allow combining tags with AND, OR, or NOT booleans.
doing 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:
doing tag -c 3 client cancelled
... will mark the last three entries as @client @cancelled. Add -r
as a switch to remove the listed tags instead. Use --search
to add tags based on search results, and you can do interactive batch tagging using doing select
.
You can also have tags added automatically based on keywords. See Autotagging.
The @done tag is the only tag Doing mandates internally. This is added to an entry when you mark it finished, and the timestamp is included as a tag value in parenthesis, e.g. @done(2021-12-23 05:35)
. Any tag can have a value, but at present Doing doesn't have any means of querying based on tag values.
Doing can also flag entries. By default it uses @flagged, but this can be changed in the configuration. You can add a @flagged tag to the last note with doing flag
. Remove a flag with doing flag -r
.
Each tag used gets an elapsed time (the time between the entry creation and the value of the @done tag) recorded for every entry it appears on. When running display commands, you can use --totals
to see the total time tracked for each tag.
doing show --totals
outputs something like:
The show
command can display entries containing specific tags just by prefixing an argument with @
. doing show @work
will show all entries tagged @work. You can have multiple tag arguments and combine them with booleans (and, or, not). For example, to show all entries tagged both @personal and @writing:
doing show @personal @writing --bool and
Most commands accept a --tag
flag. For example, if you wanted to repeat an entry yesterday tagged @marvelous, you would run doing again --tag marvelous
, and the last entry tagged @marvelous would be duplicated as a new entry. Multiple tags can be combined with commas, and you can define the boolean using --bool
with and
, or
, or not
.
doing again --tag work,project1 --bool and
doing cancel --tag work,writing --bool or
Tags can have values appended in parenthesis. The @done tag is an example of this, where @done(2022-01-15 12:00)
has a date value. A value can be any text or number. For example, you can track progress on something using @progress(50)
or @completed(25%)
, or define a scope using @context(Work)
or @context(Personal)
.
When adding tags with doing tag
, you can include --value VAL
to specify a value for the new tag, e.g. doing tag context --value Personal
would add @context(Personal)
to the last entry. When including tags in the entry title, just add the parenthesis and the value inline.
You can use tag values when displaying entries by including the --val QUERY
flag. The QUERY consists of a tag name, a comparator, and a value. For example, to find all entries with a @done date in the last two weeks, you could use doing show --val "done < 2 weeks ago"
. Multiple --val
flags can be used in a single command. By default these are combined and all value queries must succeed for an entry to be shown. You can change this using --bool OR
to match on any of the queries, or --bool NOT
to skip matching queries. In most cases you can also use --not
to invert the results.
For numeric/date comparisons, you can use <
(less than), >
(greater than), >=
(greater than or equal), <=
(less than or equal), or ==
(equal). For date comparisons, natural language is processed, so you can use done < fri at 5pm
and it will find all entries with a done date before Friday at 5pm. Numeric comparisons allow decimals, and percent symbols are ignored. progress < 50%
would still match @progress(45)
.
For string comparisons, you can use ==
(full string match), ^=
(starts with), $=
(ends with), and *=
(partial match). All string comparisons are case insensitive, and you can use wildcards (? and *) in the value (e.g. --val "project == proj*"
). You can also use basic regular expression syntax (but not ? or *, as those are reserved for wildcards), so if you wanted to match @atag(value1) and @atag(value3), you could use atag == value[13]
.