m3u-radio-music-playlists/stuff/radio.pervii.sh
U-DESKTOP-3VIS1T9\junguler 0d4e52d60e extract everything-repo files
2023-06-12 17:10:31 +03:30

23 lines
917 B
Bash
Executable File

#!/bin/bash
# scrape the links
lynx --dump --listonly --nonumbers https://www.radio.pervii.com/en/online-playlists-m3u.htm | grep ".m3u" | grep "top_radio" > c:/git/music-list.txt
# download the streams
aria2c --check-certificate=false -i c:/git/music-list.txt -d c:/git/bare_m3u/
# remove top_radio_ from the streams
for f in c:/git/bare_m3u/*.m3u ; do mv "$f" "$(echo "$f" | sed -e 's/top_radio_//g')"; done
# create everything-full stream
cat $( ls c:/git/bare_m3u/*.m3u -v ) | awk '!seen[$0]++' > c:/git/bare_m3u/---everything-full.m3u
# create everything-lite stream
cat c:/git/bare_m3u/---everything-full.m3u | sed -n '/^#/!p' > c:/git/bare_m3u/---everything-lite.m3u
# create randomized stream
cat c:/git/bare_m3u/---everything-lite.m3u | shuf > c:/git/bare_m3u/---randomized.m3u
# create sorted stream
cat c:/git/bare_m3u/---everything-lite.m3u | sort | awk 'length>10' > c:/git/bare_m3u/---sorted.m3u