window_activity Reference¶
Following are the classes and functions defined within this module:
-
Project.system.window_activity.currtime(tformat=None)¶ This method checks for the file and returns the time in respective format.
- Parameters
tformat (str or None) – File as the string argument
- Returns
time
- Return type
str
-
Project.system.window_activity.get(command)¶ This method gets the output of the
xdotoolcommands and decodes it to utf-8 format- Parameters
command (list) –
xdotoolcommands are as argument to command parameter- Returns
output of command in utf-8 format
- Return type
str
-
class
Project.system.window_activity.myThread4¶ -
run()¶ This method initiates the running of this module and continuosly runs the activity tracking with the help of other methods described here
-
-
Project.system.window_activity.plot()¶ This method plots the bar an Application name Vs Percentage of time used graph from the final csv file generated by
summarize()method and saves it int the respective results directory.
-
Project.system.window_activity.summarize(t, winlist, applist)¶ This method performs the actual activity of listing the window activity within a text and CSV files in the respective results directory named corresponding to their timestamp to provide a detailed statistics of usage of each application.
It is repeatedly called by
run()after a fixed time interval to update the values in the files.- Parameters
t (int) – Total time in seconds
winlist (list) – A list which stores the active tab within an application over the period for which the application ran
applist (list) – A list which stores active applications over the period for which the application ran
-
Project.system.window_activity.time_format(s)¶ This method coverts cumulative time in seconds into HH:MM:SS
- Parameters
s (int) – total seconds time
- Returns
time in HH:MM:SS format
- Return type
str