summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <git@lassul.us>2023-09-04 13:44:51 +0200
committerlassulus <git@lassul.us>2023-09-04 13:44:51 +0200
commitde37ad95995c89054fb3a864ce4e56f2b2aa12df (patch)
tree2ebd162013ec4afbcd6eec47a7fcfe5ae83b3779
parent236856503c9507794c9042996f013d1848fde30f (diff)
realwallpaper get_constellations: make importable
-rw-r--r--krebs/5pkgs/simple/realwallpaper/get_constellations.py29
-rw-r--r--lass/2configs/services/radio/news.nix3
2 files changed, 19 insertions, 13 deletions
diff --git a/krebs/5pkgs/simple/realwallpaper/get_constellations.py b/krebs/5pkgs/simple/realwallpaper/get_constellations.py
index 5d8d3df5d..4ba766f6a 100644
--- a/krebs/5pkgs/simple/realwallpaper/get_constellations.py
+++ b/krebs/5pkgs/simple/realwallpaper/get_constellations.py
@@ -18,19 +18,24 @@ def points_to_lines(points):
return lines
-with open(sys.argv[1]) as f:
- constellations = json.load(f)['features']
+def main():
+ with open(sys.argv[1]) as f:
+ constellations = json.load(f)['features']
-output = []
+ output = []
-for const in constellations:
- for line in const['geometry']['coordinates']:
- transformed_line = []
- for point in line:
- transformed_line.append(convert_to_itrs(point))
+ for const in constellations:
+ for line in const['geometry']['coordinates']:
+ transformed_line = []
+ for point in line:
+ transformed_line.append(convert_to_itrs(point))
- line_combined = points_to_lines(transformed_line)
- for l in line_combined: # noqa
- output.append(f'{l[0][0]} {l[0][1]} {l[1][0]} {l[1][1]} # {const["id"]}') # noqa
+ line_combined = points_to_lines(transformed_line)
+ for l in line_combined: # noqa
+ output.append(f'{l[0][0]} {l[0][1]} {l[1][0]} {l[1][1]} # {const["id"]}') # noqa
-print('\n'.join(output))
+ print('\n'.join(output))
+
+
+if __name__ == "__main__":
+ main()
diff --git a/lass/2configs/services/radio/news.nix b/lass/2configs/services/radio/news.nix
index a9cddb62a..b17c2e629 100644
--- a/lass/2configs/services/radio/news.nix
+++ b/lass/2configs/services/radio/news.nix
@@ -10,7 +10,7 @@ let
SPEAKER=$[ $RANDOM % 900 ]
while read line; do
echo "$line" |
- ${pkgs.larynx}/bin/larynx \
+ ${pkgs.piper-tts}/bin/piper \
--model ${pkgs.fetchzip {
url = "https://github.com/rhasspy/piper/releases/download/v0.0.2/voice-en-us-libritts-high.tar.gz";
hash = "sha256-jCoK4p0O7BuF0nr6Sfj40tpivCvU5M3GHKQRg1tfIO8=";
@@ -126,5 +126,6 @@ in
environment.systemPackages = [
send_to_radio
newsshow
+ tts
];
}