waka-readme-stats icon indicating copy to clipboard operation
waka-readme-stats copied to clipboard

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

Open txtxj opened this issue 2 years ago • 4 comments
trafficstars

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.

txtxj avatar Apr 16 '23 18:04 txtxj

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 avatar Apr 16 '23 18:04 txtxj

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.

txtxj avatar Apr 17 '23 02:04 txtxj

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 avatar Apr 25 '23 06:04 pseusys

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

txtxj avatar Apr 25 '23 11:04 txtxj