{"id":36899599,"url":"https://github.com/amtoaer/medum","last_synced_at":"2026-01-12T15:45:27.229Z","repository":{"id":64306343,"uuid":"262466724","full_name":"amtoaer/medum","owner":"amtoaer","description":"a terminal todo manager written in go.","archived":false,"fork":false,"pushed_at":"2020-07-11T08:16:36.000Z","size":57,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-18T14:05:17.958Z","etag":null,"topics":["cli","cross-platform","fish","todo","todo-list","zsh"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amtoaer.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}},"created_at":"2020-05-09T01:52:59.000Z","updated_at":"2021-12-10T16:15:05.000Z","dependencies_parsed_at":"2023-01-15T10:45:17.398Z","dependency_job_id":null,"html_url":"https://github.com/amtoaer/medum","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/amtoaer/medum","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amtoaer%2Fmedum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amtoaer%2Fmedum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amtoaer%2Fmedum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amtoaer%2Fmedum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amtoaer","download_url":"https://codeload.github.com/amtoaer/medum/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amtoaer%2Fmedum/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28341714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cli","cross-platform","fish","todo","todo-list","zsh"],"created_at":"2026-01-12T15:45:26.341Z","updated_at":"2026-01-12T15:45:27.216Z","avatar_url":"https://github.com/amtoaer.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./src/logo.png\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    a terminal todo manager written in go.\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://goreportcard.com/badge/github.com/amtoaer/medum?longCache=true\u0026style=for-the-badge\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/license-MIT-orange.svg?longCache=true\u0026style=for-the-badge\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/version-v1.1.4-red.svg?longCache=true\u0026style=for-the-badge\"\u003e\n\u003c/p\u003e\n\n\n\n\n## 介绍\n\nmedum是一款使用go语言开发的命令行待办事项管理器。\n\n在我的构想中，它应该摈弃掉我认为的不必要的，冗余的功能，专注于deadline的管理，在此基础上尽量做到简单方便、易于使用；但同时，因为有一些个人主观性的取舍，该项目更倾向于个人项目，不大可能因为用户需求改变开发方向。\n\n\u003e   目标并未完全实现，为了简便处理做了较多的妥协（例如时间参数仅仅接受`month.day.hour.minute`格式），这将是近期的开发目标。\n\n## 初衷\n\n+   最近在学习go语言，准备整个简单项目练练手。\n\n    \u003e   然而更多地用到了数据库知识和第三方package..\n\n+   近期ddl过多，打算开发一个自己能用得到的小工具。\n\n    \u003e   结果为了开发这个工具差点错过ddl..\n\n+   目前在用的[todo](https://github.com/foobuzz/todo)使用较为不便（比如对日期格式的要求过于复杂），同时支持了很多在我看来没有太大必要的功能（比如星级、分类、是否可见等等）。\n\n    \u003e   写完之后发现自己的也没有简单到哪里去（主要是因为不太熟悉golang`time`标准库的用法，踩了不少坑），可能唯一的优点就是运行速度比那一款快了吧..~~废话，如果golang写的还没python快不如去死算了！~~\n\n\n## 安装\n\n\u003e   注：windows用户请使用微软全新的命令行工具`windows terminal`，否则无法正常运行。\n\u003e\n\u003e   感谢[@Ray-Keiyaku](https://github.com/Ray-Keiyaku)同学的测试。\n\u003e\n\u003e   `powershell`:\n\u003e\n\u003e   ![powershell](https://i.loli.net/2020/05/28/l8DrgIikwUKvFn1.png)\n\u003e\n\u003e   `windows terminal`:\n\u003e\n\u003e   ![windows terminal](https://i.loli.net/2020/05/28/NRwEbDW64GVPorT.png)\n\n安装主要有以下三种方法，请根据个人操作系统自行选择：\n\n1. （arch linux）从`AUR`安装。\n\n   ```bash\n   yay -S medum-bin\n   ```\n\n2. （linux/windows）下载[release](https://github.com/amtoaer/medum/releases)页面中对应的的二进制程序，参照[#用法](#用法)运行。\n\n3. （mac/linux/windows）手动构建。\n\n+   安装go与git。\n\n+   克隆仓库进行构建：\n\n    ```bash\n    git clone https://github.com/amtoaer/medum\n    cd medum\n    go build -v .\n    ```\n\n+   将`medum`移至环境变量（以linux为例）：\n\n    ```bash\n    sudo mv ./medum /usr/bin/medum\n    ```\n\n## 用法\n\n```bash\n⟩ medum --help\nNAME:\n   medum - a terminal todo manager\n\nUSAGE:\n   medum [global options] command [command options] [arguments...]\n\nCOMMANDS:\n   help, h  Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --begin value, -b value  event's begin time\n   --end value, -e value    event's end time\n   --name value, -n value   event's name\n   --remove, -r             remove outdated events (default: false)\n   --done value, -d value   the id of your finished event (default: 0)\n   --help, -h               show help (default: false)\n```\n\n常用操作演示：\n\n```bash\n# 当前时间为5.12日晚\n\n# 插入新事件，deadline为5/15，12:00（缺省-b，起始时刻默认为当前时刻）\n⟩ medum -e 5.15.12.00 -n 测试1\nsuccessfully insert event\n\n# 插入新事件，自己指定起始时间\n⟩ medum -e 5.15.12.00 -b 5.14.12.00 -n 测试2\nsuccessfully insert event\n\n# 插入过期事件\n⟩ medum -e 5.11.12.00 -b 5.10.12.00 -n 测试3\nsuccessfully insert event\n\n# 打印事件\n⟩ medum\n3 | 🍺 测试3 | ⌛ no time remaining\n1 | 🍺 测试1 | ⌛ 2 days remaining\n2 | 🍺 测试2 | ⌛ 1 days beginning\n\n# 删除过期事件\n⟩ medum -r\nsuccessfully delete outdated events\n\n# 再次打印事件，发现过期事件已经被删除\n⟩ medum\n1 | 🍺 测试1 | ⌛ 2 days remaining\n2 | 🍺 测试2 | ⌛ 1 days beginning\n\n# 完成序号为1的测试1，将其删除\n⟩ medum -d 1\nsuccessfully delete event with specific ID\n\n# 再次打印事件，测试1已经被删除\n⟩ medum\n2 | 🍺 测试2 | ⌛ 1 days beginning\n```\n\n## 截图\n\n以下为我在`linux`上使用的截图：\n\n![截图录屏_选择区域_20200513005252](https://i.loli.net/2020/05/13/zycFTamlK8uM79A.png)\n\n## 配置\n\n该项目支持自定义输出颜色，配置文件位于`~/.medum/config.json`，内容如下：\n\n```json\n{\n    \"NumberColor\": \"red\",\n    \"EventColor\": \"blue\",\n    \"TimeColor\": \"yellow\"\n}\n```\n\n具体来说，指的是：\n\n```bash\n8 | 🍺 数电作业 | ⌛ 13 hours remaining\n↑        ↑               ↑\nred     blue           yellow\n```\n\n允许的颜色共有十六种，分别为：\n\n```go\nvar funcs = map[string]interface{}{\n\t\"red\":       color.New(color.FgRed),\n\t\"blue\":      color.New(color.FgBlue),\n\t\"cyan\":      color.New(color.FgCyan),\n\t\"green\":     color.New(color.FgGreen),\n\t\"yellow\":    color.New(color.FgYellow),\n\t\"magenta\":   color.New(color.FgMagenta),\n\t\"white\":     color.New(color.FgWhite),\n\t\"black\":     color.New(color.FgBlack),\n\t\"hired\":     color.New(color.FgHiRed),\n\t\"hiblue\":    color.New(color.FgHiBlue),\n\t\"hicyan\":    color.New(color.FgHiCyan),\n\t\"higreen\":   color.New(color.FgHiGreen),\n\t\"hiyellow\":  color.New(color.FgHiYellow),\n\t\"himagenta\": color.New(color.FgHiMagenta),\n\t\"hiwhite\":   color.New(color.FgHiWhite),\n\t\"hiblack\":   color.New(color.FgHiBlack),\n}\n```\n\n## 引用\n\n在项目中使用到的第三方package:\n\n+   `github.com/urfave/cli/v2`：处理命令行参数\n+   `github.com/fatih/color`：跨平台的彩色输出\n+   `github.com/mattn/go-sqlite3`：sqlite3驱动\n+   `github.com/mitchellh/go-homedir`:跨平台的用户目录获取","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famtoaer%2Fmedum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famtoaer%2Fmedum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famtoaer%2Fmedum/lists"}