A widget for Dashing which displays the number of hours you've logged on RescueTime, in one productivity grade. If you want time in multiple grade displayed, use multiple widgets (see example).
RescueTime is a "personal analytics service that shows you how you spend your time" on the computer.
- Go register for an API key.
YOUR_RESCUETIME_KEY_HEREwith your API key.
##How it works Each widget can display the current day's time within in a single productivity grade:
- total_productive (special grade: very_productive + productive)
- total_unproductive (special grade: very_unproductive + unproductive)
I recommend using total_productive and/or total_unproductive, for the simplest view of your day.
##Add widget(s) to a dashboard Edit the dashboard by adding:
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1"> <div data-id="rescuetime_total_productive" data-view="Rescuetime" data-title="Productive" data-min="0" data-max="240"></div> </li>
- Notice that
rescuetime_total_productive. Each productivity grade must be prepended by
data-viewmust be set to "Rescuetime".
data-titlecan be whatever you want.
If you wanted to add a widget for total_unproductive as well, you would then add:
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1"> <div data-id="rescuetime_total_unproductive" data-view="Rescuetime" data-title="Unproductive" data-min="0" data-max="240"></div> </li>
/jobs/rescuetime.rb has two optional settings: Goals and an Hour Filter.
###Goals If a goals is set for a productivity grade, the graph will use that as the maximum. It will also set the color of the graph based upon the goal. If no goal is set, widgets default to a maximum of 8 hours.
For example, setting a goal of
total_productive: 5*60 would cause all widgets displaying total_productive to be based out of 5 hours (5*60 minutes). Time greater than the goal will be indicated by the numbers, but the graph will no longer increase in size.
As stated, the goal will also change the color of the graph. Productive categories are colored like so:
= 100%: bright green
= 75%: light green
= 50%: yellow
- < 50%: gray
Neutral and Unproductive categories are colored like so:
= 80%: bright red
- < 80%: light red
The hour filter allows you to force the widgets to only analyze a range of hours. This way you can ignore time spent on your computer outside of "working hours", whatever those are for you. They're optional; if you want to turn them off, set
hours_to_analyze = nil.