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

feat: show how much time user spent during last 7 days #451

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

txtxj
Copy link
Contributor

@txtxj txtxj commented Apr 16, 2023

I think it's good to show the amount of time spent writing code each day for the past seven days

⏳ WeekDays: 
Monday                   3 hrs 54 mins       ████░░░░░░░░░░░░░░░░░░░░░   14.94 % 
Tuesday                  7 hrs 36 mins       ███████░░░░░░░░░░░░░░░░░░   29.05 % 
Wednesday                4 hrs 53 mins       █████░░░░░░░░░░░░░░░░░░░░   18.71 % 
Thursday                 3 hrs 26 mins       ███░░░░░░░░░░░░░░░░░░░░░░   13.12 % 
Friday                   3 hrs 41 mins       ████░░░░░░░░░░░░░░░░░░░░░   14.10 % 
Saturday                 0 secs              ░░░░░░░░░░░░░░░░░░░░░░░░░   00.00 % 
Sunday                   2 hrs 38 mins       ███░░░░░░░░░░░░░░░░░░░░░░   10.09 % 

But when I look at the official api, it seems that in order to get the data, an additional post operation is required. I add it to the get_waka_time_stats function.

sources/main.py Outdated Show resolved Hide resolved
@txtxj
Copy link
Contributor Author

txtxj commented Apr 16, 2023

By the way, last time I contributed to this repo, the action.yml use Dockerfile to run the code.

But this time it pulls a docker from wakareadmestats/waka-readme-stats:master.

This confused me. I don't know how to run my branch.

So I just changed it back to Dockerfile in my brach for a test (not pushed the change). And my code seems to run correctly.

But I'm not sure if it will still run successfully in the docker pulled from wakareadmestats/waka-readme-stats:master

@txtxj
Copy link
Contributor Author

txtxj commented Apr 17, 2023

Since it is Monday when I run my code, it is displayed in the order of Monday to Sunday.

If it is Wednesday, it will show from last Wednesday to this Tuesday.

@pseusys
Copy link
Collaborator

pseusys commented Apr 25, 2023

By the way, last time I contributed to this repo, the action.yml use Dockerfile to run the code.

But this time it pulls a docker from wakareadmestats/waka-readme-stats:master.

This confused me. I don't know how to run my branch.

So I just changed it back to Dockerfile in my brach for a test (not pushed the change). And my code seems to run correctly.

But I'm not sure if it will still run successfully in the docker pulled from wakareadmestats/waka-readme-stats:master

You can use the Makefile for local testing.

pseusys
pseusys previously approved these changes Apr 25, 2023
@txtxj
Copy link
Contributor Author

txtxj commented Apr 25, 2023

Thank you for your reply, I'll have a try.

MarkenJaden
MarkenJaden previously approved these changes Jun 1, 2023
Copy link
Collaborator

@MarkenJaden MarkenJaden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like this change! Logic looks good and is easy to understand. Thank you!

Copy link
Collaborator

@MarkenJaden MarkenJaden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

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

Successfully merging this pull request may close these issues.

3 participants