tulipcc
tulipcc copied to clipboard
Add on-device documentation using LVGL
Add a documentation browser on the device, using LVGL so it can be used at the same time as the repl.
Nice idea. I imagine someone could write a pure Tulip/micropython parser from .md files (like our API docs) to LVGL "spans": https://docs.lvgl.io/master/widgets/span.html for font size / bold etc. A full HTML renderer is off the table for now but there's probably a nice middle ground. I hope someone can build this on Tulip!
Hmm.. It would only really need to render these things:
- Headers = Larger fonts
- Italic and bold
- Code blocks = Monospace
- Text in backticks = Monospace
- Links = Link text
- Images = Ignore
- Maybe table for T-Deck keybindings? We wouldn't actually need a full markdown parser on-device, we could compile it to some kind of IR first. Maybe something like this?
1Current API
BNOTE
TOur own builds of Tulip Desktop may lag behind some of the APIs listed here. This page represents the APIs in the latest commit of our
Imain
Tbranch. If something isn't working properly, try building from scratch.
2General
TTulip boots right into a Python prompt and all interaction with the system happens there. You have your own space to store code and files in
M/user
T and we keep system examples and programs in
M/sys
T.
N
TYou can make your own Python programs with Tulip's built in editor and execute them, or just experiment on the Tulip REPL prompt in real time.
N
C# Interact with the filesystem.
C# Supported: ls, head, cat, newfile, cp, mv, rm, pwd, cd, mkdir, rmdir
Cls
Cmkdir('directory')
I wrote a little program to compile markdown to this IR: https://github.com/coolcoder613eb/mdc