Giter Site home page Giter Site logo

anmol098 / waka-readme-stats Goto Github PK

View Code? Open in Web Editor NEW
3.2K 10.0 519.0 34.12 MB

This GitHub action helps to add cool dev metrics to your github profile Readme

License: MIT License

Dockerfile 1.00% Python 96.15% Makefile 2.85%
awesome profile-readme wakatime profile profile-page readme

waka-readme-stats's Introduction

Looking For Translation to different languages & Locale #23

Dev Metrics in Readme with added feature flags ๐ŸŽŒ

Project Preview

Project Preview

๐Ÿ“ŒโœจAwesome Readme Stats


Star Badge

Are you an early ๐Ÿค or a night ๐Ÿฆ‰?
When are you most productive during the day?
What are languages you code in?
Let's check out in your profile readme!

Report Bug ยท Request Feature

Prep Work

  1. You need to update the markdown file(.md) with 2 comments. You can refer here for updating it.
  2. You'll need a WakaTime API Key. You can get that from your WakaTime Account Settings
    • You can refer here, if you're new to WakaTime
  3. You'll need a GitHub API Token with repo and user scope from here if you're running the action to get commit metrics

    enabling the repo scope seems DANGEROUS
    but this GitHub Action only accesses your commit timestamp and lines of code added or deleted in repository you contributed.

    • You can use this example to work it out
  4. You need to save the WakaTime API Key and the GitHub API Token in the repository secrets. You can find that in the Settings of your repository. Be sure to save those as the following.
    • WakaTime API Key as WAKATIME_API_KEY=<your wakatime API Key>
    • GitHub Personal Access Token as GH_TOKEN=<your github access token>
  5. You can enable and disable feature flags based on requirements.

This Action will run everyday at 00.00 IST

Update your Readme

Add a comment to your README.md like this:

<!--START_SECTION:waka-->
<!--END_SECTION:waka-->

