1
0
mirror of https://github.com/kmein/niveum synced 2026-03-19 11:31:09 +01:00

feat: astro telegram bot sends live updates

This commit is contained in:
2022-01-05 16:40:34 +01:00
parent 5051938679
commit 0656b0eaa3
2 changed files with 8 additions and 6 deletions

View File

@@ -40,15 +40,16 @@ let
in {
niveum.telegramBots.transits = {
enable = true;
time = "0:00";
time = "*:0/1";
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
chatIds = [ "-1001796440545" ];
command = toString (pkgs.writers.writeDash "common-transits" ''
now=$(${pkgs.coreutils}/bin/date +%_H:%M | ${pkgs.gnused}/bin/sed 's/^\s*//')
date=$(${pkgs.coreutils}/bin/date +'%m %d %Y')
{
date=$(${pkgs.coreutils}/bin/date +'%m %d %Y')
${nixpkgs-unstable.astrolog}/bin/astrolog -qd $date -zN Berlin -Yt -Yd -d -R Uranus Neptune Pluto
${nixpkgs-unstable.astrolog}/bin/astrolog -Yt -Yd -q 10 22 1999 6:32 -zN Kassel -td $date -R Uranus Neptune Pluto
} | ${toSymbols} | ${pkgs.coreutils}/bin/sort -n
} | ${toSymbols} | ${pkgs.coreutils}/bin/sort -n | ${pkgs.gnugrep}/bin/grep "^$now" || :
'');
};
}