summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/Reaktor/plugins.nix
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/5pkgs/simple/Reaktor/plugins.nix')
-rw-r--r--krebs/5pkgs/simple/Reaktor/plugins.nix15
1 files changed, 14 insertions, 1 deletions
diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix
index c39e39799..7573c9256 100644
--- a/krebs/5pkgs/simple/Reaktor/plugins.nix
+++ b/krebs/5pkgs/simple/Reaktor/plugins.nix
@@ -120,7 +120,7 @@ rec {
url-title = (buildSimpleReaktorPlugin "url-title" {
pattern = "^.*(?P<args>http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+).*$$";
path = with pkgs; [ curl perl ];
- script = pkgs.writePython3 [ "beautifulsoup4" "lxml" ] "url-title" ''
+ script = pkgs.writePython3 "url-title" [ "beautifulsoup4" "lxml" ] ''
import sys
import urllib.request
from bs4 import BeautifulSoup
@@ -141,6 +141,19 @@ rec {
'';
});
+ taskwarrior = buildSimpleReaktorPlugin "task" {
+ pattern = "^task: (?P<args>.*)$$";
+ script = let
+ taskrc = "$HOME/.taskrc";
+ in
+ pkgs.writeDash "task-wrapper" ''
+ if [ -f ${taskrc} ] ; then
+ touch ${taskrc}
+ fi
+ ${pkgs.taskwarrior}/bin/task "$*"
+ '';
+ };
+
todo = name: {
add = buildSimpleReaktorPlugin "${name}-add" {
pattern = "^${name}-add: (?P<args>.*)$$";