1
Fork 0
shimmeringmoon/scripts/export-chart-info.sh
prescientmoon 548c105fae
Fix nix build
Also implement an "export chart info to csv" feature
2024-10-05 03:22:19 +02:00

22 lines
381 B
Bash
Executable file

#!/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"