GithubHelp home page GithubHelp logo

rejuvyesh / arbtt-graph Goto Github PK

View Code? Open in Web Editor NEW
70.0 8.0 13.0 323 KB

Plot graphs from arbtt-stats

Home Page: http://rejuvyesh.com/dailystats

License: MIT License

Python 5.80% JavaScript 47.71% CSS 26.78% Shell 0.73% Haskell 2.04% HTML 16.93%

arbtt-graph's Introduction

arbtt-graph

arbtt - Automatic Rule Based Time Tracker

Note: Requires arbtt-stats version 0.9, since it has for-each=minute, which is required for the barcode chart to work.

I love arbtt. Just remember to add arbtt-capture to your startup applications and let it record active windows in the background. Then you can use arbtt-stats to categorize recorded data. For example, running arbtt-stats with the included categorize.cfg file:

$ arbtt-stats --categorizefile=./categorize.cfg -c Graph
Statistics for category "Graph"
===============================
________________Tag_|_________Time_|_Percentage_
Graph:social        | 10d01h18m00s |      11.23
Graph:mail          |  9d04h08m00s |      10.25
Graph:read-pdf      |  6d23h17m00s |       7.79
Graph:term          |  6d17h47m00s |       7.53
Graph:irc           |  2d16h47m00s |       3.02
Graph:tv-local      |  2d08h28m00s |       2.63
Graph:communities   |  2d05h19m00s |       2.48
Graph:write         |  1d17h06m00s |       1.91
(9 entries omitted) |  3d15h44m00s |       4.08
(unmatched time)    | 43d22h02m00s |      49.07

It is pretty cool. But you would agree that colored graphs are much more striking than a plain ascii table? So taking a few ideas from karpathy's ulogme, I wrote this tool to plot my daily stats as logged by arbtt-capture.

Getting Started

Start recording

  1. Install arbtt. Run arbtt-capture at startup.
  2. Probably let it run for some time to have some data.

Using arbtt-graph

  1. Clone/download this repository.
  2. Have a look at the categorize.cfg file. Add similar categories to your categorize.cfg file. (Usually at ~/.arbtt/categorize.cfg).
  3. Important: Modify path of the file in update.
  4. Important: Accordingly modify render/settings.js for barcode categories.
  5. Once everything is set up, run update once.
  6. Now you can run ./arbtt-serve.py (or python3 arbtt-serve.py) and go to the displayed address. (Default: <http://localhost:9999>)
  7. You can refresh anytime using the reload button to the right.

Structure

All html/js UI is inside the render folder. Also no information other than the percentage usage is inside the json files, so you can even make the plots public for extra extrinsic motivation. ๐Ÿ˜„

Suggestions and pull requests are always welcome.

Thanks

See also

Happy tracking!

arbtt-graph's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arbtt-graph's Issues

More detail in the barcode graphs?

I feel like the barcode graphs could be especially useful to determine what I've been doing at a specific point in time, but unfortunately it's currently impossible to get exact information from them (e.g. exact timestamps) - all I have to go on are the rather imprecise reference marks every four hours.

It would be cool if arbtt-graph could show tooltips for each bar when hovering with the mouse over them.

Error running `update`

Hi!
I just started using arbtt and your visualization solution (neat work!).
I think I followed your instructions properly but here is what I do for now and what I get:

$ cd Apps && git clone https://github.com/rejuvyesh/arbtt-graph.git
$ cd arbtt-graph
$ ./update
Processing data [===========================] 100%
Processing data [===========================] 100%
Traceback (most recent call last):
  File "readArbttStats.py", line 146, in <module>
    main()
  File "readArbttStats.py", line 143, in main
    dailyUsage(dailyCsv, minuteCsv, categoryName)
  File "readArbttStats.py", line 78, in dailyUsage
    tag = row[1].split(':')[1]
IndexError: list index out of range

Thanks!

AJAX call to refresh does not update time logged in

When clicking reload icon, the AJAX call is executed (index.html , line 152)
$("#reloadbutton").click(function() { ...
the total time is not updated (only after refreshing the browser page)
even if writeTotalTime is called (line 162)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.