diff --git a/_blinka/adafruit_feather_rp2040.md b/_blinka/adafruit_feather_rp2040.md index ac907028..0a134de8 100644 --- a/_blinka/adafruit_feather_rp2040.md +++ b/_blinka/adafruit_feather_rp2040.md @@ -9,7 +9,6 @@ board_image: "adafruit_feather_rp2040.jpg" download_instructions: "https://learn.adafruit.com/circuitpython-libraries-on-any-computer-with-raspberry-pi-pico" date_added: 2021-12-6 features: - - USB-C - Feather-Compatible - STEMMA QT/QWIIC --- diff --git a/_blinka/adafruit_qtpy_rp2040.md b/_blinka/adafruit_qtpy_rp2040.md index dc30c6b3..146cff54 100644 --- a/_blinka/adafruit_qtpy_rp2040.md +++ b/_blinka/adafruit_qtpy_rp2040.md @@ -10,7 +10,6 @@ download_instructions: "https://learn.adafruit.com/circuitpython-libraries-on-an date_added: 2021-12-6 features: - STEMMA QT/QWIIC - - USB-C --- What a cutie pie! Or is it... a QT Py? This diminutive dev board comes with one of our new favorite chip, the RP2040. It's been made famous in the new [Raspberry Pi Pico](https://www.adafruit.com/pico) *and* our [Feather RP2040](http://www.adafruit.com/product/4884) and [ItsyBitsy RP2040](http://www.adafruit.com/product/4888), but what if we wanted something really *smol?* diff --git a/check-features.py b/check-features.py index 4e0d043f..eb7f57f0 100755 --- a/check-features.py +++ b/check-features.py @@ -2,17 +2,42 @@ from pathlib import Path import frontmatter +# Check CircuitPython Download Features with open('template.md', "rt") as f: metadata, content = frontmatter.parse(f.read()) acceptable_features = set(metadata['features']) -failed = False -for filename in Path('_board').glob("*.md"): - with open(filename, "rt") as f: - metadata, content = frontmatter.parse(f.read()) - features = metadata.get('features') or () - for feature in sorted(set(features) - acceptable_features): - print(f"{filename}:0: Non-standard feature: {feature}") - failed = True +def verify_features(folder, valid_features): + success = True + for filename in Path(folder).glob("*.md"): + with open(filename, "rt") as f: + metadata, content = frontmatter.parse(f.read()) + features = metadata.get('features') or () + for feature in sorted(set(features) - valid_features): + print(f"{filename}:0: Non-standard feature: {feature}") + success = False + return success + +if not verify_features("_board", acceptable_features): + print("Non-standard features found. See https://learn.adafruit.com/how-to-add-a-new-board-to-the-circuitpython-org-website/adding-to-downloads for acceptable features") + raise SystemExit(True) + +# Check Blinka Download Features +blinka_features = { + "Ethernet", + "HDMI", + "Wi-Fi", + "40-pin GPIO", + "GPS", + "Feather-Compatible", + "Bluetooth/BLE", + "STEMMA QT/QWIIC", + "USB 3.0", + "Infrared Receiver", +} + +failed = not verify_features("_blinka", blinka_features) +if failed: + print("Non-standard features found. See https://learn.adafruit.com/how-to-add-a-new-board-to-the-circuitpython-org-website/adding-to-blinka for acceptable features") raise SystemExit(failed)