This is a collection of scripts that I use as a part of my workflow while contributing to MDN Web Docs projects, such as browser-compat-data and MDN content. While they are not particularly written for public use, the scripts should work just fine with a few folder path tweaks.
- Python 3.x
- NodeJS v10+
npm i
pip install -r requirements.txt
Requirements:
- MDN Web Docs' Browser Compat Data locally cloned (for modifications)
This script is a part of an attempt to set true/false values based upon implementation in a browser's WebIDL. This was discontinued as there is far too much ambiguity in the WebIDL, though the script was retained for archival purposes.
- Cloned sources of Chrome, Firefox, and Safari.
python check_webidl.py <browser>
This script calculates the statistics difference between the latest BCD release and the current HEAD
of the local clone.
python compare_stats.py [browser]
Currently, the latest BCD release stats must be manually calculated.
This script iterates through the values of BCD to find any non-real values (true
or null
values), and calculates an HTML-formatted, categorized list of entries.
python get_nonreal.py <folder> [browser]
python set.py <feature> [browser1,browser2...] [value]
This script takes a feature identifier and opens its MDN web docs page in the specified browser (defaults to Chrome). If the feature identifier doesn't have an mdn_url
specified, it will get the parent's instead.
python open_docs.py <feature> [browser]
This script is a command-line to quickly set a feature to a specific value.
python set.py <feature> [browser1,browser2...] [value]
[Description pending...]
node walk-csv.js
Requirements:
- MDN Web Docs' Content and/or Translated Content locally cloned (for modifications)
This script checks to see how long ago a file has been modified for content and assigns a corresponding color to its age. This is designed to check the age of files in the https://github.com/mdn/content or https://github.com/mdn/translated-content repositories.
cd path/to/mdn/[translated-]content/repo
python check_file_age.py