Created
March 9, 2012 23:39
-
-
Save rooreynolds/2009335 to your computer and use it in GitHub Desktop.
Extracting useful data from Things (Cloud beta) via its SQLite database
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
#Completed tasks (showing their title, start date, completion date and time to complete in days) | |
sqlite3 -csv -header ~/Library/Application\ Support/Cultured\ Code/Things\ beta/ThingsLibrary.db "SELECT | |
substr(ZTITLE,0,26) as title, | |
datetime(ZCREATIONDATE, 'unixepoch', '+31 years', 'localtime') as startdate, | |
datetime(ZSTOPPEDDATE, 'unixepoch', '+31 years', 'localtime') as completeddate, | |
round(julianday(datetime(ZSTOPPEDDATE, 'unixepoch', '+31 years', 'localtime')) - julianday | |
(datetime(ZCREATIONDATE, 'unixepoch', '+31 years', 'localtime')),5) as age | |
FROM ZTHING WHERE ZSTATUS = 3 ORDER BY completeddate; |
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
#Tasks completed per day | |
sqlite3 -csv -header ~/Library/Application\ Support/Cultured\ Code/Things\ beta/ThingsLibrary.db "SELECT | |
date(ZSTOPPEDDATE, 'unixepoch', '+31 years', 'localtime') as date, | |
count(Z_PK) as completed | |
from ZTHING WHERE ZSTATUS = 3 GROUP BY date;" |
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
#Tasks created per day | |
sqlite3 -csv -header ~/Library/Application\ Support/Cultured\ Code/Things\ beta/ThingsLibrary.db "SELECT | |
date(ZCREATIONDATE, 'unixepoch', '+31 years', 'localtime') as date, | |
count(Z_PK) as created | |
FROM ZTHING WHERE ZCREATIONDATE != '' GROUP BY date;" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment