~hacktivista/time-tracking-tools

Time tracking tools for sway
Initial commit. Working time tracking tools.

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~hacktivista/time-tracking-tools
read/write
git@git.sr.ht:~hacktivista/time-tracking-tools

You can also use your local clone with git send-email.

#Time Tracking Tools

These are the simple tools I use for time tracking:

  • capture-screenshots (Bash): Capture screenshots every x seconds (5 minutes by default)
  • ipc-focus-tracker (Python): Sway WM windows activity tracking
  • trackwrap (sh): Wrapper to td-watson which activates two previous tools on start and closes on stop
  • web-activity-report (Ruby): Really simple web based reporter which shows all captured info

Will work only with Sway WM, I don't intend to support other windows managers for the time being, it might work with i3 with a few tweaks.

#Requirements

  • capture-screenshots: bash, grim
  • ipc-focus-tracker: python3, i3ipc (python), sqlite3, sway

#How to

#Setup scripts

Copy scripts to a PATH available directory

cp ~/scripts/* /usr/local/bin
chown root:root /usr/local/bin/{ipc-focus-tracker,capture-screenshots,trackwrap}

Install requirements

pip install td-watson i3ipc
pacman -S bash grim sqlite

#Use scripts

Now you're ready to capture through trackwrap

trackwrap start Project +tag1 +tag2
...
trackwrap stop

#Setup web activity report

Link the following files and directories to web-activity-report

  • windows.sqlite to ipc-focus-tracker database
  • watson/ to ~/.config/watson
  • public/screenshots/ to screenshots directory

Here some inspiration

cd web-activity-report
ln -s ~/.ipc_focus_tracker.sqlite windows.sqlite
ln -s ~/.config/watson
ln -s ~/media/images/screenshots public/screenshots

Install gems

bundle install

#Use web activity record

Then run the service

bundle exec ruby activity.rb -o 0.0.0.0 -p 8000

Copyright 2020 Felix Freeman https://hacktivista.com/~sir.

This project is licensed under the GNU Affero General Public License v3 or any later version.