From 1665703c4562ca454e5aafd62105715fb8561238 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 19 Jun 2018 21:23:35 +0200 Subject: nix-writers: init submodule --- krebs/5pkgs/simple/Reaktor/plugins.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs/5pkgs/simple/Reaktor') diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix index c39e39799..2df76fb2f 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 = "^.*(?Phttp[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 -- cgit v1.2.3 From 8cde86561a54652541d9a6c90109d5aa438c21f5 Mon Sep 17 00:00:00 2001 From: jeschli Date: Tue, 3 Jul 2018 20:34:29 +0200 Subject: Reaktor plugins: +taskwarrior --- krebs/5pkgs/simple/Reaktor/plugins.nix | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'krebs/5pkgs/simple/Reaktor') diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix index c39e39799..4016b6a16 100644 --- a/krebs/5pkgs/simple/Reaktor/plugins.nix +++ b/krebs/5pkgs/simple/Reaktor/plugins.nix @@ -141,6 +141,13 @@ rec { ''; }); + taskwarrior = buildSimpleReaktorPlugin "task" { + pattern = "^task: (?P.*)$$"; + script = pkgs.writeDash "task-wrapper" '' + task "$*" + ''; + }; + todo = name: { add = buildSimpleReaktorPlugin "${name}-add" { pattern = "^${name}-add: (?P.*)$$"; -- cgit v1.2.3 From 70e8c4b0a4255a989bf93fe6fca96244ee617eee Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 3 Jul 2018 21:35:43 +0200 Subject: Reaktor taskwarrior: fix path to taskwarrior --- krebs/5pkgs/simple/Reaktor/plugins.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs/5pkgs/simple/Reaktor') diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix index 418a3c73c..cd389366e 100644 --- a/krebs/5pkgs/simple/Reaktor/plugins.nix +++ b/krebs/5pkgs/simple/Reaktor/plugins.nix @@ -144,7 +144,7 @@ rec { taskwarrior = buildSimpleReaktorPlugin "task" { pattern = "^task: (?P.*)$$"; script = pkgs.writeDash "task-wrapper" '' - task "$*" + ${pkgs.taskwarrior}/bin/task "$*" ''; }; -- cgit v1.2.3 From d6df7ae483b984b90bdc8d4540301ef394885a98 Mon Sep 17 00:00:00 2001 From: jeschli Date: Tue, 3 Jul 2018 22:22:49 +0200 Subject: Reaktor taskwarrior: touch if no taskrc exists --- krebs/5pkgs/simple/Reaktor/plugins.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'krebs/5pkgs/simple/Reaktor') diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix index cd389366e..7573c9256 100644 --- a/krebs/5pkgs/simple/Reaktor/plugins.nix +++ b/krebs/5pkgs/simple/Reaktor/plugins.nix @@ -143,9 +143,15 @@ rec { taskwarrior = buildSimpleReaktorPlugin "task" { pattern = "^task: (?P.*)$$"; - script = pkgs.writeDash "task-wrapper" '' - ${pkgs.taskwarrior}/bin/task "$*" - ''; + script = let + taskrc = "$HOME/.taskrc"; + in + pkgs.writeDash "task-wrapper" '' + if [ -f ${taskrc} ] ; then + touch ${taskrc} + fi + ${pkgs.taskwarrior}/bin/task "$*" + ''; }; todo = name: { -- cgit v1.2.3