1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

fix(panoptikon): add watcher name to commit message, random delay 1h, ignore html errors, #xxx notification

This commit is contained in:
2023-03-31 10:59:52 +02:00
parent c20a9e3098
commit ffc5f9b596
3 changed files with 4 additions and 4 deletions

View File

@@ -9,7 +9,7 @@
url = address: url = address:
pkgs.writers.writeDash "watch-url" '' pkgs.writers.writeDash "watch-url" ''
${pkgs.curl}/bin/curl -sSL ${lib.escapeShellArg address} \ ${pkgs.curl}/bin/curl -sSL ${lib.escapeShellArg address} \
| ${pkgs.python3Packages.html2text}/bin/html2text | ${pkgs.python3Packages.html2text}/bin/html2text --decode-errors=ignore
''; '';
urlSelector = selector: address: urlSelector = selector: address:
pkgs.writers.writeDash "watch-url-selector" '' pkgs.writers.writeDash "watch-url-selector" ''

View File

@@ -67,7 +67,7 @@
systemd.timers = lib.attrsets.mapAttrs' (watcherName: _: systemd.timers = lib.attrsets.mapAttrs' (watcherName: _:
lib.nameValuePair "panoptikon-${watcherName}" { lib.nameValuePair "panoptikon-${watcherName}" {
timerConfig.RandomizedDelaySec = "60"; timerConfig.RandomizedDelaySec = toString (60 * 60);
}) })
cfg.watchers; cfg.watchers;
@@ -114,7 +114,7 @@
${watcherOptions.script} > ${watcherName} ${watcherOptions.script} > ${watcherName}
${pkgs.git}/bin/git add ${watcherName} ${pkgs.git}/bin/git add ${watcherName}
${pkgs.git}/bin/git commit --message "$(${pkgs.coreutils}/bin/date -Is)" || : ${pkgs.git}/bin/git commit --message "${watcherName} / $(${pkgs.coreutils}/bin/date -Is)" || :
if [ -n "$(${pkgs.git}/bin/git diff HEAD^ -- ${watcherName})" ]; then if [ -n "$(${pkgs.git}/bin/git diff HEAD^ -- ${watcherName})" ]; then
${lib.strings.concatMapStringsSep "\n" (reporter: '' ${lib.strings.concatMapStringsSep "\n" (reporter: ''

View File

@@ -9,7 +9,7 @@
panoptikon = niveumLib.panoptikon {inherit pkgs lib niveumPackages config;}; panoptikon = niveumLib.panoptikon {inherit pkgs lib niveumPackages config;};
irc-xxx = panoptikon.kpaste-irc { irc-xxx = panoptikon.kpaste-irc {
target = "#xxx"; target = lib.escapeShellArg "#xxx";
retiolumLink = true; retiolumLink = true;
}; };