From 754ed0f898d82fc074b2ad879599c5481cc09374 Mon Sep 17 00:00:00 2001 From: Glenn Date: Sun, 15 Jan 2023 19:08:21 +0100 Subject: [PATCH] doc: Add idea for composable functions --- doc/draft-composable-functions.md | 51 +++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 doc/draft-composable-functions.md diff --git a/doc/draft-composable-functions.md b/doc/draft-composable-functions.md new file mode 100644 index 0000000..7292e88 --- /dev/null +++ b/doc/draft-composable-functions.md @@ -0,0 +1,51 @@ +# Composable functions + +## Example + +### With pipes + + musala-pull SOURCE \ + | musala-add TASK \ + | musala-remove --purge SOMETASK \ + | musala-push DEST + +### With internal filters + +Also writeable like + + musala pull SOURCE % add TASK1 % remove --purge TASK2 % push DEST + + +## Commands + +### musala pull + +Download all tasks from source + +Get tasks from remote source + +Writes tasks as JSON to stdout + +### musala add + +Add new task + +Get tasks from stdin (json) + +Add a new task + +Writes tasks as JSON to stdout + +### musala remove + +* Get tasks from stdin (json) +* Mark a task as removed +* Remove tasks marked as remove (if --purge enabled) +* Writes tasks as JSON to stdout + +### musala push + +* Get tasks from stdin (json) +* Writes tasks to REMOTE DESTINATION + +