UPDATE 2020-11-29: generator was updated with the new PDF version (sport up to 20km)

A second confinement has started on November 30 in mainland France to fight the COVID-19 epidemic. As such, any movement must be justified by means of an exemption movement certificate. If you are French, I’m not telling you anything you don’t already know, but I always prefer to add context.

To obtain this attestation, you can either print it out, or copy it on plain paper, or - and this is what we are interested in - use the PDF generator provided by the ministry of the Interior’s incubator. It is available here. Except that in its current version, it has several flaws that make its use really tedious:

  • you have to fill in your personal information at each generation and the autocompletion of the browser is disabled.
  • the descriptions of the reasons are convoluted, it took me a few minutes to understand which box to check to go shopping
  • the time is not pre-filled

Having said that, one can only appreciate the fact that the government made the source code available, since I was able to fix all these problems, Docker-ize it and put a modified version online in just over an hour. Source code

It can be accessed here: https://attestation.hoa.ro

You can use it if you wish.

No information is stored on the server. Values filled in fields are stored in the local storage of the browser, and for the rest I didn’t modify the system: all the fiddling is done on the client side.

Changelog:

  • Values set in fields are stored in the local storage, so you only have to fill them in once.
  • added a Docker build in order to run it easily on my server
  • at the moment the server is running in dev mode, because there are some things I don’t want to generate in static HTML (the current time for example)
  • added a second validation button at the top of the page
  • ultra-simplification of the reasons for travel, if you need the details, go to government website