Acquiring Past Growl Notifications in ShellSeptember 1, 2012
As of version 1.3, Growl stores recent notifications in its history. Should you ever need to access these entries via shell script (ex. checking every once and a while using a cronjob to performs certain tasks should a certain growl notification appear), it is quite easy to access this history.
Growl’s history is stored in an SQLite database in its application support folder:
/Users/christophersu/Library/Application Support/Growl/notifications.history. The entries can be easily read from this database in shell using
Depending on what part of the notification you want (each one has a title and body), you may want to request more information by adding more behind
SELECT ZTITLE FROM ZNOTIFICATION. I didn’t want all of the entries in the database, but if you do, you can remove the
tail -5 at the end, or alter its parameters to meet your needs. You can also use other SQL commands, such as
WHERE if you only want entries in the database that meet specific requirements (although I prefer to filter them out in shell).