Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement reporting #233

Open
1 task
ErikBjare opened this issue Sep 15, 2018 · 8 comments
Open
1 task

Implement reporting #233

ErikBjare opened this issue Sep 15, 2018 · 8 comments

Comments

@ErikBjare
Copy link
Member

ErikBjare commented Sep 15, 2018

Reporting is the requested "enterprise feature" that we could provide. Since this is basically only used in a company/consultancy or enterprise environment perhaps there is a way to earn some money by developing it exclusively for paying customers?

TODO

  • Add a menu item to aw-webui called "Reporting" that just shows a "Coming soon" page with a form to fill out interest.
    • Form should contain questions about willingness to pay and number of reportees.

Problem

ActivityWatch already has usage within companies and is then usually set up as a single server to which many clients report (see for example this 60 client setup). This has vast privacy issues and is not an acceptable solution in the vast majority of cases as it has a high risk of being misused for involuntary, covert, or straight illegal employee surveillance.

How it could work

Users could whitelist which activities (or categories of activities) to report, only letting the employee what work-related things were done. This would be a great start.

You can vote on this feature on the forum!

@jantman
Copy link

jantman commented Jan 17, 2019

For what it's worth, I'm an individual user and would be interested in basic reporting functionality. I'm not sure what the Enterprise use case is, but all I'm really interested in (and might hack up something for myself) is the same high-level "Top-10" type information that's displayed on the Activity page of the UI, but emailed to me daily (i.e. a "Last 24 hours" summary).

@ErikBjare
Copy link
Member Author

@jantman I think that would be very different from the type of reporting I had in mind when I created this issue.

  • Daily email summaries could easily be built by simply writing a small script that did a query every day and then sent the email.
  • Reporting, on the other hand, would take a subset of the users' events and send them to a remote aw-server instance.

@jantman
Copy link

jantman commented Jan 18, 2019

Ahhhhh that makes a lot more sense. Sorry for my misunderstanding of the goal.

@stale

This comment has been minimized.

@stale

This comment has been minimized.

@stale stale bot added the stale label Aug 13, 2020
@stale stale bot closed this as completed Aug 27, 2020
@stale stale bot removed the stale label Aug 30, 2020
@ErikBjare
Copy link
Member Author

Today I wrote a script in ActivityWatch/aw-client#52 for calculating working hours from ActivityWatch data, it seems to work pretty well.

I also wrote this forum post a while back about "Getting paid with ActivityWatch": https://forum.activitywatch.net/t/getting-paid-with-activitywatch/986/5

@ErikBjare
Copy link
Member Author

I know this is the wrong issue, but what @jantman described might actually be useful for most users (not just the team/enterprise target of the reporting in this issue). I've heard from quite a few users that they find the emails from RescueTime etc. useful.

It could also be implemented fairly soon (would probably only take a weekend to hook up stats from aw-client-python to an email server), if someone has time.

The only catch is that users would need to supply email server credentials.

@ErikBjare
Copy link
Member Author

I want to mention that I currently have a reporting system set up, where it reports to a Google Sheet.

The basic code for it is in the aw-client examples: https://github.com/ActivityWatch/aw-client/blob/master/examples/working_hours_gspread.py

I've then created a small wrapper script, which I run as a cronjob:

aw-work-gspread-sync.sh:

#!/bin/bash
set -e

regex="YOUR_WORK_REGEX_HERE"
sheet_id="YOUR_GSHEET_ID_HERE"

echo "Syncing activitywatch data to Google Sheets..."

# activate virtualenv
. $HOME/.virtualenvs/activitywatch/bin/activate

# cd to examples dir
cd $HOME/Programming/activitywatch/aw-client/examples

# path to poetry (needed for cron)
poetry="$HOME/.local/bin/poetry"

# run script
$poetry run python3 working_hours_gspread.py "$sheet_id" "$regex"

This works very well for me.

If anyone is interested in more details/how to set it up, let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants