.. 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")
```
24 lines
1.6 KiB
Markdown
24 lines
1.6 KiB
Markdown
---
|
|
layout: download
|
|
board_id: "sparkfun_nrf52840_micromod"
|
|
title: "MicroMod nRF52840 Processor Download"
|
|
name: "MicroMod nRF52840 Processor"
|
|
manufacturer: "SparkFun"
|
|
board_url:
|
|
- "https://www.sparkfun.com/products/16984"
|
|
board_image: "sparkfun_nrf52840_micromod.jpg"
|
|
date_added: 2021-04-06
|
|
family: nrf52840
|
|
bootloader_id: sparkfun_nrf52840_micromod
|
|
features:
|
|
- Bluetooth/BTLE
|
|
---
|
|
|
|
Featuring the nRF52840 SoC from Nordic Semiconductor, the SparkFun MicroMod nRF52840 Processor offers a powerful combination of ARM Cortex-M4 CPU and 2.4 GHz Bluetooth transceiver in the MicroMod form-factor with the M.2 MicroMod connector to allow you to plug in a compatible MicroMod Carrier Board with any number of peripherals.
|
|
|
|
The MicroMod nRF52840 Processor features the same Raytac MDBT50Q-P1M found on our [Pro nRF52840 Mini](https://www.sparkfun.com/products/15025?_ga=2.250420870.1636744795.1610382737-881909304.1580318117). This module includes an integrated trace antenna, fits the IC to an FCC-approved footprint along with including decoupling and timing mechanisms that would need to be designed into a circuit using the bare nRF52840 IC. The Bluetooth transceiver included on the nRF52840 boasts a BT 5.1 stack and supports Bluetooth 5, Bluetooth mesh, IEEE 802.15.4 (Zigbee & Thread) and 2.4Ghz RF wireless protocols (including Nordic's proprietary RF protocol) allowing you to pick which option works best for your application.
|
|
|
|
We've also routed two I2C buses, 2 SPI buses, eleven GPIO, dedicated digital, analog, PWM & PDM pins along with multiple serial UARTS to cover nearly all of your peripheral needs.
|
|
|
|
## Purchase
|
|
* [SparkFun](https://www.sparkfun.com/products/16984)
|