first commit

This commit is contained in:
titanz 2025-01-08 12:37:17 +01:00
commit 3452bb8e03
Signed by: titanz
GPG Key ID: EABC72179C71D4F5
3 changed files with 56 additions and 0 deletions

16
oe3.csv Normal file
View File

@ -0,0 +1,16 @@
startISO;interpreter;title
2025-01-08T12:07:25+01:00;Shakira / Freshlyground;Waka Waka (This Time for Africa)
2025-01-08T12:10:34+01:00;Michael Jackson;Billie Jean
2025-01-08T12:14:43+01:00;David Guetta, Alphaville & Ava Max;Forever Young
2025-01-08T12:17:23+01:00;Linkin Park;Numb
2025-01-08T12:20:24+01:00;Lady Gaga;The Edge of Glory
2025-01-08T12:24:37+01:00;RIAN;Verwandtschaftstreffen
2025-01-08T12:30:27+01:00;The Police;Every Breath You Take
2025-01-08T12:36:27+01:00;Lemo;Träum
2025-01-08T12:39:53+01:00;Dasha;Austin
2025-01-08T12:30:28+01:00;Katy Perry;Hot n Cold
2025-01-08T12:34:01+01:00;The Police;Every Breath You Take
2025-01-08T12:36:00+01:00;Avicii;Wake Me Up!
2025-01-08T12:36:54+01:00;George Ezra;Hold My Girl
2025-01-08T12:40:12+01:00;Lemo;Träum
2025-01-08T12:43:39+01:00;Dasha;Austin
1 startISO interpreter title
2 2025-01-08T12:07:25+01:00 Shakira / Freshlyground Waka Waka (This Time for Africa)
3 2025-01-08T12:10:34+01:00 Michael Jackson Billie Jean
4 2025-01-08T12:14:43+01:00 David Guetta, Alphaville & Ava Max Forever Young
5 2025-01-08T12:17:23+01:00 Linkin Park Numb
6 2025-01-08T12:20:24+01:00 Lady Gaga The Edge of Glory
7 2025-01-08T12:24:37+01:00 RIAN Verwandtschaftstreffen
8 2025-01-08T12:30:27+01:00 The Police Every Breath You Take
9 2025-01-08T12:36:27+01:00 Lemo Träum
10 2025-01-08T12:39:53+01:00 Dasha Austin
11 2025-01-08T12:30:28+01:00 Katy Perry Hot n Cold
12 2025-01-08T12:34:01+01:00 The Police Every Breath You Take
13 2025-01-08T12:36:00+01:00 Avicii Wake Me Up!
14 2025-01-08T12:36:54+01:00 George Ezra Hold My Girl
15 2025-01-08T12:40:12+01:00 Lemo Träum
16 2025-01-08T12:43:39+01:00 Dasha Austin

28
oe3/start.sh Executable file
View File

@ -0,0 +1,28 @@
#!/bin/bash
# file in which data got stored
OUTPUT_FILE="../oe3.csv"
# temp file for new data
TEMP_FILE="temp_output.csv"
# if file not exist, create and add header
if [ ! -f "$OUTPUT_FILE" ]; then
echo "startISO;interpreter;title" > "$OUTPUT_FILE"
fi
while true; do
# call api and filter it
curl -s "https://audioapi2.orf.at/oe3/json/4.0/live?_o=oe3.orf.at" | \
jq -r '.[].items[] | select(.interpreter != null and .title != null) | "\(.startISO);\(.interpreter);\(.title)"' > "$TEMP_FILE"
# find new entries and add to main file
grep -Fxv -f "$OUTPUT_FILE" "$TEMP_FILE" >> "$OUTPUT_FILE"
# debug
echo "List updated: $(date)"
# wait 20 minutes
# sleep 1200
sleep 300
done

12
oe3/temp_output.csv Normal file
View File

@ -0,0 +1,12 @@
2025-01-08T12:07:25+01:00;Shakira / Freshlyground;Waka Waka (This Time for Africa)
2025-01-08T12:10:34+01:00;Michael Jackson;Billie Jean
2025-01-08T12:14:43+01:00;David Guetta, Alphaville & Ava Max;Forever Young
2025-01-08T12:17:23+01:00;Linkin Park;Numb
2025-01-08T12:20:24+01:00;Lady Gaga;The Edge of Glory
2025-01-08T12:24:37+01:00;RIAN;Verwandtschaftstreffen
2025-01-08T12:30:28+01:00;Katy Perry;Hot n Cold
2025-01-08T12:34:01+01:00;The Police;Every Breath You Take
2025-01-08T12:36:00+01:00;Avicii;Wake Me Up!
2025-01-08T12:36:54+01:00;George Ezra;Hold My Girl
2025-01-08T12:40:12+01:00;Lemo;Träum
2025-01-08T12:43:39+01:00;Dasha;Austin
1 2025-01-08T12:07:25+01:00 Shakira / Freshlyground Waka Waka (This Time for Africa)
2 2025-01-08T12:10:34+01:00 Michael Jackson Billie Jean
3 2025-01-08T12:14:43+01:00 David Guetta, Alphaville & Ava Max Forever Young
4 2025-01-08T12:17:23+01:00 Linkin Park Numb
5 2025-01-08T12:20:24+01:00 Lady Gaga The Edge of Glory
6 2025-01-08T12:24:37+01:00 RIAN Verwandtschaftstreffen
7 2025-01-08T12:30:28+01:00 Katy Perry Hot n Cold
8 2025-01-08T12:34:01+01:00 The Police Every Breath You Take
9 2025-01-08T12:36:00+01:00 Avicii Wake Me Up!
10 2025-01-08T12:36:54+01:00 George Ezra Hold My Girl
11 2025-01-08T12:40:12+01:00 Lemo Träum
12 2025-01-08T12:43:39+01:00 Dasha Austin