Build a Manic Time alternative.
The application would be in two parts:
- a tracker agent that dumps data into some backend
- should be dumb and not do much processing of the data
- a reporting dashboard which will show various timelines, statistics etc.
- Completely Open Source
-
Stay backend agnostic
-
Application can be built using something like SQLite
- But the design should be generic enough to support any thing (JSONs, MySQL etc.)
-
This lets the user stay in control of whether data goes over the wire to some remote connectordb instance or stays locally in plain text files.
-
Export data as CSV, Excel etc.?
-
Collect other metrics from the system
-
Internet usage
- For all interfaces?
-
Keyboard activity
-
Mouse activity
- Should be straight-forward
pip install time-tracker
- a shell script, if dependencies are needed etc.
- might not be easy on Windows
-
Try to be as Distro/DE agnostic as possible
-
View issues on Thyme to see what stuff can go wrong
-
External tools will do the heavy lifting
- xdpyinfo
- xwininfo
- xprop
- xdotool
- wmctrl
-
If using Python, try to find pure python ways of doing the things
- as it'll be faster than executing processes
- do a performance test for this
- as it'll be faster than executing processes
- Applescripts can do a lot of the heavy lifting
- Windows API will make things quite easy
- Manic Time is a proof of what all can happen
A list of tools (opensource & otherwise) that already exist, what they do, and what we can steal from them.
-
Written in Golang
-
New kid in town, so not mature enough
-
Has decent cross-platform support
-
Simple but neat UI
- Made with Google Charts
-
Stores data in plain JSON files
-
Written in Python
-
Not actively developed (last commits in 2015)
-
macOS: Pretty legit looking support using PyObjC
-
Windows: pyHook, pythoncom
-
Linux: Pure Python XLib
-
Written in Python by Karpathy
-
Tailored to Ubuntu/macOS
-
Feels pretty hacky
- Bunch of shell scripts etc.
-
Takes screenshots too
-
Linux: xdotool, wmctrl etc.
-
macOS: Custom application that is called by shell scripts
-
Windows: No support yet
-
Written in Python
-
Nice, clean code
-
macOS: No support yet
-
Windows: PyQt
-
Linux: Pure Python XLib
-
Too coupled with connectordb as a backend
- Stores data in a .sdf databse
- Schema can be stolen from
- Find what's special.
-
Time Tracker, but for Programming Editors only
-
Find out if there's anything special to what they do
- something that can't be done via Title grabbing & some regex-fu
Read and aggregate data from the datastore and display in the UI.
Use latest web technologies for building the dashboard:
- React
- d3.js charts
- Material UI etc.
Allow searching, filtering, grouping etc.
The reporting UI will need a datastore of it's own:
- to store things like group of windows.
- so a user can club windows with titles "Word", "Excel" into a group called "Work Related" etc.
- Write an email to Stephen Wolfram to find out what tools/scripts he uses to track all this.
One of Manic Time features, where it detects inactivity and marks that time as away.
uLogMe has screensaver detection for various DEs.
The current Window title may not be enough for every application, and some other metrics might be nice too!
Current URL of the browser is a nice example, but after enough googling, I found that it's not at all trivial (ManicTime has custom plugins that do this though.)
A workaround for this might be to use browser extensions like this one (for Firefox) that appends the page URL to window title.
This data will then have to be taken into account while performing aggregation in the dashboard, so for eg. regex: ([^\|]*) \| (.*) - .*
will extract the page title & url from Firefox windows using the above plugin & |
as a separator between title & url.
A similar thing will be needed for Sublime Text. It's window titles are usually of the form: {file-path} • ({project-name}) - Sublime Text
and both paths & project name are interesting information to have when focusing on insights. regex: ([^•]*) • \(([^)]*)\) -
http://unix.stackexchange.com/questions/5478/what-process-created-this-x11-window
http://superuser.com/questions/382616/detecting-currently-active-window
ProcrastiTracker, Window only
http://strlen.com/procrastitracker/