waka can be replaced by any string specified in the SECTION_NAME flag as per (the available flags section)[#flags-available]

These lines will be our entry-points for the dev metrics.

New to WakaTime

WakaTime gives you an idea of the time you really spent on coding. This helps you boost your productivity and competitive edge.

Profile Repository

You'll need to get a GitHub Access Token with a repo and user scope and save it in the Repo Secrets GH_TOKEN = <Your GitHub Access Token>

Here is Sample Workflow File for running it:

name: Waka Readme

on:
  schedule:
    # Runs at 12am IST
    - cron: '30 18 * * *'
  workflow_dispatch:
jobs:
  update-readme:
    name: Update Readme with Metrics
    runs-on: ubuntu-latest
    steps:
      - uses: anmol098/waka-readme-stats@master
        with:
          WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
          GH_TOKEN: ${{ secrets.GH_TOKEN }}
  • Now you can commit and wait for run automatically, but you can also trigger to run it to see the result now. Just go to the Actions in your repo and select your Profile Readme Development Stats workflow and click in Run workflow. Now wait for a minute or two and you will see your changes.

Extras

  1. If you want to add the other info to your stats, you can add multiple FLAGS in your workflow file by default all flags are enabled

except the lines of code flag due to heavy operation performed

- uses: anmol098/waka-readme-stats@master
  with:
      WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
      GH_TOKEN: ${{ secrets.GH_TOKEN }}
      SHOW_OS: "False"
      SHOW_PROJECTS: "False"

Flags Available


LOCALE This Flag can be used to show stats in your language default is english uses Locale Short Hand to be passed in the flag variable example of the final result can be found here

SECTION_NAME flag can be set to any string, and will be the name of the section to replace in the readme

COMMIT_BY_ME flag can be set to True to commit the code using your name and email

COMMIT_MESSAGE flag can be set to message commit, default is "Updated with Dev Metrics"

COMMIT_USERNAME flag can be set to username to commit the code, default is "readme-bot"

COMMIT_EMAIL flag can be set to email to commit the code, default is "41898282+github-actions[bot]@users.noreply.github.com"

SHOW_UPDATED_DATE flag can be set to True to show updated date in end of paragraph

UPDATED_DATE_FORMAT flag can be set to put updated date into a format, default is "%d/%m/%Y %H:%M:%S"

SHOW_LINES_OF_CODE flag can be set to True to show the Lines of code writen till date

Lines of code

SHOW_TOTAL_CODE_TIME flag can be set to False to hide Code Time

Code Time

SHOW_PROFILE_VIEWS flag can be set to False to hide the Profile views

Profile Views

SHOW_COMMIT flag can be set to False to hide the commit stats

I'm an early ๐Ÿค

๐ŸŒž Morning    95 commits     โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   30.55% 
๐ŸŒ† Daytime    78 commits     โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   25.08% 
๐ŸŒƒ Evening    112 commits    โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   36.01% 
๐ŸŒ™ Night      26 commits     โ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   8.36%

SHOW_DAYS_OF_WEEK flag can be set to False to hide the commits made on different days of week

๐Ÿ“… I'm Most Productive on Sundays

Monday       50 commits     โ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   13.19% 
Tuesday      85 commits     โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   22.43% 
Wednesday    56 commits     โ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   14.78% 
Thursday     44 commits     โ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   11.61% 
Friday       28 commits     โ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   7.39% 
Saturday     30 commits     โ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   7.92% 
Sunday       86 commits     โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   22.69%

SHOW_LANGUAGE flag can be set to False to hide the Coding Language You use

๐Ÿ’ฌ Languages:
JavaScript               5 hrs 26 mins       โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   61.97%
PHP                      1 hr 35 mins        โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   18.07%
Markdown                 1 hr 9 mins         โ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   13.3%
Python                   22 mins             โ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   4.32%
XML                      8 mins              โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   1.62%

SHOW_OS flag can be set to False to hide the OS details

๐Ÿ’ป Operating Systems:
Windows                  8 hrs 46 mins       โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ   100.0%

SHOW_PROJECTS flag can be set to False to hide the Projects worked on

๐Ÿฑโ€๐Ÿ’ป Projects:
ctx_connector            4 hrs 3 mins        โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   46.33%
NetSuite-Connector       1 hr 31 mins        โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   17.29%
mango-web-master         1 hr 12 mins        โ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   13.77%
cable                    54 mins             โ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   10.41%
denAPI                   40 mins             โ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   7.66%

SHOW_TIMEZONE flag can be set to False to hide the time zone you are in

โŒš๏ธŽ Timezone: Asia/Calcutta

SHOW_EDITORS flag can be set to False to hide the list of code-editors used

๐Ÿ”ฅ Editors:
WebStorm                 6 hrs 47 mins       โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   77.43%
PhpStorm                 1 hr 35 mins        โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   18.07%
PyCharm                  23 mins             โ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   4.49%

SHOW_LANGUAGE_PER_REPO flag can be set to False to hide the Number of repository in different language and frameworks

I mostly code in Vue

Vue          8 repos        โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   25.0% 
Java         6 repos        โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   18.75% 
JavaScript   6 repos        โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   18.75% 
PHP          3 repos        โ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   9.38% 
Python       2 repos        โ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   6.25% 
Dart         2 repos        โ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   6.25% 
CSS          2 repos        โ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   6.25%

SHOW_SHORT_INFO flag can be set to False to hide the short fun fact info of user

This section requires personal access token with user permission otherwise data shown will be incorrect here

๐Ÿฑ My GitHub Data

๐Ÿ† 433 Contributions in year 2020

๐Ÿ“ฆ Used 292.3 kB in GitHub's Storage

๐Ÿ’ผ Opted to Hire

๐Ÿ“œ 25 Public Repository

๐Ÿ”‘ 15 Owned Private Repository

SHOW_LOC_CHART flag can be set to False to hide the Lines of code written in different quarters of different year

IGNORED_REPOS flag can be set to "waka-readme-stats, my-first-repo" (just an example) to ignore some repos you donโ€™t want to be counted

SYMBOL_VERSION flag can be set symbol for progress bar (default: 1)

Version Done block Empty block
1 โ–ˆ โ–‘
2 โฃฟ โฃ€
3 โฌ› โฌœ

DEBUG_LOGGING flag can be set to increase action output verbosity, by default equals internal runner debug property

Timeline

Chart not found

๐Ÿ’– Support the project

I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously, this takes time. You can use this service for free.

However, if you are using this project and happy with it or just want to encourage me to continue creating stuff, there are few ways you can do it :-

  • Giving proper credit when you use this action on your readme, linking back to it :D
  • Starring and sharing the project ๐Ÿš€
  • paypal.me/aapreneur - You can make one-time donations via PayPal. I'll probably buy a beer wine ๐Ÿท

Thanks! โค๏ธ


Contributing

Contributions are welcome! โ™ฅ! Please share any features, and add unit tests! Use the pull request and issue systems to contribute.

Selected Contributors

  1. Anmol Pratap Singh: Maintainer
  2. Alexander Sergeev: Maintainer
  3. Aravind V. Nair: Maintainer
  4. Prabhat Singh: For code timeline graph #18
  5. Hedy Li: For Pull Request #34 and #23
  6. Pedro Torres: For Pull Request #29
  7. Aaron Meese: For Pull Request #45
  8. Arnav Jindal: For Pull Request #48
  9. Daniel Rowe: For Pull Request #57
  10. Ss5h: For adding support for natural sentence writing for translation #136
Special mention for those who are currently making their profile readme more awesome ๐Ÿ˜„ ๐ŸŽ‰
  • And you! If ever you are using it right now and you are not on the list please tell us by sending a Special Mention issue ๐Ÿ˜Š we are glad to add you in the list.

Made with โค๏ธ and Python ๐Ÿ.

Inspired From

Awesome Pinned Gists
athul/waka-readme

This project need a star โญ from you โ™ฅ.

Stargazers over time

Stargazers over time

waka-readme-stats's People

Contributors

ajmeese7 avatar anmol098 avatar aravindvnair99 avatar asing577 avatar brignano avatar daggy1234 avatar danrowe avatar deadshot674gam avatar dependabot[bot] avatar dmego avatar exil0867 avatar fbuireu avatar guilyx avatar hedyhli avatar iamgrodrigues avatar infinitel8p avatar markenjaden avatar matfax avatar mheob avatar na93r avatar ohtgo avatar osd-noah-tran avatar prabhatdev avatar pseusys avatar ribeiroevandro avatar roc136 avatar swenchao avatar tkd-alex avatar tlatkdgus1 avatar txtxj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

waka-readme-stats's Issues

BUG

Describe the bug
The spacing between Language is uneven for the case of "Jupyter Notebook" (Github detects it as Language though it's not.)

Screenshot from 2020-08-01 22-36-25

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://github.com/pr2tik1/pr2tik1
  2. View the section

Add||edgycoder

Github Profile Link
https://github.com/edgycoder

Your Name
> EdgyCoder โœŒ

Edit: I figured out that escaping it with a backslash also works and even works better!
So a code-block was not needed

BUG The waka data is not updating

Describe the bug
The waka time info is not updated. My action runner runs the script every hour and it is expected to be updated.
image

image

This is my yml file

name: README STATS UPDATE

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
  push:
    branches: [ master ]
  schedule:
    # Runs at 12am IST
    - cron: '*/60 * * * *'

jobs:
  update-readme:
    name: Update Readme with Metrics
    runs-on: ubuntu-latest
    steps:
      - uses: anmol098/waka-readme-stats@master
        with:
          WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
          GH_TOKEN: ${{ secrets.GH_TOKEN }}
          SHOW_OS: False
          SHOW_TIMEZONE: False
          SHOW_EDITORS: False
          SHOW_LOC_CHART: False
          SHOW_LANGUAGE_PER_REPO: False
          SHOW_DAYS_OF_WEEK: False
          SHOW_LINES_OF_CODE: False
          SHOW_PROFILE_VIEWS: False

How to Display

How to Display

How can i display I'm an early ๐Ÿค or I'm an night ๐Ÿฆ‰?

My YAML file looks like this;

name: Waka Readme

on:
  schedule:
    - cron: '*/30 * * * *'

jobs:
  update-readme:
    name: Update Readme with Metrics
    runs-on: ubuntu-latest
    steps:
      - uses: anmol098/waka-readme-stats@master
        with:
          WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
          GH_TOKEN: ${{ secrets.GH_TOKEN }}
          SHOW_COMMIT: "True" 

SHOW_COMMIT Should enable these "widgets"? If yes, it seems i don't know how to display them. Could you help me? ๐Ÿ‘

BUG: "This Week I Spend My Time On" stats not reflecting stats for the whole week

Describe the bug
The action is running fine and updating as described. However, the "This Week I Spent My Time On" section is not reflecting the amount of time Wakatime has me as having worked for the past week -- whether you define it as the past seven days OR as the week starting with Sunday/Monday. For instance, the amount of time it claims I've worked on my "words-as-classifier" project is exactly equal to the amount I worked on that project just yesterday, and doesn't include any of the time I worked on that project even on Tuesday, much less for the rest of the week.
chrome_HNaHlKfL1P
This time is definitely being logged within Wakatime, as evidenced by the following graph from Wakatime's website:
chrome_ffvpfVttOC
This is not unique to this particular project; the amount of time I worked on my 7a7aFaM project only reflects the amount of time I worked on that project on the 25th.

To Reproduce
It's unfortunately not clear to me what's causing this error, and I'm thus not really able to reproduce it as I haven't done anything other than the normal setup of the github action.

Expected behavior
I expected the "This Week I Spent My Time On" section to reflect the amount of work I'd done on various projects over the past 7 days in total.

Github repository link
https://github.com/betoma/betoma

Additional context
Add any other context about the problem here.

Tests

We may need to write tests to check it properly for any new update.

Remove "๐Ÿ“Š This week I spent my time on" when empty

I'm only using SHOW_COMMIT so the next section is empty:

image

It would be nice to not show it when it's empty ๐Ÿ™‚

My env is:

SHOW_DAYS_OF_WEEK: False
SHOW_EDITORS: False
SHOW_LANGUAGE_PER_REPO: False
SHOW_LANGUAGE: False
SHOW_LOC_CHART: False
SHOW_OS: False
SHOW_PROJECTS: False
SHOW_TIMEZONE: False
SHOW_LINES_OF_CODE: False

Align progress bars

Hi,

Here's the current state of my board :

๐ŸŒž Morning    261 commits    โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   16.72% 
๐ŸŒ† Daytime    638 commits    โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   40.87% 
๐ŸŒƒ Evening    437 commits    โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   27.99% 
๐ŸŒ™ Night      225 commits    โ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   14.41%
๐Ÿ’ฌ Languages: 
Go                       11 hrs 37 mins      โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   54.17% 
Bash                     5 hrs 44 mins       โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   26.76% 
Julia                    1 hr 22 mins        โ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   6.4% 
Other                    56 mins             โ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   4.4% 
Protocol Buffer          52 mins             โ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   4.05%

Wouldn't it be better if all progress bars were aligned both right and left ? This could be a simple fix I could look into ( it would take about a week for me to have the time to actually do it though )

Getting some sort of ApacheConf exception

Describe the bug
The action fails due to the ApacheConf exception

Run anmol098/waka-readme-stats@master
SHOW_TIMEZONE: True
    SHOW_COMMIT: True
    SHOW_LANGUAGE: True
    SHOW_LINES_OF_CODE: False
    SHOW_LANGUAGE_PER_REPO: True
    SHOW_LOC_CHART: True
    SHOW_DAYS_OF_WEEK: True
    SHOW_PROFILE_VIEWS: True
    SHOW_SHORT_INFO: True
/usr/bin/docker run --name cb3bf5acb3173a45008aea8fd68e3c2502_373029 --label 8118cb --workdir /github/workspace --rm -e INPUT_WAKATIME_API_KEY -e INPUT_GH_TOKEN -e INPUT_SHOW_OS -e INPUT_SHOW_PROJECTS -e INPUT_SHOW_EDITORS -e INPUT_SHOW_TIMEZONE -e INPUT_SHOW_COMMIT -e INPUT_SHOW_LANGUAGE -e INPUT_SHOW_LINES_OF_CODE -e INPUT_SHOW_LANGUAGE_PER_REPO -e INPUT_SHOW_LOC_CHART -e INPUT_SHOW_DAYS_OF_WEEK -e INPUT_SHOW_PROFILE_VIEWS -e INPUT_SHOW_SHORT_INFO -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/grigala/grigala":"/github/workspace" 8118cb:3bf5acb3173a45008aea8fd68e3c2502
Please Ignore this exception 'NoneType' object is not subscriptable
Exception Occurred 'ApacheConf'
Traceback (most recent call last):
  File "/main.py", line 478, in <module>
    waka_stats = get_stats(g)
  File "/main.py", line 447, in get_stats
    loc.calculateLoc()
  File "/loc.py", line 33, in calculateLoc
    graph_file = graph.build_graph()
  File "/make_bar_graph.py", line 43, in build_graph
    if colors[language]['color'] is not None:

Expected behavior
Should be running without problems, the config seems to be correct - another version of Waka statistics works fine.

Github repository link
waka-readme-detailed.yml

Additional context

Screenshot ![screenshot](https://user-images.githubusercontent.com/2084794/89879118-bf6dbd80-dbc2-11ea-9ae8-946f4cfe33cc.png)

Translation

Needed Translation of stats and hardcoded string to the language specified by the user.
and please contribute to the translation of readme also

FEAT: Use .gitattributes when counting LoC

Is your feature request related to a problem? Please describe.
The lines of code feature vastly overestimates the lines of code I have written, and it has done the same to many accounts I have seen using this repository.

The issue is that when libraries like jQuery are committed in a repo, they are considered vendored and not factored into the language percentages for a repository. According to Sourcerer, I have written 175k lines of code, but waka-readme-stats says that number is closer to 8 million.

And with the code graph, it has Python greater than every other language on mine, with my only Python repository inflated due to libraries that I have marked as vendored in .gitattributes.

My bar graph

Describe the solution you'd like
I would like code libraries to be ignored when counting lines of code and when creating the code graph.

The .gitattributes file is a good starting place for this, but GitHub automatically flags a lot of vendored code libraries as such and ignores them. I don't know what the best way to implement this feature is, but it's something to consider.

Don't show new things by default

It is fine if something we want is not shown, but it could be bad if something we don't want to share is displayed. So I think new things shouldn't be shown by default. 64bb35f is an example of a new thing is shown by default.

And it is better to have "v1", "v2" branches in case of breaking changes. If you have a v1 branch, then you can show some new things by default in v2, or change the default settings in other ways you want.

FEAT: commits made by bot

Is your feature request related to a problem? Please describe.
With the github-activity repo, the commits to your README are made by a GitHub bot. This means the commits aren't attributed to you, so they don't fill up your commit graph.

It would be awesome if this project could do something similar, so my chart is only populated by commits I actually make instead of loads of filler commits.

Describe the solution you'd like
An implementation of a GitHub bot that makes the commits on our behalf.

Describe alternatives you've considered
I can't think of any for this issue.

Additional context
Example

This is an example of commits made by the activity repo vs. the waka-readme-stats repo.

FEAT Use with waka-readme

Is your feature request related to a problem? Please describe.

I want to use this action with waka-readme. But now I can't use it at the same time. Because the START_SECTION:waka keywords are the same name.

Describe the solution you'd like

I would like to be able to change this keyword in an environment variable or other way.

Describe alternatives you've considered

START_SECTION:waka to a different name. However, I don't recommend this, as it forces existing users to change their names.

Add||<p014ri5>

github.com/p014ri5
A direct link to your profile

p014ri5
your name which should be displayed on the link

BUG: Query failed to run by returning code of 202

Describe the bug
I randomly get that message on some runs when I try to update my readme. When that happens, the amount of lines coded is not correct, so I need to manually re-run it and hope it doesn't fail once again.

To Reproduce
There's nothing I can do to reproduce it. As I said, it seems random. For example this run failed.

Expected behavior
It shouldn't print that message nor give invalid line counts.

Github repository link
https://github.com/marcizhu/marcizhu

[BUG] 404 Error on Start

Describe the bug
The workflow spits out a 404 error on start.

To Reproduce
Steps to reproduce the behavior:

  1. Add the example YML to .github/workflows
  2. Add a secret called WAKATIME_API_KEY to the repo.
  3. Run the workflow.
  4. Get the error.

Expected behavior
I expect the workflow to edit the readme, meanwhile it does nothing and spits out a 404 error. The workflow from athul/waka-readme works fine.

Github repository link
https://github.com/itsnebulalol/itsnebulalol

Additional context
I have linked the repository where the workflow was being used, and the workflow is named waka-readme.yml

Workflow YML

name: Waka Readme

on:
  workflow_dispatch:
  schedule:
    # Runs at 8AM EDT (12:00 UTC)
    - cron: '0 12 * * *'

jobs:
  update-readme:
    name: Update Readme with Metrics
    runs-on: ubuntu-latest
    steps:
      - uses: anmol098/waka-readme-stats@master
        with:
          WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}

Error

Traceback (most recent call last):
github-actions[bot]
  File "/main.py", line 495, in <module>
Exception Occurred 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/reference/repos#get-a-repository"}
    repo = g.get_repo(f"{username}/{username}")
  File "/usr/local/lib/python3.8/site-packages/github/MainClass.py", line 324, in get_repo
    headers, data = self.__requester.requestJsonAndCheck(
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 317, in requestJsonAndCheck
    return self.__check(
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 342, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.UnknownObjectException: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/reference/repos#get-a-repository"}

Lines removals in the graph

Hey all,

In the graph section, it takes into account the number of lines input in github repositories.

I happen to have had some quarters where I removed more lines than added, making the graph go into negatives and disrupting the display a bit.

Few options :

  • count negative inputs as positive one and sum them up
  • discredit entirely negative inputs
  • adapt the graph for such cases

Add flag to show/hide daily day of the week commit stats

I see that commit stats now include days of the week.

I think it would be nice to have a flag to hide this section (without hiding time of the day stats) and maybe the other way around.

This way, you can keep the readme's content shorter if desired, and only include the sections you want.

I'm getting an 401 error on run

Describe the bug
When running the workflow I get an error on the run step.

To Reproduce
Steps to reproduce the behavior:

  1. Run the workflow.
  2. Get this error :
Traceback (most recent call last):
Exception Occurred Query failed to run by returning code of 401. 
  File "/main.py", line 491, in <module>
    user_data = run_query(userInfoQuery)  # Execute the query
  File "/main.py", line 152, in run_query
    raise Exception("Query failed to run by returning code of {}. {}".format(request.status_code, query))
Exception: Query failed to run by returning code of 401. 
{
    viewer {
      login
      id
    }
  }

{
    viewer {
      login
      id
    }
}

Expected behavior
Not getting an error and have statistics generated in the README.

Github repository link
https://github.com/Ayfri/Ayfri

BUG I think..

Describe the bug
I had follow all the steps, add my secret keys, add the text in the readme, run the action, but I run manually the action, and nothing happens, the action is been run and completed but I can't see the stats.
Please help.

To Reproduce
Steps to reproduce the behavior:
Follow the instructions of the readme

Expected behavior
Show the results in my readme

Github repository link
anmol098/waka-readme-stats@master

Additional context
Maybe I'm missing somthing...

FEAT: Three quarters? Why so?

I'm definitely missing something. I thought traditionally the year was divided into four quarters, not three. So it's four months now? Is this some limitation on the API's part? Is it possible to remake it? It's a bit confusing.

Bug: File "/main.py", line 312, in <module>

Error when running.

Traceback (most recent call last):
  File "/main.py", line 312, in <module>
    repo.update_file(path=contents.path, message='Updated with Dev Metrics',
  File "/usr/local/lib/python3.8/site-packages/github/Repository.py", line 2098, in update_file
    headers, data = self._requester.requestJsonAndCheck(
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 317, in requestJsonAndCheck
    return self.__check(
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 342, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 409 {"message": "README.md does not match 6bbbd746ff8ea3babb6a49e551ccc2858e18f20c", "documentation_url": "https://developer.github.com/v3/repos/contents/#create-or-update-a-file"}

feat: accept inclusion of organization accounts

Is your feature request related to a problem? Please describe.
Currently, this action doesn't include organization accounts. Only personal repositories seem to be tracked. This can make a big difference in the stats.

Describe the solution you'd like
An additional input could be added to the action.yml that is passed to the LinesOfCode class.

Additional context
Here is a nice blog post on this that uses the new v4 GraphQL API.

What do you think about the 'Projects''s order?

Is your feature request related to a problem? Please describe.
As you can see here in the README I've only 5 project listed, and this It's ok for me.
But I work currently to other projects and I've spent more time than other project that are not listed below.

image

For example I've worked on mitmproxy-wsus more than Unknown Project.

image

Describe the solution you'd like
We can easly order the project by percentage, what do you think?
I can work on this PR if you think is a good idea.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.