1
Fork 0

Fix nix build

Also implement an "export chart info to csv" feature
This commit is contained in:
prescientmoon 2024-10-05 03:22:19 +02:00
parent 880a9ffa80
commit 548c105fae
Signed by: prescientmoon
SSH key fingerprint: SHA256:WFp/cO76nbarETAoQcQXuV+0h7XJsEsOCI0UsyPIy6U
3 changed files with 85 additions and 50 deletions

21
scripts/export-chart-info.sh Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env bash
if [ "$#" != 2 ]; then
echo "Usage: $0 <from> <to>"
exit 1
fi
from=$1
to=$2
echo "Creating destination..."
rm -rf "$to"
mkdir -p "$to"
echo "Exporting info..."
sqlite3 "$from" ".header on" ".mode csv" "select * from songs" \
> $to/songs.csv
sqlite3 "$from" ".header on" ".mode csv" "select * from charts" \
> $to/charts.csv
echo "All done :3"