SphinxKnight/history-content
Script to check the latest page changes manually between the desired language and the original language.
The MDN Change history reader
This script makes it possible to differentiate between two text files containing the latest modifications of two distinct folders in order to indicate the absence of a page or an update of the pages.
Recovering data
-
In order to generate a file, you need to open a Bash command block, and use the following command to retrieve the information from the
mdn/contentrepository:git ls-tree -r --name-only HEAD files/en-us/ | grep ".html$" | while read filename; do echo "$(git log -1 --format="%ad" -- $filename) $filename" >> logs-en-us.txt done
Note: You must have the folder locally on your computer, be in
contentand run the command from the rootcontent. -
Then you need to retrieve the data for the language you want to check. For example with the French folder :
git ls-tree -r --name-only HEAD files/fr/ | grep ".html$" | while read filename; do echo "$(git log -1 --format="%ad" -- $filename) $filename" >> logs-fr.txt done
Note: You must have the folder locally on your computer, be in
translated-contentand run the command from the roottranslated-content.Note 2: If you wish to change the language, you must change
files/fr/andlogs-fr.txtto the code used on the MDN for your language. -
Place both log files in the
historyfolder ofhistory-contentso that the script can process them.
Processing the data
Now let's set up the important part of the system, the language we are checking. In the index.js file, change the following line to the language you want to check:
const lang = 'fr';Then you just have to launch the index.html page and wait for the result to be returned.