Skip to content

add SVG progress bar support with color and shape options#657

Open
acheronx0577 wants to merge 25 commits into
anmol098:masterfrom
acheronx0577:master
Open

add SVG progress bar support with color and shape options#657
acheronx0577 wants to merge 25 commits into
anmol098:masterfrom
acheronx0577:master

Conversation

@acheronx0577

Copy link
Copy Markdown

feat: add SVG progress bar support with color and shape options

What changed

Added SVG-based progress bar rendering as an alternative to the existing Unicode text bars. Controlled entirely via workflow inputs — no code changes needed after this commit.

New workflow inputs

Input Default Description
BAR_STYLE "text" "text" for original Unicode bars, "svg" for colored SVG bars
BAR_COLOR "#90CAF9" Fill color of the progress bar
BAR_TRACK_COLOR "#172f45" Background track color of the bar
BAR_RADIUS "0" "0" for square edges, "4" for subtle rounded edges

Files changed

  • sources/manager_environment.py — added BAR_STYLE, BAR_COLOR, BAR_TRACK_COLOR, BAR_RADIUS env vars
  • sources/graphics_list_formatter.py — updated make_graph() to branch between text and SVG output

Preview

BAR_RADIUS: "0" — square

square


BAR_RADIUS: "4" — subtle round

subtle round


Usage

- uses: acheronx0577/waka-readme-stats@master
  with:
    WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
    GH_TOKEN: ${{ secrets.GH_TOKEN }}
    BAR_STYLE: "svg"
    BAR_COLOR: "#90CAF9"
    BAR_TRACK_COLOR: "#172f45"
    BAR_RADIUS: "0"

Swap BAR_RADIUS between "0" (square) and "4" (subtle round). Any hex color works for BAR_COLOR and BAR_TRACK_COLOR.

## What changed

Added SVG-based progress bar rendering as an alternative to the existing Unicode text bars. Controlled entirely via workflow inputs — no code changes needed after this commit.

### New workflow inputs

| Input | Default | Description |
|---|---|---|
| `BAR_STYLE` | `"text"` | `"text"` for original Unicode bars, `"svg"` for colored SVG bars |
| `BAR_COLOR` | `"#90CAF9"` | Fill color of the progress bar |
| `BAR_TRACK_COLOR` | `"#172f45"` | Background track color of the bar |
| `BAR_RADIUS` | `"0"` | `"0"` for square edges, `"4"` for subtle rounded edges |

### Files changed

- `sources/manager_environment.py` — added `BAR_STYLE`, `BAR_COLOR`, `BAR_TRACK_COLOR`, `BAR_RADIUS` env vars
- `sources/graphics_list_formatter.py` — updated `make_graph()` to branch between text and SVG output

---

## Usage

```yaml
- uses: acheronx0577/waka-readme-stats@master
  with:
    WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
    GH_TOKEN: ${{ secrets.GH_TOKEN }}
    BAR_STYLE: "svg"
    BAR_COLOR: "#90CAF9"
    BAR_TRACK_COLOR: "#172f45"
    BAR_RADIUS: "0"
```

> Swap `BAR_RADIUS` between `"0"` (square) and `"4"` (subtle round). Any hex color works for `BAR_COLOR` and `BAR_TRACK_COLOR`.
Added detailed documentation for SVG progress bars across multiple language versions of the README. Included new flags for customization: `BAR_STYLE`, `BAR_COLOR`, `BAR_TRACK_COLOR`, and `BAR_RADIUS`, along with example workflow configurations.

Files updated:
- `README.md`
- `locales/README.de.md`
- `locales/README.es.md`
- `locales/README.fr.md`
- `locales/README.hi.md`
- `locales/README.ja.md`
- `locales/README.ko.md`
- `locales/README.pt.md`
- `locales/README.ru.md`
- `locales/README.zh.md`
@github-actions github-actions Bot added documentation Improvements or additions to documentation python Pull requests that update Python code github_actions Pull requests that update GitHub Actions code translation Issues/PRs related to translation labels May 9, 2026
@anmol098 anmol098 requested review from aravindvnair99, ok-coder1 and solusops and removed request for ok-coder1 May 9, 2026 03:30
@solusops

solusops commented May 9, 2026

Copy link
Copy Markdown
Collaborator

I saw the new bars in your profile @acheronx0577 they match your overall aesthetics and modernism.
Neat PR.
Allow me to reproduce and test it independently.

Comment thread README.md
…s bars

