Simple tools to capture and analyze what I did on the computer.
There are many products that do this, but I could not find anything that worked well on Linux X11.
The ./capture_what_i_do.py script captures the current session and outputs it as a JSON object. ./capture_and_archive_what_i_do is a cronjob wrapper that records the JSON object into files. One file per calendar week.
I run the script every minute:
*/1 * * * * chronic ~/bin/capture_and_archive_what_i_do
To better analyze some programs title strings, some changes make sense:
This adds the full filename to the emacs window title:
(setq-default frame-title-format "%b ⋄ %f")To analyze a week or more load the JSON log files into a SQLite database with ./whatidid_to_sqlite.py.
For example:
./whatidid_to_sqlite.py convert lastweek.sqlite3 ~/var/what_i_did/2023-KW05.log
Then run the excellent datasette on it:
datasette --metadata metadata.yml lastweek.sqlite3