Quick-and-dirty org-agenda

WTF is this

Quickly extract TODOs

  • [X] fast: without having to fire up a hefty emacs process
  • [X] by tag (if given)
  • [X] sorted by priority
  • [X] filter out DONE, FAIL, PURG(atory) etc statuses (redundant)

Assumptions

(based on my own config)

  • org agenda files defined as all *.org files in ~/org and not more than one level deep

Edit to your own taste, particularly you might want to set your own todo_states

Requirements

  • bash v5+

Usage

quick-and-dirty-org-agenda [TAG_1] [TAG_2] .. [TAG_n]

where TAGs are optional

Limitations

  • Items without a priority are listed after items with a priority. That is to say, org-priority-default is not respected. If you want that, fire up the lisp machine, there is only pain in emulating elisp functionality in bash.
  • When selecting tags, sort -u is used to avoid duplicates in the iterative greps. This means that separate items with identical headers will be deduplicated. This is not the case when all items are selected (no tags specified)