So how do you go about creating the commits like the example given? Even though I live in France I've not much looked at French law - the only exception being a few articles relating to immigration. In those examples, there are modifications made to preceding laws, and it seems to me that it would require strong AI to correctly update the original laws as required by the new law. The example in the README gives the impression that we can just pull from Git and get the updated version of the whole law, is that correct? If so, how?!?!
It's because legifrance carries snapshots of the articles. Git is very good at tracking the changes between them.
So for earch article, the codes tracks "when" the article changed, stores it in a hashtable, and replays the "time" (date) for each snapshot, and creates a commit each time.
It goes on each article on Legifrance, creates a JSON file with all the articles, which book/section they belong to, and for each article, tracks it's versions (they are dates). The crawler is in Go.
Then there is a python script that takes that JSON file, creates the .md files and runs the git commands in the shell.
Ultimately the sad thing is that I had to scrape this information. There were lots of pitfalls due to bad formatting and so on... Well, scraping.