mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
feat(urlwatch): tellonym
This commit is contained in:
@@ -29,6 +29,23 @@ let
|
|||||||
"strip"
|
"strip"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "fxght.or.flxght";
|
||||||
|
url = "https://api.tellonym.me/profiles/name/fxght.or.flxght?limit=20";
|
||||||
|
headers.tellonym-client = "web:0.52.0";
|
||||||
|
filter = [
|
||||||
|
{
|
||||||
|
shellpipe = ''
|
||||||
|
${pkgs.jq}/bin/jq '.answers | map({
|
||||||
|
question: .tell,
|
||||||
|
answer: .answer,
|
||||||
|
date: .createdAt,
|
||||||
|
media: .media | map(.url)
|
||||||
|
})'
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
configFile = pkgs.writeText "urlwatch.yaml" (builtins.toJSON {
|
configFile = pkgs.writeText "urlwatch.yaml" (builtins.toJSON {
|
||||||
@@ -66,6 +83,9 @@ let
|
|||||||
# };
|
# };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
urlwatch = pkgs.urlwatch.overrideAttrs (attrs: {
|
||||||
|
patches = [ <niveum/packages/urlwatch-insecure.patch> ];
|
||||||
|
});
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
users.extraUsers.urlwatch = {
|
users.extraUsers.urlwatch = {
|
||||||
@@ -77,7 +97,7 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
startAt = "*-*-* 05:00:00";
|
startAt = "*-*-* 05:00:00";
|
||||||
script = ''
|
script = ''
|
||||||
${pkgs.urlwatch}/bin/urlwatch \
|
${urlwatch}/bin/urlwatch \
|
||||||
--config=${lib.escapeShellArg configFile} \
|
--config=${lib.escapeShellArg configFile} \
|
||||||
--urls=${lib.escapeShellArg urlsFile}
|
--urls=${lib.escapeShellArg urlsFile}
|
||||||
'';
|
'';
|
||||||
|
|||||||
12
packages/urlwatch-insecure.patch
Normal file
12
packages/urlwatch-insecure.patch
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
diff --git a/lib/urlwatch/storage.py b/lib/urlwatch/storage.py
|
||||||
|
index 3f6160f..03979f0 100644
|
||||||
|
--- a/lib/urlwatch/storage.py
|
||||||
|
+++ b/lib/urlwatch/storage.py
|
||||||
|
@@ -292,7 +292,6 @@ class UrlsBaseFileStorage(BaseTextualFileStorage, metaclass=ABCMeta):
|
||||||
|
shelljob_errors = self.shelljob_security_checks()
|
||||||
|
if shelljob_errors and any(is_shell_job(job) for job in jobs):
|
||||||
|
print(('Removing shell jobs, because %s' % (' and '.join(shelljob_errors),)))
|
||||||
|
- jobs = [job for job in jobs if not is_shell_job(job)]
|
||||||
|
|
||||||
|
return jobs
|
||||||
|
|
||||||
Reference in New Issue
Block a user