mirror of
https://github.com/kmein/niveum
synced 2026-03-23 05:11:08 +01:00
Compare commits
4 Commits
c6a45b421b
...
cdf42df7c1
| Author | SHA1 | Date | |
|---|---|---|---|
| cdf42df7c1 | |||
| 3ccf0cfe9a | |||
| 83632cbd9c | |||
|
|
092879a425 |
65
.bin/prospekte.sh
Executable file
65
.bin/prospekte.sh
Executable file
@@ -0,0 +1,65 @@
|
||||
#!/bin/sh
|
||||
lidl() {
|
||||
echo LIDL
|
||||
curl -sSL 'https://endpoints.lidl-flyer.com/v3/region-overview/lidl/de-DE/0.json' \
|
||||
| jq -r '
|
||||
.categories
|
||||
| map(select(.name == "Filial-Angebote") | .subcategories | map(.flyers))
|
||||
| flatten
|
||||
| flatten
|
||||
| .[]
|
||||
| .pdfUrl
|
||||
'
|
||||
}
|
||||
|
||||
aldi_nord() {
|
||||
echo ALDI nord
|
||||
echo 'https://magazine.aldi-nord.de/aldi-nord/aldi-aktuell/GetPDF.ashx'
|
||||
echo 'https://magazine.aldi-nord.de/aldi-nord/aldi-vorschau/GetPDF.ashx'
|
||||
}
|
||||
|
||||
rewe_berlin() {(
|
||||
store_id=662366923
|
||||
publisher_id=1062
|
||||
|
||||
echo REWE
|
||||
curl -sSL 'https://www.bonialserviceswidget.de/de/stores/'$store_id'/brochures?storeId='$store_id'&publisherId='$publisher_id | while read -r brochure_id; do
|
||||
curl -sSL 'https://www.bonialserviceswidget.de/de/v5/brochureDetails/'"$brochure_id"'?publisherId='$publisher_id | jq -r .pdfUrl
|
||||
done
|
||||
)}
|
||||
|
||||
kaufland() {(
|
||||
region_code=8920
|
||||
echo KAUFLAND
|
||||
curl -sSL https://filiale.kaufland.de/prospekte.html | htmlq --attribute href '.flyer a' | grep -Eo 'DE_de_KDZ[^/]*' | sed "s/_3000_/_${region_code}_/" | while read -r flyer_id; do
|
||||
curl -sSL "https://endpoints.leaflets.kaufland.com/v3/$flyer_id/flyer.json?regionCode=$region_code" | jq -r .flyer.pdfUrl
|
||||
done
|
||||
)}
|
||||
|
||||
netto_schwarz() {
|
||||
echo 'NETTO (schwarz)'
|
||||
curl -sSL 'https://squid-api.tjek.com/v2/catalogs?dealer_ids=90f2VL&order_by=created' \
|
||||
| jq -r '.[] | .id' \
|
||||
| while read -r flyer_id; do
|
||||
curl -sSL "https://squid-api.tjek.com/v2/catalogs/$flyer_id/download" \
|
||||
| jq -r .pdf_url
|
||||
done
|
||||
}
|
||||
|
||||
dir="$(mktemp -d)"
|
||||
trap clean EXIT
|
||||
|
||||
clean() {
|
||||
rm -rf "$dir"
|
||||
}
|
||||
|
||||
prospekt_url="$( (
|
||||
lidl
|
||||
aldi_nord
|
||||
rewe_berlin
|
||||
kaufland
|
||||
netto_schwarz
|
||||
) | fzf)"
|
||||
|
||||
curl -sSL "$prospekt_url" -o "$dir/prospekt.pdf"
|
||||
zathura "$dir/prospekt.pdf"
|
||||
15
.bin/tuesday-1800
Executable file
15
.bin/tuesday-1800
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
expected_max_results=1024 # the upper bound on the number of restaurants
|
||||
radius=500
|
||||
|
||||
echo '[out:json];node(id:260050809)->.cbase;
|
||||
(
|
||||
way(around.cbase:'$radius')[amenity=restaurant];
|
||||
node(around.cbase:'$radius')[amenity=restaurant];
|
||||
);out;' \
|
||||
| curl -sSL -d @- -X POST http://overpass-api.de/api/interpreter \
|
||||
| jq --argjson random "$(shuf -i 0-$expected_max_results -n 1)" '
|
||||
.elements
|
||||
| length as $length
|
||||
| .[$random % $length]
|
||||
'
|
||||
12
flake.lock
generated
12
flake.lock
generated
@@ -110,11 +110,11 @@
|
||||
},
|
||||
"nixos-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1663855239,
|
||||
"narHash": "sha256-A2B7rlFKmBikRwz/cmayWcTAhyIOdp2whjVCDGhg9Xw=",
|
||||
"lastModified": 1663939948,
|
||||
"narHash": "sha256-tZROWStjk7aXbM6XTbspRb9dSk/4lw7EFBOrt2A09Ag=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "bcc68429a50c4ac051920c72c60e417202c19d79",
|
||||
"rev": "7e27b838cd7ac90fed03d0d5a8487848c4b0b6d2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -159,11 +159,11 @@
|
||||
"retiolum": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1660680907,
|
||||
"narHash": "sha256-D6XkykgU1BiDAnnFG9NwSqBRKCZAHK+2+Ri2/m9rzo8=",
|
||||
"lastModified": 1664019034,
|
||||
"narHash": "sha256-do31QxpQtmuWclx9yhM6UslVO7XdXofLbXZ4nr3fLJ0=",
|
||||
"owner": "krebs",
|
||||
"repo": "retiolum",
|
||||
"rev": "c4d6b07be29b3b9267027ed25792a2cb350459d5",
|
||||
"rev": "8d9b86a0ce503588bb34ae8676fdbcb0e4014119",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
in {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
# <niveum/configs/monitoring.nix>
|
||||
<niveum/configs/monitoring.nix>
|
||||
<niveum/configs/nix.nix>
|
||||
<niveum/configs/save-space.nix>
|
||||
<niveum/configs/spacetime.nix>
|
||||
|
||||
@@ -258,6 +258,16 @@ in {
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "ful";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [
|
||||
"ful.r:${toString config.services.prometheus.exporters.node.port}"
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
services.prometheus.exporters.blackbox = {
|
||||
|
||||
Reference in New Issue
Block a user