COVID-19 certificate generator
A CLI to generate certificates when going out in France during the COVID-19 pandemic.
Filling web forms might be boring (especially for developers!!) when going outside during the pandemic by using the official website. This CLI will provide you with your certificate (aka, ATTESTATION DE DÉPLACEMENT DÉROGATOIRE) in one click! However, once generated, you have to figure out how to copy to your mobile device :D
The generated PDF file matches exactly the one generated by the official website as it uses the same code!
Original repository: https://github.com/LAB-MI/deplacement-covid-19
Prepare the environment
The code is written in JavaScript, thus, NodeJS is needed.
Download the required packages for the project
npm i
Generate the certificate
First, the profiles.json has to be filled with the required information for profile.
[
{
"lastname": "Times",
"firstname": "Vincent",
"birthday": "30/02/2000",
"placeofbirth": "Namportou",
"address": "1 rue du grand rue",
"zipcode": "99000",
"city": "Mille ans",
"email": "vincent.times@mail.com"
},
...
]
Then, simply run the script while specifying the reason for going out:
node certificate.js sport_animaux ./profiles
The current date and time will be used by default, however, they could be also specified:
node certificate.js --time="17h00" sport_animaux ./profiles
node certificate.js --time="05h55" --date="20/02/2020" sport_animaux ./profiles
Multiple reasons can be included separated by a dash '-'
(or any other character, or even NULL):
node certificate.js --time="17h00" achat-sport_animaux ./profiles
With output files:
node certificate.js --output=attestation-grandma.pdf famille ./profiles.json
Show help message and possible reasons
node certificate.js -h