.. 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
| layout | board_id | title | name | manufacturer | board_url | board_image | date_added | family | features | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| download | pimoroni_picosystem | PicoSystem Download | PicoSystem | Pimoroni |
|
pimoroni_picosystem.jpg | 2021-02-24 | raspberrypi |
|
An all-in-one pocket sized games console with RP2040 at its heart, ready for filling up with all the most fun pixels! PicoSystem has a nice tactile joypad and buttons, a vibrant 240x240 screen and a lipo battery, neatly wrapped up in some shiny abstract PCB art.
To get into bootloader mode so you can flash a new .uf2, turn your PicoSystem on whilst holding down the X button - it should then show up as a drive called RPI-RP2 on your computer.
Features
- Powered by RP2040!
- ARM Cortex M0+ running at up to 133Mhz
- 264kB of SRAM
- IPS LCD screen
- Joypad
- Buttons
- Lipo battery
- USB-C power
About the RP2040
The RP2040 microcontroller is a dual core ARM Cortex M0+ running at up to 133Mhz. It bundles in 264kB of SRAM, 30 multifunction GPIO pins (including a four channel 12-bit ADC), a heap of standard peripherals (I2C, SPI, UART, PWM, clocks, etc), and USB support.
One very exciting feature of the RP2040 microcontroller are the programmable IOs which allow you to execute custom programs that can manipulate GPIO pins and transfer data between peripherals - they can offload tasks that require high data transfer rates or precise timing that traditionally would have required a lot of heavy lifting from the CPU.