S

stup - 用于日常笔记的 shell 工具

2025-06-09

stup - 用于日常笔记的 shell 工具

在过去的几年里,我一直参加站立会议,我花了一些时间才找到一种方便有效的方法来记录我每天所做的事情

我需要能够:

  • 对我处理过的问题、参加过的会议以及妨碍我工作的事物等进行分类记录
  • 根据日期轻松访问这些笔记
  • 回顾一下上周做了什么
  • 上述所有的:
    • 从终端内部
    • 笔记必须与记录日期严格一致
    • 无需手动构建和更新单个文档
    • 无需每天手动创建文档

傻瓜

我制作了这个工具,它实际上是一个 bash 脚本,我stup以术语st and- up来命名它。

愚蠢的演示

您可以在此处的 GitHub上找到该项目

使用示例

下面是一些展示最重要特征的示例stup

添加注释

# Adding a note to the default category at current date
stup add -n "Worked on issue #ABC123"

# Adding a note to the default category setting the current date explicitly
stup add today -n "Worked on issue #ABC123"

# Adding a note to the meetings category
stup add today -c "meetings" -n "2 hours with @phoebe for the project kick off"

# Adding a note to the blocking category for April 10th, 2020
stup add @ 2020-04-10 -c "blocking" -n "connectivity issues"

显示笔记

# Showing yesterday's notes
$ stup

# Showing yesterday's notes explicitly setting the date
$ stup yesterday

# Showing today's notes
$ stup today

# Showing notes on a specific date
$ stup show @ 2020-04-18

# Showing notes on a specific date for the meetings category
$ stup show @ 2020-04-18 -c "meetings"

检索一段时间内的所有笔记

# List current week's notes
stup log week

# List current week's notes skipping command's literal
stup week

# List previous week's notes
stup log previous-week

# List notes between January 20th, 2020 and March 2nd, 2020
stup log --from 2020-01-20 --to 2020-03-02

# List meeting notes between January 20th, 2020 and March 2nd, 2020
stup log --from 2020-01-20 --to 2020-03-02 -c "meetings"

幕后

笔记按类别组织。

添加新注释时,stup创建一个 markdown 文件并将其放置在类别目录下的子目录中,其路径基于日期。

CATEGORIES_ROOT_DIRECTORY/CATEGORY/YEAR/MONTH/YYYY-MM-DD.md

# For example, the notes of a category named "programming" April 18th, 2020 are saved under
CATEGORIES_ROOT_DIRECTORY/programming/2020/04/2020-04-18.md

这允许用户检索在特定日期或特定时期针对特定或所有类别添加的任何注释。

# Fetch notes for all categories
$ stup show @ 2020-04-18

# Fetch notes for a specific category for previous week
$ stup log previous-week -c programming

# Fetch notes for all categories for a specific period
$ stup log --from 2020-04-01 --to 2020-04-15

您可以在项目存储库中找到包含使用示例的完整文档,并在项目的GitHub 问题页面中找到有关要添加的功能的更多信息。

鏂囩珷鏉ユ簮锛�https://dev.to/iridakos/stup-a-cli-tool-for-daily-notes-503f
PREV
2020 年 2 月 GitHub 上 30 个最受欢迎的 JavaScript 存储库
NEXT
使用 Rails 和 WebSockets 从头创建聊天应用程序