.. 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.6 KiB
1.6 KiB
| layout | board_id | title | name | manufacturer | board_url | board_image | download_instructions | downloads_display | blinka | date_added | features | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| download | orange_pi_pc | Orange Pi PC Download | Orange Pi PC | Shenzhen Xunlong Software CO.,Limited |
|
orange_pi_pc.jpg | https://learn.adafruit.com/circuitpython-on-orangepi-linux/circuitpython-orangepi | true | true | 2019-06-04 |
|
What’s Orange Pi PC?It’s an open-source single-board computer. It can run Android 4.4, Ubuntu, Debian Image. It uses the AllWinner H3 SoC, and has 1GB DDR3 SDRAM.
- H3 Quad-core Cortex-A7 H.265/HEVC 4K
- Mali400MP2 GPU @600MHz
- Supports OpenGL ES 2.0
- 1GB DDR3 (shared with GPU)
- TF card (Max. 32GB) / MMC card slot
- 10/100M Ethernet RJ45
- A CSI input connector Camera
- Supports 8-bit YUV422 CMOS sensor interface
- Supports CCIR656 protocol for NTSC and PAL
- Supports SM pixel camera sensor
- Supports video capture solution up to 1080p@30fps
- MIC
- Supports HDMI output with HDCP
- Supports HDMI CEC
- Supports HDMI 30 function
- Integrated CVBS
- Supports simultaneous output of HDMI and CVBS
- v3.5 mm Jack and HDMI
- vDC input can supply power, but USB OTG input don’t supply power
- Three USB 2.0 HOST, one USB 2.0 OTG
- Power Button(SW4)
- 40 Pins Header
- GPIO(1x3) pin
- UART, ground.
- Power led & Status led
- IR input, POWER
- Android Ubuntu, Debian Image