added secrets

This commit is contained in:
2021-05-09 00:00:36 +05:30
parent 0f51622ac9
commit 422ab9c1eb
38 changed files with 517 additions and 82 deletions

View File

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
mkdir spectrals
cd spectrals
for x in ../*$1
do
spec="$(echo $(ffprobe -loglevel error -show_entries format_tags=track -of default=noprint_wrappers=1:nokey=1 "$x") - $(ffprobe -loglevel error -show_entries format_tags=TITLE -of default=noprint_wrappers=1:nokey=1 "$x"))"
sox "$x" -n spectrogram -o "$spec.png" -t "$spec"
resp=$(curl -F file-upload=@"$spec.png" -F "api_key=$PTPIMGAPI" https://ptpimg.me/upload.php 2>/dev/null)
echo "$spec"
echo [img]https://ptpimg.me/$(echo $resp | jq -r .[0].code).$(echo $resp | jq -r .[0].ext)[/img]
rm "$spec.png"
done
cd ..
rm -r spectrals