election_day.utils.svg_generator
Classes
Module Contents
- class election_day.utils.svg_generator.SvgGenerator(app: onegov.election_day.app.ElectionDayApp, renderer: onegov.election_day.utils.d3_renderer.D3Renderer | None = None)[source]
-
- remove(directory: str, files: Collection[str]) None [source]
Safely removes the given files from the directory.
- generate_svg(item: onegov.election_day.models.Election | onegov.election_day.models.ElectionCompound | onegov.election_day.models.ElectionCompoundPart | onegov.election_day.models.Ballot, type_: str, filename: str, locale: str) int [source]
Creates the requested SVG.
Returns the number of created files.