Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support templates #162

Open
wants to merge 76 commits into
base: master
Choose a base branch
from
Open

Support templates #162

wants to merge 76 commits into from

Conversation

Gouvernathor
Copy link
Collaborator

@Gouvernathor Gouvernathor commented May 27, 2024

Left TODO:

  • allow the Vacants to be renamed and reordered
  • maybe allow more extended data
  • allow for a reversed template which implies...
    • allow metadata in templates
  • update the template standard specification
    • maybe use a parameter namespace for both the ids, and the metadata as parameters to the svg node
      • put the spec online at the namespace URI
    • probably ditch the multi-area spec, or reserve it as an extended spec that's not (yet) supported by the tool
  • remove all things related to area ?
  • Add the Sejm ?
  • Fill in the description

The specification of the accepted format is here https://gist.github.com/Gouvernathor/5825f5ce09b98c31343f798faeaebebe
There are two competing implems : one using the ET module and the other using regexes. While ET may be able to handle corner cases more elegantly, it is vulnerable to XML attacks where re is not.
this is test-only, I promise
Generated from the parliamentarch french-hemi branch, after inverting the id numbering (to have it from let to right)
not to be confused with flask template files which are html
not needed now that bootstrap has a better default value
@Gouvernathor
Copy link
Collaborator Author

Idea (possible subsequent reimplementation) : implement all the templates business logic in JS, rather than python, so that it executes on the client side. We just have to send the svg template, and let it be filled using basic XML handling stuff MDN documents very well. Con : harder to use locally by command line.

@Gouvernathor Gouvernathor marked this pull request as ready for review July 12, 2024 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow various parliament layouts
1 participant