.. 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")
```
2 KiB
| layout | board_id | title | name | manufacturer | board_url | board_image | download_instructions | downloads_display | blinka | date_added | features | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| download | nanopi_duo2 | NanoPi Duo2 Download | NanoPi Duo2 | FriendlyElec |
|
nanopi_duo2.jpg | true | true | 2021-02-05 |
|
The NanoPi Duo2("Duo2") is an ARM board designed and developed by FriendlyELEC for makers and hobbyists. It is only 55 x 25.4mm. It features Allwinner quad-core A7 processor H3, and has 256M/512M DDR3 RAM, onboard WiFi & bluetooth module and an OV5640 camera interface. It works with Linux variants such as Ubuntu Core.
The NanoPi Duo2 is tiny and compact with rich interfaces and ports. It takes power input from its MicroUSB port and can be booted from a Micro SD card. It works with general bread-boards. Interface pins such as USB, SPI, UART, I2C, PWM, IR, audio input & output and Fast Ethernet etc are populated.
The NanoPi Duo2 supports software utilities such as WiringNP and Python etc. These are all open source. It is suited for various IoT applications.
- CPU: Allwinner H3, Quad-core Cortex-A7 Up to 1.2GHz
- DDR3 RAM: 512M
- Connectivity: 10/100M Ethernet
- WiFi: 802.11b/g/n
- Bluetooth: Bluetooth V4.0 of 1, 2 and 3 Mbps.
- Camera: OV5640
- Key: GPIO Key
- USB Host: 2.54mm pin x2, exposed in 2.54mm pitch pin header
- MicroSD Slot x 1
- MicroUSB: OTG and power input
- Debug Serial Interface: exposed in 2.54mm pitch pin header
- Audio input/output Interface: exposed in 2.54mm pitch pin header
- GPIO1: 2.54mm spacing 16pin. It includes UART, SPI, I2C, Audio etc
- GPIO2: 2.54mm spacing 16pin. It includes USB,10/100M Ethernet, IO etc
- PCB Dimension: 25.4 x 55mm
- Power Supply: DC 5V/2A
- Temperature measuring range: -20℃ to 70℃
- OS/Software: U-boot,Linux-4.14 / Linux-3.4, Ubuntu 16.04.2 LTS (Xenial)