.. 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")
```
38 lines
No EOL
1.5 KiB
Markdown
38 lines
No EOL
1.5 KiB
Markdown
---
|
|
layout: download
|
|
board_id: "m5stack_atom_echo"
|
|
title: "ATOM Echo Smart Speaker Download"
|
|
name: "ATOM Echo Smart Speaker"
|
|
manufacturer: "M5Stack"
|
|
board_url:
|
|
- "https://docs.m5stack.com/en/atom/atomecho"
|
|
board_image: "m5stack_atom_echo.jpg"
|
|
date_added: 2023-01-31
|
|
family: esp32
|
|
features:
|
|
- Wi-Fi
|
|
- USB-C
|
|
- Bluetooth/BTLE
|
|
- Speaker
|
|
---
|
|
|
|
ATOM ECHO is a Programmable Smart Speaker based on the M5ATOM design. Its form factor is very small, its dimensions are only 24 * 24 * 17 mm. Music can be played using the BT capabilities of the ESP32 from a mobile phone or tablet. The device could be programmed to access AWS, Baidu and other cloud platforms, using the built-in microphone and speaker for voice interaction, so that ATOM ECHO has certain AI capabilities, realizing voice control, story telling, Internet of things and other functions. The speaker is embedded with an RGB LED (SK6812), which can visually display the connection status. In addition to being used as a BT speaker, it still has the control ability of Atom series.Screw hole on the back is convenient for users to fix.
|
|
|
|
### Features
|
|
- Light and small
|
|
- Support STT services
|
|
- Based on ESP32, Support A2DP
|
|
- 2.4G Wi-Fi IEEE 802.11b/g/n
|
|
- Built-in microphone and speaker
|
|
- RGB LED status display indication
|
|
- GROVE extension interface
|
|
- Record and playback
|
|
- Programmable key
|
|
|
|
## Documentation
|
|
|
|
* [ATOM Echo Smart Speaker](https://docs.m5stack.com/en/atom/atomecho)
|
|
|
|
## Purchase
|
|
|
|
* [M5Stack](https://shop.m5stack.com/collections/m5-controllers/products/atom-echo-smart-speaker-dev-kit) |