From 4258ff5c0c5e287c986b7199158dee1b4c49f1d9 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 12 Aug 2019 23:51:23 +0200 Subject: tv urlwatch: add json' --- tv/2configs/urlwatch.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tv/2configs/urlwatch.nix') diff --git a/tv/2configs/urlwatch.nix b/tv/2configs/urlwatch.nix index 40dc7d23..4fb11106 100644 --- a/tv/2configs/urlwatch.nix +++ b/tv/2configs/urlwatch.nix @@ -1,8 +1,11 @@ with import ; { config, pkgs, ... }: let - json = url: { + json = json' ["."]; + json' = args: url: { inherit url; - filter = "system:${pkgs.jq}/bin/jq ."; + filter = "system:${pkgs.jq}/bin/jq ${ + concatMapStringsSep " " shell.escape (toList args) + }"; }; in { krebs.urlwatch = { -- cgit v1.2.3 From f319d31e3641ec4b9e235cb77933d5c98f0cd6a4 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 12 Aug 2019 23:51:43 +0200 Subject: tv urlwatch: add xml and xml' --- tv/2configs/urlwatch.nix | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tv/2configs/urlwatch.nix') diff --git a/tv/2configs/urlwatch.nix b/tv/2configs/urlwatch.nix index 4fb11106..b2364e6e 100644 --- a/tv/2configs/urlwatch.nix +++ b/tv/2configs/urlwatch.nix @@ -7,6 +7,13 @@ with import ; concatMapStringsSep " " shell.escape (toList args) }"; }; + xml = xml' ["--format" "-"]; + xml' = args: url: { + inherit url; + filter = "system:${pkgs.libxml2}/bin/xmllint ${ + concatMapStringsSep " " shell.escape (toList args) + }"; + }; in { krebs.urlwatch = { enable = true; -- cgit v1.2.3 From 8527caef164fe872dd9c77772d1e6ed7a0a85b77 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 13 Aug 2019 00:02:54 +0200 Subject: tv urlwatch: add exec --- tv/2configs/urlwatch.nix | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'tv/2configs/urlwatch.nix') diff --git a/tv/2configs/urlwatch.nix b/tv/2configs/urlwatch.nix index b2364e6e..378b5d16 100644 --- a/tv/2configs/urlwatch.nix +++ b/tv/2configs/urlwatch.nix @@ -1,19 +1,15 @@ with import ; { config, pkgs, ... }: let - json = json' ["."]; - json' = args: url: { + exec = filename: args: url: { inherit url; - filter = "system:${pkgs.jq}/bin/jq ${ - concatMapStringsSep " " shell.escape (toList args) + filter = "system:${ + concatMapStringsSep " " shell.escape ([filename] ++ toList args) }"; }; + json = json' ["."]; + json' = exec "${pkgs.jq}/bin/jq"; xml = xml' ["--format" "-"]; - xml' = args: url: { - inherit url; - filter = "system:${pkgs.libxml2}/bin/xmllint ${ - concatMapStringsSep " " shell.escape (toList args) - }"; - }; + xml' = exec "${pkgs.libxml2}/bin/xmllint"; in { krebs.urlwatch = { enable = true; -- cgit v1.2.3