2022-03-10 21:52:12 +01:00
|
|
|
{
|
|
|
|
|
jq,
|
|
|
|
|
runCommand,
|
|
|
|
|
fetchFromGitHub,
|
|
|
|
|
}: let
|
2021-01-23 17:12:08 +01:00
|
|
|
online-radio = fetchFromGitHub {
|
2021-09-11 07:57:08 +02:00
|
|
|
owner = "kmein";
|
2021-01-23 17:12:08 +01:00
|
|
|
repo = "online-radio";
|
|
|
|
|
rev = "04d16421355196194a05e5504ba8f66a9c07ee7b";
|
|
|
|
|
sha256 = "1q0iagx7df0sd6vl5anvpzyiw4jdwa6c67z45rx622a6cr6m4zzl";
|
|
|
|
|
};
|
2022-03-10 21:52:12 +01:00
|
|
|
in
|
|
|
|
|
runCommand "worldradio.m3u" {} ''
|
|
|
|
|
${jq}/bin/jq --raw-output --slurp 'flatten | map(.url_resolved) | .[]' ${online-radio}/src/data/countries/*.json \
|
|
|
|
|
| sort \
|
|
|
|
|
| uniq \
|
|
|
|
|
> $out
|
|
|
|
|
''
|
2021-05-02 18:55:54 +02:00
|
|
|
# anthoer method for running a world radio using Icecast Directory
|
|
|
|
|
# curl http://dir.xiph.org/ | pup 'a[href^=http]:contains("Play") attr{href}'
|
2022-03-10 21:52:12 +01:00
|
|
|
|