diff --git a/.gitignore b/.gitignore index 9c16920..8b633e8 100755 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +**/.DS_Store + *.sql *.sql.gz *.tar.gz @@ -16,3 +18,5 @@ surf.sublime-workspace **/target maple.sublime-workspace *.secret.yaml + +etc/sldl-macos.yaml \ No newline at end of file diff --git a/etc/maple_setup.sh b/etc/maple_setup.sh new file mode 100755 index 0000000..b42e3e5 --- /dev/null +++ b/etc/maple_setup.sh @@ -0,0 +1,42 @@ +#! /bin/bash + +set -ue + +maple="$HOME/maple" +data="$HOME/maple/data" +metadata="$data/_metadata" +etc="$maple/etc" +sldl_conf="$etc/sldl-macos.conf" + +directories() { + mkdir -p $data + mkdir -p $metadata + mkdir -p $etc +} + +configure() { + envsubst < $etc/sldl.tpl.conf > $sldl_conf + + echo "--------------------------------------------------------------" + echo "configured sldl" + cat $sldl_conf + echo "--------------------------------------------------------------" +} + +s5cmd_completion() { + s5cmd --install-completion >> $HOME/.bashrc +} + +ok() { + echo "ok" + env +} + +main() { + directories + configure + s5cmd_completion + ok +} + +main \ No newline at end of file diff --git a/etc/sldl.macos.yaml b/etc/sldl.macos.yaml new file mode 100644 index 0000000..8e3cd58 --- /dev/null +++ b/etc/sldl.macos.yaml @@ -0,0 +1,17 @@ +path = "~/maple/data" +index-path = "~/maple/data/_metadata/index.sldl.csv" +username = "ntwl" +password = "ninety nonsense nights" + +name-format = "{artist(/)album(/)track( )title|(_missing_tags/)slsk-foldername(/)slsk-filename}" +write-playlist = true + +pref-format = "mp3" +pref-min-bitrate = 200 +pref-max-bitrate = 2500 + +strict-conditions = true +fast-search = true +interactive = false +no-progress = true +concurrent-downloads = 4 diff --git a/justfile b/justfile index 6627fc0..d66ad9e 100644 --- a/justfile +++ b/justfile @@ -24,7 +24,15 @@ exec: dl trg: docker compose -f compose.yaml run \ --remove-orphans \ - maple -- sldl {{trg}} link plist dir: python3 maple-py/link.py plist dir + +sync args: + s5cmd {{args}} + +maple-setup: + bash ./etc/maple_setup.sh + +maple trg: + sldl -c ./etc/sldl-macos.yaml {{trg}}