.. leading zeros are required for `frontmatter` to treat them as dates
rather than strings, apparently per the YAML specification.
This was done by script:
```py
import re
import datetime
import pathlib
import sys
import frontmatter
rx = re.compile(r'^(\s*)date_added:.*$', re.M)
for path_str in sys.argv[1:]:
print(path_str)
path = pathlib.Path(path_str)
post = frontmatter.load(path)
date_added = post.get("date_added", "")
if isinstance(date_added, datetime.date):
continue
if isinstance(date_added, str):
try:
date_added = datetime.datetime.strptime(date_added, "%Y-%m-%d")
except ValueError as exc:
print(f"Failed to parse date {date_added} in {path_str}: {exc}")
continue
date_added = date_added.date()
content = path.read_text("utf-8")
new_content = rx.sub(lambda m: f"{m.group(1)}date_added: {date_added}", content)
assert content != new_content
path.write_text(new_content, "utf-8")
```
967 B
967 B
| layout | board_id | title | name | manufacturer | board_url | board_image | date_added | family | bootloader_id | features | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| download | arduino_nano_33_iot | NANO 33 IoT Download | NANO 33 IoT | Arduino |
|
arduino_nano_33_iot.jpg | 2020-02-27 | atmel-samd | nano33iot |
|
Arduino NANO 33 IoT board has been designed to offer a practical and cost effective solution for makers seeking to add Wi-Fi connectivity to their projects (using Arduino) with minimal previous experience in networking. Learn how to set up the programming environment and get the hardware up and running, ready for your projects, in minutes.
NOTE: Not all on-board hardware is supported by CircuitPython
WiFi is not supported. The LSM9DS6 and ATECC chips are supported in CircuitPython by libraries that may use more RAM than is available on the SAMD21.