Added detailed before/after examples for default Unicode and SVG progress bars in multiple language versions of the README. This update improves clarity on the visual differences and usage of the new `BAR_STYLE` option.

Files updated:
- `README.md`
- `locales/README.de.md`
- `locales/README.es.md`
- `locales/README.fr.md`
- `locales/README.hi.md`
- `locales/README.ja.md`
- `locales/README.ko.md`
- `locales/README.pt.md`
- `locales/README.ru.md`
- `locales/README.zh.md`
@acheronx0577 acheronx0577 requested a review from solusops May 9, 2026 05:22
…uare and rounded corner examples

Enhanced documentation across multiple language versions of the README to include visual examples of SVG progress bars with square and rounded corners. This update improves user understanding of the `BAR_RADIUS` option.

Files updated:
- `README.md`
- `locales/README.de.md`
- `locales/README.es.md`
- `locales/README.fr.md`
- `locales/README.hi.md`
- `locales/README.ja.md`
- `locales/README.ko.md`
- `locales/README.pt.md`
- `locales/README.ru.md`
- `locales/README.zh.md`
Comment thread .github/workflows/waka-readme.yml Outdated
Comment thread sources/manager_environment.py Outdated
Comment thread sources/manager_environment.py Outdated
@ok-coder1

Copy link
Copy Markdown
Collaborator

other than that, everything is else is really nice.
i agree with solusops here, it looks modern, slick and very nice in my opinion.

@github-actions github-actions Bot removed the github_actions Pull requests that update GitHub Actions code label May 9, 2026
@acheronx0577 acheronx0577 requested a review from ok-coder1 May 9, 2026 08:51
ok-coder1

This comment was marked as low quality.

Comment thread sources/manager_environment.py Outdated
@ok-coder1 ok-coder1 added the enhancement New feature or request label May 9, 2026
@ok-coder1 ok-coder1 linked an issue May 9, 2026 that may be closed by this pull request
acheronx0577 and others added 4 commits May 11, 2026 23:12
Co-authored-by: okcoder1 <codershub.code@gmail.com>
…ndering in graphics_list_formatter.py

The Waka Readme workflow file has been removed. Additionally, the make_graph function in graphics_list_formatter.py has been updated to focus solely on text progress bar rendering, eliminating the SVG rendering logic for improved clarity and maintainability.
@github-actions github-actions Bot removed the github_actions Pull requests that update GitHub Actions code label May 12, 2026
@acheronx0577 acheronx0577 requested review from ok-coder1 and pseusys May 12, 2026 07:13
@ok-coder1

ok-coder1 commented May 12, 2026

Copy link
Copy Markdown
Collaborator

can you also document the two additional fields, (TEXT_PRIMARY_COLOR and TEXT_SECONDARY_COLOR) in the readme, thanks for all your work!!

Comment thread sources/graphics_list_formatter.py Outdated
Comment thread sources/graphics_list_formatter.py Outdated
acheronx0577 and others added 4 commits May 12, 2026 18:24
Co-authored-by: okcoder1 <codershub.code@gmail.com>
Co-authored-by: okcoder1 <codershub.code@gmail.com>
…ME files

Updated README files across multiple languages to include new environment variables for customizing primary and secondary text colors in SVG progress bars. Acknowledged contributions from AcheronX for adding SVG progress bar support with color and shape options.
@acheronx0577

Copy link
Copy Markdown
Author

can you also document the two additional fields, (TEXT_PRIMARY_COLOR and TEXT_SECONDARY_COLOR) in the readme, thanks for all your work!!

yes sirr its done

ok-coder1
ok-coder1 previously approved these changes May 13, 2026

@ok-coder1 ok-coder1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM! Thanks for all your work!

solusops
solusops previously approved these changes May 13, 2026

@solusops solusops left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, great work.

pseusys
pseusys previously approved these changes May 17, 2026
@ok-coder1 ok-coder1 dismissed stale reviews from solusops, pseusys, and themself via 8ec183c June 14, 2026 10:44
@ok-coder1 ok-coder1 requested review from pseusys and solusops June 14, 2026 10:45
@solusops solusops requested a review from ok-coder1 June 14, 2026 13:02

@ok-coder1 ok-coder1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM! Great work, thank you @acheronx0577!

@ok-coder1 ok-coder1 removed the translation Issues/PRs related to translation label Jun 14, 2026
@ok-coder1

Copy link
Copy Markdown
Collaborator

Can we merge? Just wanting the opinion of other maintainers.

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

Labels

documentation Improvements or additions to documentation enhancement New feature or request python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FEAT add more colors to the text and overall theme

4 participants