Time tracking/logging

Wondering if anyone has figured out a plugin/script for automatically tracking how long a user spends in a Glyphs file on a per-glyph/per-master basis?

I’ve started trying to put together a script that is periodically run by other program that detects if Glyphs is the active window. I got it to write to a CSV with the Glyph Name, Master Name, Start and End Time, and Duration. Basically whenever the script runs, it would add a new row to the CSV.

From a CSV, it is simple to make a pivot table that will accumulate all the data so you know how long you spend on a file in total, on a per glyph basis, on a per master basis, and so on.

Undoubtedly, there is a smarter/efficient way of tracking this. Open to any insights or suggestions.

Is this for billing customers or for your personal time tracking? Do you sync your Glyphs files (iCloud, Dropbox, …)?

Just for personal time tracking.
No, don’t typically use syncing (at least not on a daily basis).

My Favourites Plugin measures the time you spend on the files that are listed in the Favourites window. It only uses the data to display the “Relevance” indicator, but you could get it in detail from the Glyphs defaults where it’s stored.

favourites

print(Glyphs.defaults["deKutilekGlyphsFavsData"])

will print a list consisting of font path, total time spent on the font in seconds (I think …), time spent on the font in the current Glyphs session:

(
    ".../Sudo.glyphspackage",
    9180,
    0
)

The total time spent in Glyphs is stored in

print(Glyphs.defaults["deKutilekGlyphsFavsTimeTotal"])
>>> 634782
print(Glyphs.defaults["deKutilekGlyphsFavsTimeSession"])
>>> 8112

The plugin tries to receive all the relevant notifications, like opening and closing a document, a document becoming active, Glyphs becoming inactive, etc. Perhaps it could be can be used as an example to extende this to also notice glyph/layer changes.

Thanks for this. Interesting…I’ll have to dig into these NSNotifications to get the active state.

Also, been trying to incorporate the lastChange data from a glyph.