File tree Expand file tree Collapse file tree 4 files changed +26
-2
lines changed Expand file tree Collapse file tree 4 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 30
30
- uses : actions/checkout@v1
31
31
with :
32
32
submodules : true
33
+ - name : Set up Python 3.x
34
+ uses : actions/setup-python@v2
35
+ with :
36
+ python-version : 3.x
33
37
- uses : ruby/setup-ruby@v1
34
38
with :
35
39
ruby-version : 3.0
38
42
run : |
39
43
gem install bundler:1.17.3
40
44
bundle install --full-index
45
+ pip install python-frontmatter
46
+ - name : Check feature names
47
+ run : python3 check-features.py
41
48
- name : Build site with jekyll
42
49
run : |
43
50
bundle exec jekyll build -d build
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ download_instructions:
10
10
date_added : 2021-2-14
11
11
features :
12
12
- Wi-Fi
13
- - Bluetooth/BLE
13
+ - Bluetooth/BTLE
14
14
- STEMMA QT/QWIIC
15
15
- Arduino Shield Compatible
16
16
- USB-C
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ board_url: "https://www.raspberrypi.com/products/raspberry-pi-zero/"
8
8
board_image : " raspberry_pi_zero.jpg"
9
9
date_added : 2022-2-14
10
10
features :
11
- - 40-pin GPIO
12
11
---
13
12
14
13
** NOTE** : Not all features are supported in CircuitPython.
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/python3
2
+ from pathlib import Path
3
+ import frontmatter
4
+
5
+ with open ('template.md' , "rt" ) as f :
6
+ metadata , content = frontmatter .parse (f .read ())
7
+ acceptable_features = set (metadata ['features' ])
8
+
9
+ failed = False
10
+ for filename in Path ('_board' ).glob ("*.md" ):
11
+ with open (filename , "rt" ) as f :
12
+ metadata , content = frontmatter .parse (f .read ())
13
+ features = metadata .get ('features' ) or ()
14
+ for feature in sorted (set (features ) - acceptable_features ):
15
+ print (f"{ filename } :0: Non-standard feature: { feature } " )
16
+ failed = True
17
+
18
+ raise SystemExit (failed )
You can’t perform that action at this time.
0 commit comments