Skip to content

A collection of tools I use to make working on MDN a little easier

License

Notifications You must be signed in to change notification settings

queengooborg/mdn-toolkit

Repository files navigation

Vinyl's MDN Toolkit

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.

Requirements

  • Python 3.x
  • NodeJS v10+

Setup

npm i
pip install -r requirements.txt

Scripts for BCD

Requirements:

check_webidl.py

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.

Requirements

  • Cloned sources of Chrome, Firefox, and Safari.

Usage

python check_webidl.py <browser>

compare_stats.py

This script calculates the statistics difference between the latest BCD release and the current HEAD of the local clone.

Usage

python compare_stats.py [browser]

Caveats

Currently, the latest BCD release stats must be manually calculated.

get_nonreal.py

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.

Usage

python get_nonreal.py <folder> [browser]

Usage

python set.py <feature> [browser1,browser2...] [value]

open_docs.py

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.

Usage

python open_docs.py <feature> [browser]

set.py

This script is a command-line to quickly set a feature to a specific value.

Usage

python set.py <feature> [browser1,browser2...] [value]

walk-csv.js

[Description pending...]

Usage

node walk-csv.js

Scripts for MDN Content

Requirements:

check_file_age.py

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.

Usage

cd path/to/mdn/[translated-]content/repo
python check_file_age.py

About

A collection of tools I use to make working on MDN a little easier

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published