#text #run-time #tui #border #language #width

anathema

带有模板语言和运行时的文本用户界面库(TUI)

2个版本

0.1.1-alpha2022年8月4日
0.1.0 2022年8月4日

#297 in 模板引擎

MIT许可证

425KB
10K SLoC

Anathema

具有自定义模板语言和运行时的TUI库

入门指南

hstack [width: 40, height: 10]:
    // Left pane
    expand [factor: 1]:
        border:
            vstack:
                text: "Item 1"
                text: "Item 2"
                text: "Item 3"

    // Right pane
    expand [factor: 4]:
        border:
            expand:
                text: "This isn't where I parked my car!"

输出

┌──────┐┌──────────────────────────────┐
│Item 1││This isn't where I parked my  │
│Item 2││car!                          │
│Item 3││                              │
└──────┘│                              │
        │                              │
        │                              │
        │                              │
        │                              │
        └──────────────────────────────┘

依赖项

~2–13MB
~91K SLoC