add SVG progress bar support with color and shape options#657
add SVG progress bar support with color and shape options#657acheronx0577 wants to merge 25 commits into
Conversation
## 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`
|
I saw the new bars in your profile @acheronx0577 they match your overall aesthetics and modernism. |
…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`
…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`
|
other than that, everything is else is really nice. |
…onfiguration variables
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.
|
can you also document the two additional fields, ( |
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.
yes sirr its done |
ok-coder1
left a comment
There was a problem hiding this comment.
LGTM! Thanks for all your work!
8ec183c
ok-coder1
left a comment
There was a problem hiding this comment.
LGTM! Great work, thank you @acheronx0577!
|
Can we merge? Just wanting the opinion of other maintainers. |
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
BAR_STYLE"text""text"for original Unicode bars,"svg"for colored SVG barsBAR_COLOR"#90CAF9"BAR_TRACK_COLOR"#172f45"BAR_RADIUS"0""0"for square edges,"4"for subtle rounded edgesFiles changed
sources/manager_environment.py— addedBAR_STYLE,BAR_COLOR,BAR_TRACK_COLOR,BAR_RADIUSenv varssources/graphics_list_formatter.py— updatedmake_graph()to branch between text and SVG outputPreview
BAR_RADIUS: "0"— squareBAR_RADIUS: "4"— subtle roundUsage