1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

feat: kirčiuoklis script

This commit is contained in:
2021-11-12 20:06:02 +01:00
parent a2b706e787
commit 8738cb4a58
3 changed files with 18 additions and 0 deletions

View File

@@ -125,6 +125,7 @@ in {
scripts.scanned
scripts.default-gateway
scripts.showkeys-toggle
scripts.kirciuoklis
scripts.favicon
scripts.ipa # XSAMPA to IPA converter
scripts.playlist

View File

@@ -106,6 +106,12 @@ in rec {
name = "meteo";
};
kirciuoklis = wrapScript {
packages = [ pkgs.curl pkgs.jq ];
script = ./kirciuoklis.sh;
name = "kirciuoklis";
};
booksplit = wrapScript {
packages = [ pkgs.ffmpeg tag pkgs.glibc.bin ];
script = "${voidrice}/.local/bin/booksplit";

11
packages/scripts/kirciuoklis.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
curl -sSL 'https://kalbu.vdu.lt/wp-admin/admin-ajax.php' -F action=text_accents -F body="$(cat)" \
| jq -r .message \
| if [ "$1" = "--json" ]
then jq .textParts
else jq -r '
.textParts
| map(if has("accented") then .accented else .string end)
| join("")
'
fi