released this 1 month ago | 2 commits to master since this release
This marks a major release for ./badges with numerous large- and small-scale
improvements, especially for creating GUIs around ./badges due to explicit
parameter declaration. CLI invocation has been simplified and yet made more
flexible by adding stdin/stdout support.
- Fixed template.tmpl referring to the wrong font's metrics.
- Fixed invalid error message when parsing badge parameters.
- Builtin standard badge template received metrics for the left font
instead of for the right font.
- Fixed toInteger incorrectly handling float32 and invalid type values.
- FilesystemTemplate: ListThemes used the wrong directory
- Added example parameter to parameters.json and paramspec
- CLI: Added support for setting parameters in subtrees
- Added basic unit tests for badgerenderer
- Added explicit error for referencing an unknown font
- Extended documentation
- Moving tplfunctions and badgetemplate/compile.go back into badgerenderer
- Moved the badgetemplate and templates packages out of badgerenderer
- Fonts are no longer passed in as template parameters, instead they are
referenced by name (with the related template functions becoming closures of
- Simplified template parameter usage (dropped requirement for prepending
- Dropped template name from badgerenderer compilation functions
- ConvertAndValidateParams no longer modifies the parameter map in place,
instead it creates a copy
- Renderer now integrates parameter spec compilation and parameter validation
- ConvertAndValidateParams now explicitly rejects nil parameter maps
- Renderer now has its own, high-level error values
- Gracefully handling flag.ErrHelp in CLI
released this 2 months ago | 31 commits to master since this release
- Fixed output file not getting truncated.
- Text metrics / spacing fixed (issue #2).
- Added isFontName flag to parameter specification.
- Added script to generate generic badges.
- standard-badge: Adding a bit more padding.
- paramspec: Correcting case of JSON serialization.
released this 2 months ago | 37 commits to master since this release
- Removed the packages themes and params.
- Templates now have their own directory, which also contains the themes,
parameter specification (parameters.json) and optional embedding package
- Templates now declare their parameters and the types of the parameters.
- Changed LoadBuiltinFonts to panic in case of error, since failure is not
- Dropped separation between theme and template parameters.
- Dropped TemplateInput struct.
- Changed badgerenderer API to use a Renderer struct, decoupling the rendering
- Moved template functions into their own sub-package.
- Rewritten CLI, dropped batch processing, modified arguments (see usage info).
- Renaming default-parameters to generic-badges.
- Package paramspec contains types and functions for representing parameter
specifications (parameters.json) and validating/converting parameters
according to these specifications.
- Package badgetemplate contains types and functions for loading and handling
released this 5 months ago | 59 commits to master since this release
The initial release of ./badges