Skip to content

dsh-notebook v1.0.0

Latest

Choose a tag to compare

@mllun mllun released this 20 Oct 17:14

首个公开版本。

工具

  • note_add(content, tag?) — 追加笔记并返回行号;内容和 tag 都相同时跳过。
  • note_list(limit?) — 最近 N 条(默认 20,上限 200),带行号。
  • note_search(query, limit?) — 大小写不敏感子串检索,匹配内容和 tag。
  • note_delete(index) — 按物理行号删除,越界返回可读错误。

数据

  • 存放在 $DSH_HOME/dsh-notebook/notes.md(默认 ~/.dsh/dsh-notebook/notes.md)。
  • 每行 ISO时间 | tag | 内容,无 tag 写 -,单条最多 200 字。

可靠性

  • 零第三方依赖;同进程读写串行排队;写入走临时文件 + rename。

完整说明见 README。