jongracecox / anybadge

A Python project for generating badges for your projects, with a focus on simplicity and flexibility.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow sub-classing badges to change style/structure

jongracecox opened this issue · comments

Is your feature request related to a problem? Please describe.
Support more extreme customization and configuration - allow more flexible templating and styling.

Describe the solution you'd like
In order to allow more customization and nuanced styles the badge class should be able to be subclassed, or maybe separate out aspects of the style into a separate class (BadgeStyle). The style class could be responsible for calculations, allowing the main badge package to deal with the macro aspects of generation.

Describe alternatives you've considered
Could use Jinja2 templates (which support math functions)

Additional context
Ideas originating from discussion with @miff2000 in #51.