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
When reading this, I noticed that ConnectorDB fits your description of reports dashboard. The only real downside to ConnectorDB is that it is usually set up on remote servers. The ConnectorDB frontend (dashboard) is in react, using material ui, and will soon begin to have a real "dashboard" (right now it doesn't do much plotting, and doesn't have an overall aggregating tab).
With that in mind, I have enabled sqlite support in connectordb, and have shared with you (over keybase fs) the latest binaries of the laptoplogger + connectordb combo. All you need is redis installed + laptoplogger's linux dependencies.
The latest version runs locally, using an sqlite database - and connectordb is completely managed from laptoplogger (you don't need to be aware of connectordb at all). There are still rough spots, but if you are interested, I think this is close to what you were thinking of.
You can run it using
python src/guilaptoplogger.py
, and going to the "Create New" tab.All of the reporting and advanced dashboard is still a todo, but I think you'll be able to see if it might be better to build upon connectordb's frontend (https://github.com/connectordb/connectordb-frontend/tree/master/js/datatypes) than creating a new app (or if not, maybe you'll get more ideas for your app).