Reaktor plugins: add wiki-todo

This commit is contained in:
lassulus 2017-09-01 21:32:36 +02:00
parent bd09ea6e3b
commit 1234efe72d

View File

@ -128,4 +128,23 @@ rec {
'';
});
wiki-todo-add = buildSimpleReaktorPlugin "wiki-todo-add" {
pattern = "^wiki-todo: (?P<args>.*)$$";
script = pkgs.writeDash "wiki-todo-add" ''
echo "$@" >> wiki-todo
echo "added todo"
'';
};
wiki-todo-done = buildSimpleReaktorPlugin "wiki-todo-done" {
pattern = "^wiki-todo-done: (?P<args>.*)$$";
script = pkgs.writeDash "wiki-todo-done" ''
${pkgs.gnugrep}/bin/grep -vFx "$@" wiki-todo > wiki-todo.tmp
${pkgs.coreutils}/bin/mv wiki-todo.tmp wiki-todo
'';
};
wiki-todo-show = buildSimpleReaktorPlugin "wiki-todo" {
script = pkgs.writeDash "wiki-todo-add" ''
${pkgs.coreutils}/bin/cat wiki-todo
'';
};
}