.. 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")
```
1.2 KiB
1.2 KiB
| layout | board_id | title | name | manufacturer | board_url | board_image | date_added | family | bootloader_id | features | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| download | lolin_s3 | LOLIN S3 Download | LOLIN S3 | Wemos |
|
lolin_s3.png | 2022-09-05 | esp32s3 | lolin_s3 |
|
WiFi & Bluetooth 5 (LE) development boards based ESP32-S3-WROOM-1.
Features
- based ESP32-S3-WROOM-1
- 16MB Flash (Quad SPI)
- 8MB PSRAM (Octal SPI)
- 2x USB-C connector
- OTG: for built-in ROM USB bootloader, serial port debugging, and USB device mode
- UART: CH340 USB-TTL
- Peripherals
- 31 x GPIO pins
ENRESET buttonGPIO0BOOT buttonGPIO38WS2812B RGB LED- Lolin I2C JST SH 4-pin port (does not match QWIIC/Stemma-Qt pinout) using
GPIO42(SDA) andGPIO41(SCL)