.. 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")
```
29 lines
1.6 KiB
Markdown
29 lines
1.6 KiB
Markdown
---
|
||
layout: download
|
||
board_id: "hifive_unleashed"
|
||
title: "Hifive Unleashed"
|
||
name: "Hifive Unleashed"
|
||
manufacturer: "Sifive"
|
||
board_url:
|
||
- "https://www.crowdsupply.com/sifive/hifive-unleashed"
|
||
board_image: "hifive_unleashed.jpg"
|
||
downloads_display: true
|
||
blinka: true
|
||
date_added: 2020-03-25
|
||
features:
|
||
- Ethernet
|
||
---
|
||
|
||
We founded SiFive to bring the power of open source to the semiconductor industry. We do this not only by supporting the RISC-V specification, but also by implementing the specification and getting usable chips into the hands of developers as quickly as we can. We did exactly that just over a year ago when we introduced the open source, Arduino-compatible HiFive1 dev board based on our Freedom Everywhere line of 32-bit microcontrollers. Today, we’re proud to be doing the same thing with our Freedom Unleashed 64-bit, Linux-capable system-on-chip (SoC) platform. Meet the HiFive Unleashed, the world’s first RISC-V-based, Linux-capable development board.
|
||
|
||
Industry skeptics have previously dismissed RISC-V as an academic project, low performance, and only for microcontrollers. HiFive Unleashed, featuring the SiFive Freedom U540 SoC, ends all of that. Linux and RISC-V were meant for each other, and the HiFive Unleashed dev board brings them together for the first time.
|
||
|
||
- Processor: SiFive Freedom U540 SoC
|
||
- Memory: 8 GB DDR4 with ECC
|
||
- Connectivity: Gigabit Ethernet port
|
||
- Flash: 32 MB quad SPI flash from ISSI
|
||
- Storage: microSD card for removable storage
|
||
- Expansion: FMC connector for future expansion
|
||
|
||
## Learn More
|
||
* [Crowd Supply](https://www.crowdsupply.com/sifive/hifive-unleashed)
|