Created
October 26, 2014 02:13
-
-
Save graysonarts/6ab2dde3b31e2234976b to your computer and use it in GitHub Desktop.
ZSH script to use of-store to export CSV files for loading into Tableau
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
BASE=${0%/*} | |
SQLITE=/usr/bin/sqlite3 | |
echo "Extracting from OmniFocus" | |
$BASE/of-store --debug --out=$BASE/finished.db | |
echo "Exporting to tasks.csv" | |
$SQLITE $BASE/finished.db <<! | |
.headers on | |
.mode csv | |
.output tasks.csv | |
select * from tasks; | |
! | |
echo "Exporting to projects.csv" | |
$SQLITE $BASE/finished.db <<! | |
.headers on | |
.mode csv | |
.output projects.csv | |
select * from projects; | |
! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment