-
-
Notifications
You must be signed in to change notification settings - Fork 91
Custom Views
You can create your own "views" in the ~/.doingrc
file and view them with doing view view_name
. Just add a section like this:
views:
old:
section: Archive
count: 5
wrap_width: 0
date_format: '%F %_I:%M%P'
template: '%date | %title%note'
order: asc
tags: done finished cancelled
tags_bool: ANY
only_timed: false
tag_sort: time
tag_order: asc
totals: true
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:
views:
later:
title: Stuff to do later
section: Later
count: 5
wrap_width: 60
date_format: '%F %_I:%M%P'
template: '%date | %title%note'
old:
section: Old
count: 5
wrap_width: 0
date_format: '%F %_I:%M%P'
template: '%date | %title%note'
The title
key is optional, it only affects output options like HTML where there's a page title shown. If it's missing, the title will be generated from an appropriate combination of section or tag filters.
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.
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.
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.
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
.
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.
Regarding colors, you can use them to create very nice displays if you're outputting to a color terminal. Example:
color:
date_format: '%F %_I:%M%P'
section: Currently
count: 10
wrap_width: 0
template: '%boldblack%date %boldgreen| %boldwhite%title%default%note'
Outputs:
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.