{"id":50665332,"url":"https://github.com/Return-Log/Education-Clock","last_synced_at":"2026-06-25T03:00:28.200Z","repository":{"id":230634638,"uuid":"779754875","full_name":"Return-Log/Education-Clock","owner":"Return-Log","description":"适合学校使用的桌面时钟，软件具有 -倒计时 -桌面时钟 -课程表 -天气预报 -自动新闻联播 -定时关机 -消息通知栏 -随机点名等功能","archived":false,"fork":false,"pushed_at":"2026-01-10T16:39:00.000Z","size":9288,"stargazers_count":132,"open_issues_count":3,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-11T05:06:11.222Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Return-Log.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-03-30T17:35:55.000Z","updated_at":"2026-01-10T16:39:03.000Z","dependencies_parsed_at":"2025-05-01T03:24:01.354Z","dependency_job_id":"3dbbf5ac-9d3c-4d10-878f-33108bd3be72","html_url":"https://github.com/Return-Log/Education-Clock","commit_stats":null,"previous_names":["return-log/education-clock"],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/Return-Log/Education-Clock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Return-Log%2FEducation-Clock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Return-Log%2FEducation-Clock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Return-Log%2FEducation-Clock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Return-Log%2FEducation-Clock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Return-Log","download_url":"https://codeload.github.com/Return-Log/Education-Clock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Return-Log%2FEducation-Clock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34757355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-25T02:00:05.521Z","response_time":101,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-08T06:00:18.132Z","updated_at":"2026-06-25T03:00:28.163Z","avatar_url":"https://github.com/Return-Log.png","language":"Python","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# Education Clock\n\n\u003e [!NOTE]\n\u003e\n\u003e 软件具有-桌面时钟 -课程表 -天气预报 -自动新闻联播 -定时关机 -消息通知栏 -随机点名 -新闻看板 -定时消息- 每日一图等功能\n\n![-Education Clock.png](https://s2.loli.net/2024/12/08/K8Dedr6xpkSvyPa.png)\n\n# 信息\n\n协议：GPLv3\n\nGitHub仓库: https://github.com/Return-Log/Education-Clock\n\n# 功能说明\n\n\u003e [!WARNING]\n\u003e\n\u003e 设置信息存储在./data下，修改设置会自动保存，操作不可逆，请注意进行数据备份\n\n## 课程表\n\n### 显示课程表\n\n到达设定时间后对应课程加粗并使用高亮边框\n\n主界面可以选择显示其它时间课程表以适应调休\n\n### 更改课程表\n\n\u003e [!WARNING]\n\u003e\n\u003e 修改项后务必点击表格空白处以保存，直接关闭窗口可能会导致数据丢失\n\n#### 插入课程表\n\n对应日期为空时，点插入行按钮会自动添加一行\n\n不为空时需选择一行，点击插入按钮会在选中行下方插入一行\n\n#### 删除课程表\n\n选中要删除的行点击删除按钮即可删除\n\n#### 更改课程表\n\n双击需更改的单元格即可进行更改\n\n日期须符合HH:MM格式\n\n## 倒计时\n\n### 设置\n\n事件最多4个字符，也不要设置过长的倒计时(大于9999天)，否则会导致窗口显示超出范围\n\n## 天气预报\n\n使用和风天气的格点天气服务\n\nAPI可在和风天气开发平台自行注册获得\n\n\u003e [!CAUTION]\n\u003e\n\u003e 注意经纬度不要填反\n\n## 通知栏\n\n### 信息显示规则\n\n- 以时间倒序显示近7天数据\n\n- 最新消息以弹幕形式在屏幕上滚动\n\n- 支持markdown格式\n\n- 当过滤群组名字包含“管理组”关键字时，对应群组信息头用黄色显示\n\n\u003e [!WARNING]\n\u003e\n\u003e 通知栏信息编码为base64加密存储，只能在设置界面更改\n\n### 本地公告板设置\n\n公告板现支持md格式解析，图片解析，视频、文档等文件保存与快速打开\n\n#### 按设置界面提示填写API信息\n\n#### 过滤设置\n\n- 可选发件人昵称，群聊名字进行过滤\n- 有多个过滤项时使用逗号分隔\n- 过滤项间彼此互不干扰\n\n### 服务端设置\n\n#### 数据库设置\n\n数据库中构建如下表\n\n```sql\nCREATE TABLE IF NOT EXISTS `messages` (\n    `id` INT AUTO_INCREMENT PRIMARY KEY, -- 自增主键\n    `robot_name` VARCHAR(255) NOT NULL, -- 机器人名称\n    `sender_name` VARCHAR(255) NOT NULL, -- 发送者名称\n    `message_content` TEXT NOT NULL, -- 消息内容\n    `timestamp` DATETIME NOT NULL, -- 时间戳\n    `conversationTitle` VARCHAR(255) NOT NULL -- 群聊标题\n);\n```\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e 记得放行 3306 MySQL服务默认端口\n\n#### 添加数据\n\n##### 本质\n\n可以使用你自己的程序执行如下语句进行插入\n\n```sql\nINSERT INTO `messages` (`robot_name`, `sender_name`, `message_content`, `timestamp`, `conversationTitle`) VALUES\n('机器人名字', '发送者名称', '展示的消息内容', '时间戳(2024-11-04 15:00:04)', '群聊名称');\n```\n\n##### 使用钉钉机器人\n\n###### 在钉钉中创建机器人\n\n\u003e 需自建一个组织，机器人每月有3000次调用限制\n\n开放平台: https://open-dev.dingtalk.com/fe/app?hash=%23%2Fcorp%2Frobot#/corp/robot\n\n在自建组织中创建一个机器人应用，将应用凭证中三个项记下来\n\n对应机器人开发管理中添加服务器出口IP，和消息接收地址\n\n###### 服务器配置\n\npython版本: 3.10.14 使用flask框架\n\n./dingtalk-service/app.py 为服务端需运行软件\n\n将app.py中以下部分改为你自己的配置信息\n\n```python\n\"\"\"以省略上方代码\"\"\"\n\n# 数据库配置\ndb_config = {  # 数据库配置\n    \"host\": \"localhost\",\n    \"user\": \"\",\n    \"password\": \"\",\n    \"database\": \"\"\n}\n\n# 钉钉机器人配置（多个机器人）\nrobots = {  # 机器人应用凭证\n    \"\": {  # \"\"中填写AppKey\n        \"agent_id\": \"\",  # AgentId\n        \"app_secret\": \"\"  # AppSecret\n    }\n    # 可以继续增加更多的机器人配置\n}\n\n\"\"\"中间部分已省略\"\"\"\n\nif __name__ == '__main__':\n    app.run(host='0.0.0.0', port=20000, debug=True)  # 改为自己的端口\n```\n\n宝塔面板网站管理：\n\n添加一个python项目\n\n![PixPin_2025-04-20_10-25-45.png](https://s2.loli.net/2025/04/20/3dPy5cEkjXCWBZD.png)\n\n![PixPin_2025-04-20_10-27-26.png](https://s2.loli.net/2025/04/20/iDwXfLAESkouZtv.png)\n\n![PixPin_2025-04-20_10-28-39.png](https://s2.loli.net/2025/04/20/7duRjbvg84sPqSY.png)\n\n![PixPin_2025-04-20_10-30-40.png](https://s2.loli.net/2025/04/20/X8vfqKjzDPacN65.png)\n\n```\n所需的库，装最新版即可\nflask  # 用于创建 Web 应用程序\npymysql  # 用于连接和操作 MySQL 数据库\nalibabacloud-dingtalk  # 用于调用钉钉的 API\nalibabacloud-tea-openapi  # 钉钉 SDK 依赖的 Alibaba Cloud TEA OpenAPI 库\nalibabacloud-tea-util  # 钉钉 SDK 依赖的 TEA 工具库\n```\n\n最后重启项目\n\n###### 使用机器人\n\n在自建组织下添加一个内部群，添加上自定义机器人，@机器人 即可发送信息，一切顺利话此时数据库中已有这条信息\n\n## 自动关机\n\n一天中多个关机时间使用逗号分隔\n\n到达时间会弹出确认倒计时窗口，点取消即可终止关机\n\n## 新闻联播\n\n到达7:30会自动使用默认浏览器访问央视网，根据是否有声音播放模拟鼠标双击进行全屏操作，到达7:30自动关闭浏览器窗口\n\n模块默认为关闭状态\n\n## 悬浮球\n\n点击小猫悬浮球可打开工具栏，目前有随机点名、通知消息本地发送功能\n\n## API调用（新闻看板）\n\n显示效果\n\n![PixPin_2025-05-11_01-17-31.png](https://s2.loli.net/2025/05/11/1xKqRodS5mn2u9c.png)\n\n### 设置\n\n![PixPin_2025-05-11_01-18-49.png](https://s2.loli.net/2025/05/11/asMZ7bqpWf295V6.png)\n\n目前只能解析新闻类API（需要显示的项都在\"data\"下）\n\n使用md格式，API中的内容显示需加{}，如上图所示\n\n## 计时器\n\n从悬浮窗启动\n\n具有秒表和倒计时功能\n\n![PixPin_2025-06-15_12-46-07.png](https://s2.loli.net/2025/06/15/ktYLZg6Q1hNWcl5.png)\n\n## 计划消息\n\n可设置定时消息和循环消息，定时消息中设置为Sunday等可实现每周显示\n\n#### 支持多种日期格式：\n\n- 英文星期格式（Monday, Tuesday等）\n\n- 中文星期格式（星期一, 星期二等）\n\n- 完整日期格式（YYYY-MM-DD）\n\n- 月日格式（MM-DD）\n\n#### 多个时间点：\n\n- 支持逗号分隔的多个日期\n- 同时支持中文逗号和英文逗号\n\n## 每日一图\n\n在设置中启动后会自动获取必应每日一图，和图片描述，并可同时设置其为壁纸\n\n---\n\n![.png](https://s2.loli.net/2025/06/15/bBKPC7ATZ5UFpRf.png)\n\n------\n\nCopyright © 2024-2025  Log  All rights reserved.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FReturn-Log%2FEducation-Clock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FReturn-Log%2FEducation-Clock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FReturn-Log%2FEducation-Clock/lists"}