Duosmium / duosmium

A Science Olympiad tournament results archive.
https://www.duosmium.org
MIT License
10 stars 8 forks source link

SciolyFF Previewer #9

Closed tctree333 closed 2 years ago

tctree333 commented 2 years ago

When constructing SciolyFF, it's helpful to have a previewer to ensure that placements are accurate. Kalahari (Live site) is frequently used, but is based on sciolyff-rust. As we continue development on Duosmium/sciolyff, these two libraries may diverge and Kalahari might give incorrect results.

Instead of having the previewer be in a separate codebase, we can integrate it into the Duosmium website to preview exactly what the results will look like on the site. One solution would be to have a dynamic serverless template that can be POSTed to with the SciolyFF content, which would then return the generated HTML. We could also have a serverless function that runs the validator to ensure valid SciolyFF. Alternatively, we could bundle the validator and have it run client-side.

This previewer will NOT work offline or allow for a single-page HTML export since that would probably require the maintenance of two templates in separate codebases.

While we're at it, maybe we can throw convert (Live site) in here too...

smayya337 commented 2 years ago

convert will probably be easy to implement into the actual site, since it's a Rails app (overkill) that just runs a Ruby script. As a bonus, we can just upload CSVs there and it can show the results, followed by an option to download the YAML file so it can be loaded into the actual site.