aboutsummaryrefslogtreecommitdiff
path: root/cmd/todo
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-05-21 18:56:19 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-05-21 18:56:19 +0200
commit688779fbc61d48046199d1f45549720e289ce417 (patch)
tree4ea8c13d96428176f97c0c27f665391c09a93098 /cmd/todo
parentfb0fd67d6e7e55548c7a0a1ec67f608efffe3a94 (diff)
downloadxmppcb-688779fbc61d48046199d1f45549720e289ce417.tar.gz
xmppcb-688779fbc61d48046199d1f45549720e289ce417.zip
Added support for user generated shell scripts:
- create a director with shell scripts - call them within the chat with @<script-name> - four sample scripts
Diffstat (limited to 'cmd/todo')
-rwxr-xr-xcmd/todo16
1 files changed, 16 insertions, 0 deletions
diff --git a/cmd/todo b/cmd/todo
new file mode 100755
index 0000000..7fb796b
--- /dev/null
+++ b/cmd/todo
@@ -0,0 +1,16 @@
+#!/bin/sh
+# @todo - print the shared to-do list
+#
+# The list lives in todo.md next to this script (cmd/todo.md). Edit that
+# file directly - on the server or by scp - to change it; @todo only
+# reads it, and the next call reflects the edit (no restart).
+
+file="$(dirname "$0")/todo.md"
+
+if [ ! -f "$file" ]; then
+ echo "todo: no list yet - create $file"
+elif [ ! -s "$file" ]; then
+ echo "todo: the list is empty"
+else
+ cat "$file"
+fi