Querying grouping & sorting across several text files with the FoldingText Command Line Interface

"Started (with ftdoc:// links)": {
		"title": "## Started This WEEK",
		"for": "$item in //@start < {now}",
		"let": "$day = fn:daypart($item@start)",
		"groupby": "$day",
		"orderby": "$day",
		"return": [
			"### {$day}",
			{
				"for": "$i in $item",
				"orderby": "$i@start",
				"return": "- fn:timepart({$i@start}) {$i} {$i@tags} [Link]({$i@url})"
			},
			""
		]
	},

Based on your recent response, this is pretty close to exactly what I’d want (adapted from your “due with ftdoc links” report).

The only other changes that might be nice would be:

  • if “Link” could be replaced with the file name from which the line came (which in my use, is the project name).
  • if tagged lines brought their descendants (Q1 descendants, from above)