mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
feat: replace urlwatch by panoptikon
This commit is contained in:
@@ -18,6 +18,13 @@
|
||||
${pkgs.curl}/bin/curl -sSL ${lib.escapeShellArg address} | ${pkgs.jq}/bin/jq
|
||||
'';
|
||||
|
||||
urlSelector = selector: address:
|
||||
pkgs.writers.writeDash "watch-url-selector" ''
|
||||
${pkgs.curl}/bin/curl -sSL ${lib.escapeShellArg address} \
|
||||
| ${pkgs.htmlq}/bin/htmlq ${lib.escapeShellArg selector} \
|
||||
| ${pkgs.python3Packages.html2text}/bin/html2text
|
||||
'';
|
||||
|
||||
reporters.irc-xxx = pkgs.writers.writeDash "irc-xxx" ''
|
||||
${kpaste} \
|
||||
| ${pkgs.gnused}/bin/sed -n '2s/^/change detected: /p' \
|
||||
@@ -26,16 +33,87 @@
|
||||
--server irc.r \
|
||||
--target '#xxx'
|
||||
'';
|
||||
|
||||
reporters.irc-kmein = pkgs.writers.writeDash "irc-xxx" ''
|
||||
${kpaste} \
|
||||
| ${pkgs.gnused}/bin/sed -n "3s/^/$PANOPTIKON_WATCHER: /p" \
|
||||
| ${config.nur.repos.mic92.ircsink}/bin/ircsink \
|
||||
--nick panoptikon-kmein \
|
||||
--server irc.r \
|
||||
--target 'kmein'
|
||||
'';
|
||||
in {
|
||||
services.panoptikon = {
|
||||
enable = true;
|
||||
watchers."github-meta" = {
|
||||
script = urlJSON "https://api.github.com/meta";
|
||||
reporters = [reporters.irc-xxx];
|
||||
};
|
||||
watchers.spiegel = {
|
||||
script = url "https://www.spiegel.de/";
|
||||
reporters = [];
|
||||
watchers = {
|
||||
"github-meta" = {
|
||||
script = urlJSON "https://api.github.com/meta";
|
||||
reporters = [reporters.irc-xxx];
|
||||
};
|
||||
lammla = {
|
||||
script = url "http://lammla.info/index.php?reihe=30";
|
||||
reporters = [reporters.irc-kmein];
|
||||
};
|
||||
kratylos = {
|
||||
script = url "https://kratylos.reichert-online.org/current_issue/KRATYLOS";
|
||||
reporters = [reporters.irc-kmein];
|
||||
};
|
||||
zeno-free = {
|
||||
script = urlSelector ".zenoCOMain" "http://www.zeno.org/Lesesaal/M/E-Books";
|
||||
reporters = [reporters.irc-kmein];
|
||||
};
|
||||
carolinawelslau = {
|
||||
script = urlSelector "#main" "https://carolinawelslau.de/";
|
||||
reporters = [reporters.irc-kmein];
|
||||
};
|
||||
lisalittmann = {
|
||||
script = urlSelector "#main" "https://lisalittmann.de/";
|
||||
reporters = [reporters.irc-kmein];
|
||||
};
|
||||
lisalittmann-archive = {
|
||||
script = urlSelector "#main" "https://lisalittmann.de/archive/";
|
||||
reporters = [reporters.irc-kmein];
|
||||
};
|
||||
lisalittmann-projects = {
|
||||
script = urlSelector "#main" "https://lisalittmann.de/projects/";
|
||||
reporters = [reporters.irc-kmein];
|
||||
};
|
||||
tatort = {
|
||||
script = urlSelector ".linklist" "https://www.daserste.de/unterhaltung/krimi/tatort/sendung/index.html";
|
||||
reporters = [reporters.irc-kmein];
|
||||
};
|
||||
warpgrid-idiomarium = {
|
||||
script = urlSelector "#site-content" "https://warpgrid.de/idiomarium/";
|
||||
reporters = [reporters.irc-kmein];
|
||||
};
|
||||
warpgrid-futurism = {
|
||||
script = urlSelector "#site-content" "https://warpgrid.de/futurism/";
|
||||
reporters = [reporters.irc-kmein];
|
||||
};
|
||||
warpgrid-imagiary = {
|
||||
script = urlSelector "#site-content" "https://warpgrid.de/imagiary/";
|
||||
reporters = [reporters.irc-kmein];
|
||||
};
|
||||
warpgrid-alchemy = {
|
||||
script = urlSelector "#site-content" "https://warpgrid.de/alchemy/";
|
||||
reporters = [reporters.irc-kmein];
|
||||
};
|
||||
indogermanische-forschungen = {
|
||||
script = urlSelector "#latestIssue" "https://www.degruyter.com/journal/key/INDO/html";
|
||||
reporters = [reporters.irc-kmein];
|
||||
};
|
||||
ig-neuigkeiten = {
|
||||
script = urlSelector "[itemprop=articleBody]" "https://www.indogermanistik.org/aktuelles/neuigkeiten.html";
|
||||
reporters = [reporters.irc-kmein];
|
||||
};
|
||||
ig-tagungen = {
|
||||
script = urlSelector "[itemprop=articleBody]" "https://www.indogermanistik.org/aktuelles/tagungen-der-ig.html";
|
||||
reporters = [reporters.irc-kmein];
|
||||
};
|
||||
fxght-or-flxght = {
|
||||
script = urlJSON "https://api.tellonym.me/profiles/name/fxght.or.flxght?limit=20";
|
||||
reporters = [reporters.irc-kmein];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user