No description
Find a file
m1ng 1675aa80ff Merge pull request #3 from m1ngsama/feature/vim-keybindings
feat: Add Vim keybindings (j/k) for navigation in TUI
2025-11-19 16:52:29 +08:00
build feat: Modularize calendar and create TUI portal 2025-11-19 16:34:25 +08:00
src feat: Add Vim keybindings (j/k) for navigation in TUI 2025-11-19 16:48:55 +08:00
CMakeLists.txt feat: Modularize calendar and create TUI portal 2025-11-19 16:34:25 +08:00
README.md Initial commit: NBTCA TUI with ICS calendar support 2025-11-19 11:50:45 +08:00

NBTCA TUI 服务中心ICS 日历模块)

使用 C++ 编写的终端 TUI 程序,从 https://ical.nbtca.space/nbtca.ics 获取 iCal 日历,解析并以 ncurses 在终端中直观展示未来一个月的活动。

依赖

  • CMake ≥ 3.15
  • C++17 编译器macOS 上建议 clang
  • ncurses
  • libcurl

在 macOS (Homebrew) 安装依赖

brew install cmake ncurses curl

构建

在项目根目录执行:

mkdir -p build
cd build
cmake ..
cmake --build .

生成的可执行文件为 nbtca_tui

运行

build 目录中运行:

./nbtca_tui

程序会:

  1. 通过 libcurl 请求 https://ical.nbtca.space/nbtca.ics
  2. 解析所有 VEVENT 事件,提取开始时间、结束时间、标题、地点、描述
  3. 过滤出从当前时间起未来 30 天内的事件
  4. 使用 ncurses TUI 滚动展示列表

TUI 操作说明

  • / :上下移动选中事件
  • q:退出程序