ref: 95ef1b2259790e01c9dda588eeabb67e884df834
parent: f30683e38b8d611db965670be6c906e612458cd7
author: Michael Misch <michaelmisch1985@gmail.com>
date: Tue Apr 22 03:22:15 PDT 2025
Small updates: - Hash the synopsis to create a tag - Update README
--- /dev/null
+++ b/.task/4f7c8845
@@ -1,0 +1,4 @@
+# rm this
+
+[x] Item
+[x] Next
--- /dev/null
+++ b/.task/9ed3252d
@@ -1,0 +1,5 @@
+# Task manager that can handle queries `walk/fs`
+
+[x] Parse all task files
+[ ] Build graph out of any linkages
+[x] Write out results based on requests
--- /dev/null
+++ b/.task/b2970981
@@ -1,0 +1,3 @@
+# Git integration
+
+[ ] Parse the .task directory on hook to mark completion, commit message, etc
--- /dev/null
+++ b/.task/b88535a3
@@ -1,0 +1,4 @@
+# Clean systems integration
+
+[ ] Plumbing files for // TODO, # TODO, etc
+[ ] Mneu building
--- /dev/null
+++ b/.task/e0e8c98d
@@ -1,0 +1,6 @@
+# Initial release
+
+[x] Set up walk
+[ ] Commands working from any child directory
+[ ] Showcase plumbing integration
+[ ] Plumbable format
--- a/README.md
+++ b/README.md
@@ -10,17 +10,15 @@
## Commands
-`task/init` is use to create a new barebones project, with no tasks or namespace files. The project will be created with the basename of current directory, or `name` if given.
-
(See [this post](https://hlfw.ca/blog/2024-08-24-more-setup.html) for inspiration, and further integration.)
- `task/add` is used to manage or add a task to the graph, usage is similar to git/commit - the hold editor will be used by default, ctrl+d is used to signal completion. `-c $tag` is used to change an existing task. Passing `-e` will use your default editor instead of hold mode. Any args afterwards will be passed along as the `synopsis` for the task
+ `task/add` - manage or add a task to the graph, usage is similar to git/commit. The hold editor will be used by default, ctrl+d is used to signal completion. `-c $tag` is used to change an existing task. Passing `-e` will use your default editor instead of hold mode. Any args afterwards will be passed along as the `synopsis` for the task.
-`task/rm` removes a given completed task. With `-f`, all matching tags are removed. With `-a`, all completed tags are checked for removal.
+`task/rm` - removes a given completed task. With `-f`, all matching tags are removed. With `-a`, all completed tags are checked for removal.
-`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/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
+`task/mark` - 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:
@@ -38,6 +36,4 @@
## TODO
-- Showcase plumbing integration
-- potential git integration (completed new task, git/commit could parse the .task/ directory, add the synopsis of the completed ones and/or a formatted task lists, and then finally task/rm the task after committing)
-
+- The work to be done is in the `./todo` files!
\ No newline at end of file
--- a/add
+++ b/add
@@ -22,22 +22,24 @@
echo 'nothing to add' >[1=2]
exit 'message'
}
- ## TODO: Check if we have hold as editor, otherwise just cp here
+ # TODO: Check if we have hold as editor, otherwise just cp here
cat $msgfile.tmp >> $msgfile
}
fn gettag{
- # Fetch he last numerical tag in the dir
- tag=`{ls .task/*[0-9] | tail -1 | sed 's#.task/##'}
if(! ~ $#change 0)
tag=$change
if not
- tag=`{echo $tag^+1 | bc}
+ tag=`{echo $synopsis | sum | awk '{print $1}'}
}
fn finish{
+ #mkdir .task >[2]/dev/null
cp $msgfile .task/$tag
- echo 'Tag: '$tag
+ if(! ~ $#change 0)
+ echo 'Updated: '$tag
+ if not
+ echo 'Created: '$tag
}
fn sigexit{
--- a/rm
+++ b/rm
@@ -1,18 +1,12 @@
#!/bin/rc -e
rfork ne
-fn cleanlinks {
- # Walk through any related tags, and remove any blockable references
-}
-
fn checkstate {
if(! ~ $#all 0){
if(! ~ $#force 0)
rmlist=`{ls .task}
if not {
- # TODO: This will need to be filtered to just our project after
- #rmlist=`{task/walk -c -fC -p $project}
- rmlist=`{task/walk -c -fC}
+ rmlist=`{task/walk -t -fD}
}
}
if not {
@@ -19,16 +13,18 @@
if(! ~ $#force 0)
rmlist=`{ls .task/$tag}
if not
- rmlist=`{task/walk -q fC $tag && ls .task/$tag}
+ rmlist=`{task/walk -t -fD}
}
+ if(~ $#rmlist 0){
+ echo 'no tag' >[1=2]
+ exit 'tag'
+ }
}
fn rmtask {
for(m in $rmlist){
- # TODO: when we have multiproject
- #echo $project/$m completed
echo $m completed
- rm $m
+ #rm $m
}
}
@@ -40,6 +36,5 @@
flag e +
checkstate
rmtask
- cleanlinks
} || echo 'could not rm task:' $status >[1=2]
exit ''
--- a/walk
+++ b/walk
@@ -32,9 +32,9 @@
if (! ~ $#tags 0)
echo $tag
if not if (~ $#chars 0)
- echo $flag $synopsis '['^$tag^']'
+ echo $flag $synopsis -- '#'^$tag
if not
- echo $synopsis '['^$tag^']'
+ echo $synopsis -- '#'^$tag
}
if not
echo -n ''