hlfw.ca

task

Download patch

ref: f30683e38b8d611db965670be6c906e612458cd7
parent: 39e4f6dd2894bef24701cf7d4fd616abd22c00b1
author: Michael Misch <michaelmisch1985@gmail.com>
date: Tue Sep 10 01:46:48 PDT 2024

Update some more broken pieces

--- a/README.md
+++ b/README.md
@@ -20,6 +20,8 @@
 
 `task/walk` shows the status of tasks in the graph. It prints a list of tasks prefixed with the status character. The -c flag disables printing the status characters. The -q option suppresses all output. The -f option filters tasks by status, and only matching items are printed. By default, the filters are DNS.
 
+`task/mark` is meant to be ran with via plumber rules. It takes the path to the project, and a string like `[ ] some checklist item` that exists in one of the tasks. This will swap it to `[x] some checklist item`. This assumes that all subtasks in your `.task` dir will be unique
+
 The task status characters are as follows:
 
 - A	This task has been attempted, but is blocked
--- a/add
+++ b/add
@@ -16,8 +16,7 @@
 			cp $msgfile.tmp $msgfile
 			editor=hold
 		}
-		$editor $mw
-sgfile.tmp
+		$editor $msgfile.tmp
 	}
 	if(! test -s $msgfile.tmp){
 		echo 'nothing to add' >[1=2]
@@ -38,8 +37,7 @@
 
 fn finish{
 	cp $msgfile .task/$tag
-	# TODO: . common.rc to set $project, as it's useful for our outputs
-	#echo '$project:$tag'
+	echo 'Tag: '$tag
 }
 
 fn sigexit{
@@ -51,10 +49,8 @@
 
 flagfmt='c:change change, e:edit'; args='[msg ...]'
 eval `''{aux/getflags $*} || exec aux/usage
-
 msgfile=/tmp/task.$pid
 
-# Bit o messy initialization, but that's ok.
 if(! ~ $#* 0)
 	synopsis=`{echo $*}
 if(! ~ $#change 0){
--- a/mkfile
+++ b/mkfile
@@ -4,6 +4,7 @@
 
 RC=\
 	add\
+	mark\
 	rm\
 	show\
 	walk\
--- a/walk
+++ b/walk
@@ -29,13 +29,17 @@
 	}
 	if(~ $#quiet 0){
 		if (echo $flags | grep -s $flag){
-			if (~ $#chars 0)
+			if (! ~ $#tags 0)
+				echo $tag
+			if not if (~ $#chars 0)
 				echo $flag $synopsis '['^$tag^']' 
 			if not
 				echo $synopsis '['^$tag^']' 
 		}
+		if not
+			echo -n ''
 	}
-	echo -n ''
+
 }
 
 fn checktask {
@@ -92,8 +96,11 @@
 }
 
 fn parselist {
-	for (t in $tasks)
-		cat $t | checktask | printtask $t
+	if (~ $#tasks 0)
+		echo -n ''
+	if not
+		for (t in $tasks)
+			cat $t | checktask | printtask $t
 }
 
 fn mklist {
@@ -106,7 +113,7 @@
 }
 
 tasks=()
-flagfmt='c:chars, q:quiet, f:flags flags'; args='[projects ...]'
+flagfmt='c:chars, q:quiet, t:tags, f:flags flags'; args='[projects ...]'
 eval `''{aux/getflags $*} || exec aux/usage
 
 if (~ $#flags 0)