feature: Update text and add ability to show followers
Some checks are pending
PUBLISH_IMAGE / Publish 'waka-readme-stats' image (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
CODESTYLE / Run codestyle check (push) Waiting to run

This commit is contained in:
2024-11-03 00:00:13 -05:00
parent c1edbd4606
commit f3817de94d
5 changed files with 15 additions and 2 deletions

View File

@@ -178,11 +178,16 @@ async def get_stats() -> str:
data = GHM.REMOTE.get_views_traffic(per="week")
stats += f"![Profile Views](http://img.shields.io/badge/{quote(FM.t('Profile Views'))}-{data['count']}-blue)\n\n"
if EM.SHOW_FOLLOWERS:
DBM.i("Adding profile followers...")
data = GHM.USER.get_followers()
DBM.i(str(data)")
if EM.SHOW_LINES_OF_CODE:
DBM.i("Adding lines of code info...")
total_loc = sum([yearly_data[y][q][d]["add"] for y in yearly_data.keys() for q in yearly_data[y].keys() for d in yearly_data[y][q].keys()])
data = f"{intword(total_loc)} {FM.t('Lines of code')}"
stats += f"![Lines of code](https://img.shields.io/badge/{quote(FM.t('From Hello World I have written'))}-{quote(data)}-blue)\n\n"
stats += f"![Lines of code](https://img.shields.io/badge/{quote(FM.t('I have written'))}-{quote(data)}-blue)\n\n"
if EM.SHOW_SHORT_INFO:
stats += await get_short_github_info()