CampusStudyHub is a lightweight, local CustomTkinter application that helps computer science students and researchers manage coursework, track CCF-relevant conference deadlines, monitor experiment logs, and generate research-ready assets. Everything is stored locally in JSON/CSV files so it can be inspected, extended, and used offline as a teaching example.
- 总览仪表盘(Overview): 一屏卡片式总览任务、GPA 摘要、科研/会议/资源概况并可一键刷新。
- Task management & reminders: add/edit/delete tasks with overdue highlighting and upcoming deadline views.
- File organization & stats: scan/move study files into
Course/Semester/Type/and export indexes; see course/status counts. - 学校事项(School): GPA 计算器(必修/选修区分,专业 GPA 和总体 GPA)。
- 科研辅助(Research):
- 会议通知:本地/网络来源切换、定时刷新、星标“我的关注”、提前提醒,支持 LAN+邮件双通道。
- 实验监控:多日志并行监控,错误/收敛关键词分组,尾部快照、简单指标解析与 CSV 导出,可手动/自动提醒。
- 资源监控:一键查看
gpustat -i、top与df -h输出,便于随时检查 GPU/CPU/磁盘状态;在 macOS 无 NVIDIA 时自动提示并尝试system_profiler/powermetrics降级。- BibTeX 生成:会议/期刊模板切换,DOI 抓取(带缓存)、批量生成,字段校验与手动编辑。
- 科研拼图:统一分辨率、可选 DPI/字体/粗斜体、背景色/边框/子标签位置,自动 (a)(b) 标签。
- 其他(Others): 番茄钟(精确倒计时、进度条、沉浸静音模式、北京时间展示、可自定义时长)。
- Python 3.9+
- CustomTkinter + Pillow:
CustomTkinter 自带暗色主题;Tkinter 随官方 macOS Python 一起提供。
pip install customtkinter pillow
- 在 VS Code 打开项目目录。
- (可选)创建虚拟环境并激活:
python3 -m venv .venv source .venv/bin/activate - CustomTkinter + Pillow:
其余功能均使用标准库;请确保 macOS Python 带有 Tkinter(官方安装包默认包含)。
pip install customtkinter pillow
- 运行:
python main.py
- 首次启动会生成
data/config.json、data/tasks.json、data/conferences.json等本地文件。
常见提示:如果在终端看到 TSM AdjustCapsLockLED... 或 mach port for IMKCFRunLoopWakeUpReliable,这是 macOS 对 Tkinter 的无害警告,可以忽略。
- Clone or download this repository and open the folder in VS Code.
- (Optional) Create a virtual environment:
python3 -m venv .venv source .venv/bin/activate - Install dependencies:
Ensure Tkinter is available (it ships with the official macOS installer from python.org).
pip install customtkinter pillow
- Run the app:
python main.py
- Data files: On first run, the app will create a
data/directory withconfig.json,tasks.json, andconferences.json. File indexes are exported todata/files_index.csv; GPA 条目保存在data/grades.json;实验/阅读记录保存在data/experiments.json与data/papers.json,可一键导出data/research_summary.md。会议爬取源存放在config.json的conference_sources;DOI 缓存保存在data/bib_cache.json;日志监控配置保存在data/log_monitors.json。
main.py # Entry point
campusstudyhub/
├─ __init__.py
├─ config.py # Config defaults and persistence
├─ models.py # Dataclasses for tasks, conferences, GPA rows, file index entries, research notes
├─ storage.py # Load/save helpers for tasks, conferences, files, grades, research data
├─ lan.py # UDP-based LAN notification helper
├─ gui_main.py # CustomTkinter window and tab wiring(总览/学校事项/科研辅助/其他)
├─ gui_dashboard.py # 卡片式总览(任务/GPA/科研/会议/资源/时间)
├─ gui_pomodoro.py # 番茄钟(进度条、沉浸静音、北京时间、自定义时长)
├─ gui_lan.py # CCF 会议通知 + 实验日志监控(分离功能)
├─ gui_monitor.py # 资源监控(gpustat/top/df -h 输出聚合)
├─ gui_tools.py # GPA / BibTeX / 科研拼图(CustomTkinter)
└─ 旧版 tkinter 界面 # gui_tasks.py、gui_files.py 等:保留作为示例,可逐步迁移到 CustomTkinter
- Tasks are stored in
data/tasks.json; you can edit or back it up manually. - The default base directory for study materials is
~/CampusStudyMaterials; change it in the Files tab ordata/config.json(路径中的~会被自动展开到你的用户目录)。 - File moves are confirmed before execution and never delete files.
- The UI is intentionally simple and well-commented to serve as an educational starting point; feel free to extend it with new tabs or storage formats.
- On some macOS setups, you may see console messages such as
TSM AdjustCapsLockLEDForKeyTransitionHandlingorerror messaging the mach port for IMKCFRunLoopWakeUpReliablewhen launching Tkinter apps. These are benign lower-level warnings from the macOS input manager and do not affect the app; you can safely ignore them. - Conference deadlines live in
data/conferences.json. You can broadcast reminders over LAN by adding peers (IP/port) in the CCF Conferences tab and clicking Send LAN reminder; for safer testing, the default target points to127.0.0.1.