Skip to content

Instantly share code, notes, and snippets.

@endquote
Last active March 19, 2025 01:44
Show Gist options
  • Save endquote/1204aa389c50001d347fca80e7426fab to your computer and use it in GitHub Desktop.
Save endquote/1204aa389c50001d347fca80e7426fab to your computer and use it in GitHub Desktop.
Querying Obsidian Tasks and grouping them similarly to Things
TQ_extra_instructions TQ_explain TQ_show_task_count TQ_show_postpone_button TQ_show_start_date select_include
# /foo/foo.md or /foo.md ((path regex matches /([^/]+)\/\1\.md$/) OR (path regex matches /^[^/]+\.md$/)) # /[select]/[select].md or /Inbox.md ((root includes {{query.file.property("select_include")}}) OR (filename includes Inbox))
false
false
false
true
SIE/
INPUT[select(
  defaultValue(JS/),
  option(JS/, JS),
  option(SIE/, SIE)
):select_include]

Inbox

filename includes Inbox
not done
sort by happens

Today

filter by function task.happens?.moment?.isBefore(moment().endOf('day')) || false
filename does not include Inbox
group by backlink
not done
sort by happens

This Week

filter by function task.happens?.moment?.isBetween(moment().endOf('day'), moment().add(6, 'days')) || false
group by function task.happens?.moment?.format("DD dddd")
not done
sort by happens

This Year

filter by function task.happens?.moment?.isBetween(moment().add(6, 'days'), moment().endOf('year')) || false
group by function task.happens?.moment?.format("M MMMM")
not done
sort by happens

Next Year+

filter by function task.happens?.moment?.isAfter(moment().endOf('year')) || false
group by function task.happens?.moment?.format("YYYY")
not done
sort by happens

Someday

not done
filename does not include Inbox
group by backlink
no happens date

Completed

done
sort by done reverse
limit 20
show task count

Broken

(description includes πŸ”Ί) OR (description includes ⏫) OR (description includes πŸ”Ό) OR (description includes πŸ”½) OR (description includes ⏬) OR (description includes πŸ›«) OR (description includes βž•) OR (description includes ⏳) OR (description includes πŸ“…) OR (description includes βœ…) OR (description includes ❌) OR (description includes πŸ”) OR (description includes 🏁) OR (description includes β›”) OR (description includes πŸ†”)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment