From 442fbd7929242d01dc2a86e680b32979e7fd49c2 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Wed, 12 Nov 2025 15:00:01 +0800 Subject: docs: update weekly draft --- content/55.md | 29 ----------------------------- content/_drafts/55.md | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 29 deletions(-) delete mode 100644 content/55.md create mode 100644 content/_drafts/55.md (limited to 'content') diff --git a/content/55.md b/content/55.md deleted file mode 100644 index 0f1be619..00000000 --- a/content/55.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: 稻草人周刊 Vol. 55 -subtitle: -tags: -categories: 稻草人周刊 -date: 2025-11-10 T09:31:00 -draft: true -toc: true ---- - -{{< music cover="https://image.guhub.cn/uPic/2025/11/https___images.genius.com_d1fc7f44c877049ad18369680e29b2eb.1000x1000x1.jpg" title="Stop Me If I'm Saying Too Much" artist="Chris James" apple="https://music.apple.com/cn/album/stop-me-if-im-saying-too-much/1779853577?i=1779853578" spotify="https://open.spotify.com/track/44pDoZoY8zfLLJ6vAjPvmG" netease="https://music.163.com/#/song?id=2646987093" >}} - ---- - -## ⋈︎ · 连接 - -## ⁂ · 星群 -## ↯ · 当下 - -### 开发 wthis - -某天摸鱼的时候无聊运行了 `brew list`,发现 macOS 的 Homebrew 装了一大堆我不认识的软件包,想用 `brew info` 看看某个 formula 的信息,但 Homebrew 自己打印出来的信息实在是太难读了,遂用 Go 写了一个命令行小工具,看到不认识的软件包直接大喊「What the heck is ...」,运行 `wth ` 即可查看关键信息。 - -个人认为最有用的是可以直观地看到这个包是自己运行 `brew install` 安装的还是作为依赖自动安装的,如果是作为依赖安装的,则会列出依赖于这个包的其他包。 - -![](https://image.guhub.cn/uPic/2025/11/telegram-cloud-photo-size-5-6091286833426795736-y.jpg) - -[GitHub - BigCoke233/wthis: 🍻 What the heck is in my Homebrew list?](https://github.com/BigCoke233/wthis) - diff --git a/content/_drafts/55.md b/content/_drafts/55.md new file mode 100644 index 00000000..cfd588fe --- /dev/null +++ b/content/_drafts/55.md @@ -0,0 +1,36 @@ +--- +title: 稻草人周刊 Vol. 55 +subtitle: +tags: +categories: 稻草人周刊 +date: 2025-11-10 T09:31:00 +draft: true +toc: true +--- + +{{< music cover="https://image.guhub.cn/uPic/2025/11/https___images.genius.com_d1fc7f44c877049ad18369680e29b2eb.1000x1000x1.jpg" title="Stop Me If I'm Saying Too Much" artist="Chris James" apple="https://music.apple.com/cn/album/stop-me-if-im-saying-too-much/1779853577?i=1779853578" spotify="https://open.spotify.com/track/44pDoZoY8zfLLJ6vAjPvmG" netease="https://music.163.com/#/song?id=2646987093" >}} + +--- + +## ⋈︎ · 连接 + +## ⁂ · 星群 +## ↯ · 当下 + +### 开发 wthis、学习 Go 语言 + +我对自己的设备有种奇怪的洁癖,会不定期浏览电脑上安装的 App 并卸载长时间未使用的,即使这个程序不会占用太多的存储空间。某天,我把目光转向了 macOS 上的命令行工具,运行 `brew list` 发现 Homebrew 列出来的大部分软件包我都不认识,用 `brew info` 查询的结果可读性极差,遂用 Go 写了一个[命令行工具](https://github.com/BigCoke233/wthis)。 + +看到不认识的 Formula 就大喊「What the ~~Heck~~Homebrew is this?」,即可获取必要信息: + +```shell +wthis +``` + +![](https://image.guhub.cn/uPic/2025/11/3GrHqV.png) + +个人认为最有用的是可以直观地看到这个包是自己运行 `brew install` 安装的还是作为依赖自动安装的,如果是作为依赖安装的,则会列出依赖于这个包的其他包。同时还会查询对应二进制文件上次被访问的时间,也就是可以看到自己最近有没有用过这个软件, + +开发过程很有趣,第一次写 CLI,控制换行和排版什么的没有想象的那么简单;学到了一些 Homebrew 相关的基础概念。写 Hugo 主题的时候也会用到一些嵌入的 Go 语言代码,但整体写的不多,所以在做这个程序的时候也难免求助 ChatGPT。从敲代码的体感上,Go 很像是现代化、更花哨也更好用的 C 语言,虽然结构体和指针一个不少,但写起来还算方便(但是 Go 移除了三目表达式,这个还是非常不习惯的!)。做完 `v0.1.0` 版本之后就去看 Go 语言文档查漏补缺,今年年初为了做游戏学了 Lua,那今年就以入门 Go 作为结尾吧——总觉得这两门语言在气质上有些类似,尽管一个是脚本语言,一个是更底层的语言。 + +访问:[GitHub - BigCoke233/wthis: 🍻 What the Homebrew is this?](https://github.com/BigCoke233/wthis) -- cgit v1.2.3