Fix nix build
Also implement an "export chart info to csv" feature
This commit is contained in:
parent
880a9ffa80
commit
548c105fae
3 changed files with 85 additions and 50 deletions
scripts
21
scripts/export-chart-info.sh
Executable file
21
scripts/export-chart-info.sh
Executable 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"
|
Loading…
Add table
Add a link
Reference in a new issue