Skip to content

Commit ca0d759

Browse files
committed
UPDATED: create_navbar_player Adding songs to playlist
1 parent ccb83d2 commit ca0d759

File tree

2 files changed

+2948
-11
lines changed

2 files changed

+2948
-11
lines changed

create_navbar_player.sh

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
origin_folder="${HOME}/afaces.github.io/assets/music"
2+
albums_file="${HOME}/afaces.github.io/albums.json"
3+
repo_relative_path="assets/music"
4+
5+
IFS=$'\n'
6+
7+
album_URLs=("https://i.scdn.co/image/ab67616d00001e02918d8d0900cf961190aa289c"
8+
"https://i.scdn.co/image/ab67616d00001e02a84e896c601347891a2d0c7c"
9+
"https://i.scdn.co/image/ab67616d00001e0266686af85889bb47803a4b85"
10+
"https://i.scdn.co/image/ab67616d00001e02e64307672e7202cf8c902445"
11+
"https://i.scdn.co/image/ab67616d00001e021a20209da2a5497b14b8967c"
12+
"https://i.scdn.co/image/ab67616d00001e028f1c7b650531a39481876029"
13+
"https://i.scdn.co/image/ab67616d00001e02d819937d7e25a37d4b32c5e7"
14+
"https://i.scdn.co/image/ab67616d00001e029c4dadcd75ba0ed998cc458d"
15+
"https://i.scdn.co/image/ab67616d00001e02f5287561d7ade72e33b7a7ed"
16+
"https://i.scdn.co/image/ab67616d00001e02c733515ff39cd27fd96ea469"
17+
"https://i.scdn.co/image/ab67616d00001e024e13a7f48a34cf8f2f53fe39"
18+
"https://i.scdn.co/image/ab67616d00001e028ceccfdb6b83d800b1bc16d9"
19+
"https://i.scdn.co/image/ab67616d00001e029e3287f752d05359e8167e3c"
20+
"https://i.scdn.co/image/ab67616d00001e02f16ac3cbb781bbe82b27fc88"
21+
"https://i.scdn.co/image/ab67616d00001e02f393a4270495a555206ef3aa"
22+
"https://i.scdn.co/image/ab67616d00001e029e56f0034b290c78d63d23a1"
23+
"https://i.scdn.co/image/ab67616d00001e02cf23571aa6a15b346b5a308b"
24+
"https://i.scdn.co/image/ab67616d00001e02a4259e20681a6e42daea3e1c"
25+
"https://i.scdn.co/image/ab67616d00001e02317a8bfc407c707f08eddf38"
26+
"https://i.scdn.co/image/ab67616d00001e02f9dce670313a43f3b4e173d5"
27+
"https://i.scdn.co/image/ab67616d00001e0273ba6162b4097650faec281c"
28+
"https://i.scdn.co/image/ab67616d00001e0296d690174a503fba8c44b9cc"
29+
"https://i.scdn.co/image/ab67616d00001e02d83b51260e83a16bb334f443"
30+
)
31+
32+
current_directory="$(pwd)"
33+
34+
35+
#{
36+
# name: "Nefasto",
37+
# artist: "Afaces",
38+
# image: "https://i.scdn.co/image/ab67616d0000b273918d8d0900cf961190aa289c",
39+
# path: "/assets/music/1.- 'Nefasto'/1 - Nefasto.mp3"
40+
# },
41+
42+
echo "let track_list = [" > "${albums_file}"
43+
44+
i=0
45+
cd "${origin_folder}"
46+
for album in $(ls | sort -h); do
47+
cd "${album}"
48+
49+
for song in $(ls | sort -h); do
50+
song_title="$(echo "${song}" | rev | cut -d '.' -f2- | rev | tr -d "&" | tr -d "(" | tr -d ")" | tr -d "]" | tr -d "[" | tr -d "#" | tr -d "," | tr -d "\"" | tr -d "$")"
51+
echo " {
52+
name: \"${song_title}\",
53+
artist: \"Afaces\",
54+
image: \"${album_URLs[i]}\",
55+
path: \"${repo_relative_path}/${album}/${song}\",
56+
}," >> "${albums_file}"
57+
done
58+
i=$((i+1))
59+
cd ..
60+
done
61+
echo "];" >> "${albums_file}"
62+
cd "${current_directory}"

0 commit comments

Comments
 (0)