普通视图

发现新文章,点击刷新页面。
今天 — 2024年10月16日1nan

整了个 NAS

作者 Yinan
2024年10月16日 06:53

最近整了个 DS423+ 来代替之前的老旧 MacBook Pro + 一块外接硬盘的 NAS/homeserver 方案。

我买了四块盘。 1、2 8TB 希捷盘做了 RAID1 冗余,其余两块略大的盘 Basic(希捷12TB 和 16 TB),另有两块 NVMe SSD 作为存储池跑 Docker,放告诉存储。几天用下来,发现 NAS 有几个好处,

  1. 数据从冷数据变成了 24 小时在线的热数据,可以随时访问编辑,而不用插硬盘挂个线。而且,终于把散落在各个硬盘的数据整合在了一起,之前一份数据为了访问方便可能存到了好几块外接硬盘上,而 NAS 提供了个中心化的存储方案。另外据我所知,Btrfs 格式支持 deduplication, 重复数据只存一份,不会浪费空间。
  2. Raid1 冗余允许一块硬盘坏了重建,和 DSM 的较为完备的预警系统以及文件完整性检查。之前在移动硬盘上数据坏了都不知道,只能从备份恢复(如果有备份的话)。
  3. Btrfs 文件系统支持快照,可以随时回滚到之前的状态(群晖有官方套件 Snaptshots Replication,非常推荐,就像 macOS 的时间机器一样)。
  4. 无线的时间机器备份真的很爽。第一次有点慢可以考虑接网线备份,之后增量备份的时候就不用管了。
  5. 折腾的乐趣

不得不说, DSM 虽然最近走了倒车,但仍是一个很新手友好和功能和生态完善的 NAS 系统(其他 unraid truenas 没有用过不做评价)。用下来我的感觉是,DSM 的很多功能是在教用户应该怎么维护数据健康/维持高可用性,怎么做备份和快照。另外还有什么影音库,照片库,跑下载,甚至 DNS,软路由等都是 NAS 很好用的功能,不过目前对我来说收益不是特别大。

当然缺点也有:

一是读写速度显然没有插个固态快(受制于网络和机械硬盘),不过花几十块钱买个交换机用 smb 双通道 (multichannel) 也算上了 250 MB/s, 比外接一块机械硬盘快了。

二是 8TB 以上7200转的硬盘读写时炒豆子声音还是很大,解决方法是换5400转的硬盘或者上 SATA SSD 解决。如果跑 Docker 和虚拟机,也可以考虑装个 NVME SSD 把套件数据和 Docker 转移到 SSD 存储池上。加内存条减少 swap 或许也有帮助。

三是 DS423+ 的 DSM 系统虽然好用,但是奈何硬件太弱了,Intel Celeron J3455, PCIe 2.0 x 1 (NVME 只能跑 500 MB/s),1Gbps 网口,这些要升级就得加钱,然而一台白裙的价格对于其硬件来说已经很贵了。

关于 SSD 的配置和其他资料,推荐一个链接和两个 Github 项目。

  1. 专门开一贴,群晖硬软件的的各种坑及解决方案
  2. https://github.com/007revad/Synology_M2_volume
  3. https://github.com/007revad/Synology_HDD_db

另外再提一嘴数据安全,虽然 Raid 有冗余,但是冗余不是备份!遵循 3-2-1 原则定期备份数据到云端是很有必要的,防止硬盘损坏,天灾人祸等意外情况。后面会写一篇文章分享一下我的备份方案。

最后给我的 NAS 上个照片。

DS423+

昨天以前1nan

Follow 认证

作者 Yinan
2024年10月5日 23:50

This message is used to verify that this feed (feedId:41446022334078981) belongs to me (userId:63216204740061184). Join me in enjoying the next generation information browser https://follow.is.

RSSBrew beta 简单介绍和使用指南

作者 Yinan
2024年6月3日 01:22

RSSBrew 是一个 RSS 处理和管理的工具。简单来说就是通过处理用户添加 original feed,系统后台获取原文章,根据用户设置进行一系列处理,把处理后的文章重新聚合生成一个新的 processed feed,然后用户订阅这个 processed feed 即可。

目前拥有以下功能:

  1. 可以应用于文章,标题,URL 的过滤条件和过滤组,可用来过滤文章是否进入最终的 feed 或者是否用生成摘要。
  2. 聚合多个 feed,生成一个新的 feed。
  3. 使用 AI 对用户过滤后的文章单独生成摘要,附在原文前,可自定义 prompt。
  4. 周报日报功能,可以将一天或者一周的文章聚合成一个文章。

安装教程请参考 INSTALL.md。安装位置需要 docker engine,需要有公网 ip 的服务器,推荐使用 vps。一个域名(可选),如果没有域名,可以使用 ip:port(默认8000) 的形式访问。

由于最近加了 huey 作为任务队列,所以不通过 docker-compose 安装的方法暂时没有更新,目前推荐 docker-compose 安装。

如果需要配置域名访问,推荐使用 caddy 或者 nginx 作为反代,这里就不做详细介绍了。 注意需要把部署的域名加入到 .env 的变量 DEPLOYMNET_URL 中才能正常通过自定义域名访问。如果没有,请把 ip:port 加入到 DEPLOYMNET_URL 中,不需要加 http:// 等协议头。

使用说明

有用户反馈想要使用说明,由于目前文档没有写好,这里简单写一下如何使用。访问应用后有四个配置项,分别是 original feeds, processed feeds, tags, app setting。因为测试阶段短时间内文档不会完成,所以我这里尽可能写的详细,请根据需要的功能跳转到对应的段落阅读。

App setting

App setting 用来配置 auth code,设置后需要在访问时在订阅源地址后面加上 ?key=your_auth_code 才能访问。

original feeds 用来添加原始的,需要处理的 atom 或者 xml feed,可以配置 url, 以及可选配置名称和 tag。 Tag 是用来方便分类管理 original feeds 的。

processed feeds 是处理后的 feed,在列表栏从左到右是名称,每次更新周期需要总结的文章数,订阅链接,以及包含了多少个 original feeds。

processed_feed

点击名称进入 processed feed 的配置页面,可以配置过滤条件,过滤组,摘要和 日周报的生成。

processed_feed_config

聚合功能

前两项名称和 Feeds 是必须的,feeds 是多选框,用来添加已有的 original feeds,最终会把所有选中的 feeds 聚合到这个 processed feed 中。有了这两个配置,理论上就可以用上聚合功能订阅了,接下里所有的配置都是可选的。

Feed group relational operator (过滤组关系) 会在后面过滤组中详细介绍。目前先不用管。

Summarization options AI 摘要功能

在 summarization options 中,可以配置每次更新(测试阶段默认是每 5 分钟,在 docker-compose.yml 中通过 cron 变量可以把周期调大一点)总结的文章数,为 0 就是不用 AI 总结功能。可以选择语言,model, 自定义 prompt。默认 prompt 会给一条一句话总结和一个稍长的总结。默认效果如下:

ai_summary

Summary group relational operator (过滤组关系) 同上,会在后面过滤组中详细介绍。目前先不用管。

Digest options 日周报功能

这是一个在 telegram channel rss 生成周报的效果:

digest_telegram

Toggle digest 是开关,开启后会生成日报或者周报。默认是关闭的。如果开启,可以配置 daily/weekly。Last digest 的时间会在后台自动生成周日报时更新,

留空即在下一次更新时自动生成 digest,后面系统会根据这个时间是否需要生成新的 digest。一般情况下,这个项不需要管,如果需要测试用手动生成周日报的功能,可以把时间调到一周前或者一日前。

勾选 toggle digest 之后,可以配置周日报格式,主要由三大部分构成:

  1. 周/日报目录。

目录就是一个简单的标题-链接的列表,可以一眼扫过一周更新的条目,如上显示。如果在 summarizaiton options 中开启了 AI 摘要功能并且用了默认的 prompt,除了标题和链接,还会有 AI 一句话总结。

  1. 条目详细内容

如上图所示,紧跟着目录是 details,可以自选包含 AI 生成的摘要(需要在 summarization options 中开启 AI 摘要功能)和原文章内容。

  1. AI 分析你的周/日报。

勾选 use ai digest, 可以配置 digest model (推荐使用 gpt-4 或者 4o, 我测试下来 3.5 turbo 偶尔会出现总结不全的情况) 和自定义 prompt。下面 send full articles 是指你是否想要 AI 总结周日报的文章全文,如果不勾选,为了节约 token,和防止条目过多过长,只会发送给 AI 每篇文章的标题 url 和摘要(摘要需要在 summarization options 中开启 AI 摘要功能)。

以上三大部分关于周日报内容的配置都在 what to include in digest 中, 也就是 toc, one-line summary, summary, ai digest。

另外,在 toggle digest 后面有一个选项 toggle entries。如果有些 feed 你只想看每周每天扫一遍周/日报,不想要看到其他的原文章条目更新,让你的未读堆积。你可以取消勾选 Toggle entries 来隐藏原文章条目,不要怕错过,他们会在日报周报中出现。

过滤和过滤组

我们还没有讨论到过滤,如果配置了以上的内容, processed feed 会把所有的 original feeds 聚合到一起,生成一个新的 feed。但是这个 feed 会包含所有的原文章,并且不管是什么文章,都会进入周日报,进入更新的 entries, 或者发给 AI 生成摘要,如果想要更加个人化的信息源,比如说监控某些关键词,同时屏蔽另外一些关键词,或者比如说让 AI 长文总结,短文不总结,或者只总结某一个关键词文章,这需要过滤功能。

为了实现高级的过滤,RSSBrew 用了两层过滤条件。也即 过滤组(filter group)- 过滤器 (filters)。过滤组包含过滤器,负责管理组内所有过滤器的关系(任意条件 any /所有条件 all/无一条件 none = not any)满足以及过滤器的用途(用来完全屏蔽文章或者,不屏蔽文章只是过滤他是否总结)。过滤器是具体的过滤条件,比如说标题/内容/url 包含某个关键词,满足某个正则表达式,或者文章长度大于/小于某个值。

多个同用途的过滤组之间还可以共同作用,他们之间的关系就是由上面提到的过滤组关系 Feed group relational operator 以及 Summary group relational operator 来决定的。比如说你有两个过滤组 A B 都是用来 Feed Filter(用来完全屏蔽文章) 的, 且他们之间是 any 的关系。分别由两个 and 过滤器构成,那么就可以实现高级的过滤运算逻辑比如:

A or B = (A-1 and A-2) or (B-1 and B-2)

当然如果你只是想要最简单的过滤,只需要一个过滤组就可以了。即使这样你也可以在组内设置多个过滤条件,或者通过配置正则表达式让单层过滤器实现很多功能。

后期 plan 和功能

  1. 前端报错信息,目前很多报错只是记录在后台,没有返回给前端。出错了 debug 时需要查看 logs 日志。
  2. tag folder 功能完善,更好的分类管理
  3. opml 的批量导入导出
  4. 全文获取
  5. json feed 支持
  6. 完善文档

不过目前正忙着写毕业论文和找工作,所以短期内这些功能都没有 ETA。但等忙完毕业论文会把这个项目完善,也会一直维护更新。欢迎在 telegram 交流群 和 GitHub issue 中里提出建议和需求。

Hoarder - The Self-Hosted Bookmark Manager

作者 Yinan
2024年5月25日 01:56

Trying out Hoarder app today, to see whether it would competes Anybox as my main bookmark manager. I do like self-hosting services, and I like hoarding stuff 🤭.

At first sight, it feels like a complete app I can put in production, it has a iOS app with share sheet support, chrome extension for easily save from browser, it saves note and images.

I really like the ability to have AI tagging for links and images so that I don't have to manually organize them. And the full text search is something Anybox doesn't have yet. While I write this article, May 2024, it is still under review in the canny page of Anybox.

However, there are some features missing before it can become my main bookmark manager.

  • REST API - for easily exporting data like links, tags, and for an Alfred workflow.

    For now, it provides a CLI tool, but I am installing the app on my homeserver instead of my laptop. I will have to ssh to use the CLI, not ideal. A REST API would be good for remotely managing data.

  • Easy data export

    I don't seem to find a very good way to export data easily, for example screenshots, local cache, links.

  • Offline archiving

    For now, Hoarder supports plain text caching and screenshots. It would be good to see other formats supported (Planned, as of May 2024)

  • Local scrapper to fetch content after user login for some sites.

    What I like about Anybox is its integration with SingleFile extension. It can directly save the .html downloaded to Anybox via API, so that any content behind paywall will also be downloaded. (It actually addresses the pity that SingleFile metadata only contains the first part of the full domain - it will only show something like https://github.com, when you directly download a html with SingleFile metadata to DEVONthink)

Other features could be useful: - RSS subscription link

Like what linkding and wallabag provides. I am currently relying on RSS to sync my read-it-later from wallabag to DEVONthink.

To conclude, it will not replace Anybox with Hoarder for now. But it is a very young and promising open-source app with rapid iteration, someday it might will.

苹果端 Todo App 简单比较

作者 Yinan
2024年5月22日 07:32

继半年多前从 Things 转移到 OmniFocus 之后,今天又在探索苹果端几大 Todo App,主要比较了 Things, OmniFocus 以及 TickTick(唯一跨平台,已经赢了🤭)。

Things

先说说老朋友 Things,Logbook 显示我从2022年的7月开始用到了2023年的11月15日,等了一年半的 Things 4,始终没有等到。

不过 Things 3 还是一如既往美观简洁好用,可惜相比较 OmniFocus 缺了以下我觉得很有用的功能:

  • Filter/Smart List: Shortcuts 目前半残,如果我不能在组会前,看到在 PhD Area 完成了哪些项目我怎么给老板交差?
  • Review Perspective: OmniFocus 可以帮你 keep track review 列表,Things 只能手动 Review。
  • Automation: 在 OmniFocus 里可以写脚本把符合某些条件的 Todo 自动归类,或者 Tag。

OmniFocus

我是从 OmniFocus 4 更新(2023年底)之后才开始重度使用的,上面其实已经把我这半年多用 OmniFocus 的感受列的差不多了,唯独有一点我还希望能够加上的,就是 Kanban View。

我的任务通常会卡在某个节点比如说,计算中,或者等待回复,而不是简简单单的 0-1 两个状态,而 kanban 以及 Things 的 Heading 就很好地处理了这个问题。OmniFocus 虽然有 Nested Task,但是使用下来更像是子/母任务的从属关系,描述任务的状态我更多用的是标签,但是仍不如 Kanban 拖拽来的直观。

EDIT: 用 Tagging 作为 Kanban 的坏处在于它不是 exclusive 的,把任务从一个标签拖拽到另一个会让它同时打上两个标签,作为 Kanban 显然不理想。好在论坛里有人提到用 Command + 拖拽就可以实现转移标签。

另外,如果需要一个 Kanban board based on Tagging,可以看一下这个插件,试用了一下还不错,从脚本上实现 exclusive tagging,把不同 board 的按钮放在工具栏也能实现在不同标签(Board)之间转移任务。比如说我现在的工具栏和 kanban 长这样:

题外话,Things vs OmniFocus 的比较于我有点像 Anybox 和 DEVONthink 的比较,一个简洁漂亮,功能单一,能完成他该完成的,一个功能强大,有点 buggy,不够美观,

TickTick

一度觉得很理想,有 Kanban,四象限,过滤器,还有经典的日历视图。 除了没有 Area 的概念,Project 多了可能会很乱。 但是为什么不让我在 iOS 端用国内滴答的账号?

EDIT: 感谢读者提醒,把 App 语言修改成中文后,登录界面底下可以切换成国内滴答。我再体验几天,后续可能会更新详细体验和比较。

其他玩家

我没有测试 Todoist,因为订阅费用实在太高,但是据说自然语言输入很好用。还有一些后来者:比如 GoodTask (in SetApp) 可以作为 Reminder 的强化版本。我没有考虑长期使用,所以这里不详细介绍了。

最后,Todo 只是帮助 prioritize 和 focus 的工具,为了 Get Things Done,一张纸也可以做到这样。所以没有最好的 Todo App, 只有最适合你的。

切忌陷入效率陷阱

切忌花在拖拽, Tag Todo 比实际完成 Todo 花的时间还要多。

切忌频繁更换工具,能用就不要动。

About

作者 Yinan
2023年6月20日 00:35

Hi, I am Yinan, a PhD student in Physics. You can access this blog via yinan.me and yinan.ch.

Since I started my PhD, I have been reading and learning a lot, by writing down tons of notes and worklogs. Most of my notes are Markdown files stored in an app called Obsidian.

Since almost all of my notes are going digital now, it is not a bad idea to put them online. Also, I have been writing short articles in Chinese since very young, but hadn't had the chance to collect and share them with others. I have been thinking about starting a blog for a long time.

Now, I finally decided to start one, thanks to a great tool PyBoke, which makes it very easy to create a blog using Markdown files. I know other tools like WordPress and Hugo that can do the same thing, but I like the simplicity of PyBoke.

About this blog

This blog is created by a modified version of PyBoke, where I added features like full text RSS, navigation buttons, and abstracts on the homepage.

The original version of PyBoke is created by ahui2016.

This blog is fully open source. All the articles in Markdown format, together with the templates I use on this website can also be found in the GitHub repo.

I use the theme newcss, and publish the blog on GitHub Pages and Cloudflare Pages. You can also access the blog via 1nan.pages.dev or yinan-c.github.io.

What will I write here?

I am interested in many things, including but not limited to: RSS, macOS softwares, Python ... As I browse the internet (mostly via RSS), interesting things will pop up and I am happy to share online here.

Thanks

  • Twitter logo icons created by Md Tanvirul Haque - Flaticon
  • Email icon from freepnglogos.com
  • Matodon logo by Eugen Rochko & other Mastodon contributors - https://blog.joinmastodon.org/, AGPL, https://commons.wikimedia.org/w/index.php?curid=120470930

License

The articles I write are licensed under CC BY 4.0. You are free to: - Share — copy and redistribute the material in any medium or format - Adapt — remix, transform, and build upon the material for any purpose, even commercially.

The licensor cannot revoke these freedoms as long as you follow the license terms.

Under the following terms:

  • Attribution — You must give appropriate credit , provide a link to the license, and indicate if changes were made . You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.

Hello World

作者 Yinan
2023年6月19日 01:59

我是谁?

我叫Yinan,目前在英国读博,物理专业。本科在中科大,也是学的物理。这个博客的域名是 yinan.meyinan.ch

为什么写博客?

回想过去的25年,虽然有记录,写笔记的爱好,但是我还没有正经得把自己的所见所思整理,更没有发布。开始读博以后,有意识的把工作记录和日常见闻记录成文档,碎碎念积少成多,也就成为我在这个世界上来过的一点点证明。

博客作为一个自己的 digital 小岛,我认为非常适合将这些见闻想法汇集。平时阅读很多文章,浏览很多新闻信息,但是大多很快就忘了,它们只是作为信息从我脑中漂过,而不是作为知识想法被我内化。组织语言记录是对这些繁杂信息的整理消化,“再创作”,也是一次自我反思。从这个意义上看,写博客或许可以帮助我学习知识,内化想法,同时可以提升表达想法的能力。

我个人非常欣赏 Blog 这种“链接孤岛“的想法,同时也非常认同 open web 的愿景,觉得有价值的信息是应该被分享的,至少值得被记录下来。但是我不喜欢中心化的平台,更不用说 under sensorship 的那些,不喜欢被算法推荐的信息来源,我喜欢把数据自托管,所谓的 self-hosted。

另外还有一个原因,阅读确实会让人有表达的冲动。我从小就不擅长写文章,但我在初中时仍是写了几篇中短篇小说,高中时候也会在月考作文里写写短篇,偶尔还能拿高分,就是因为当时看了很多各式各样的小说,当时的我很有表达,模仿的欲望。而现在写文章能力已经大大退步了,所以写博客权当给自己练练手,希望我能坚持。

我会写些什么

我平时喜欢折腾软件,写写脚本(因为平时科研工作有太多重复作业了),喜欢打游戏,每天刷刷 RSS,听听播客,听音乐看剧。在日常冲浪中,任何我觉得有意思,有分享意义的东西,都可能会发布在这里。又也许会把之前的一些想法笔记整理出来,发在这里。

博客用了什么

本博客的文章用 Markdown 编写。 采用了开源方案 PyBoke 生成静态网站,自己在此基础上加了点其他功能,例如首页显示摘要,文章底部翻页,full text RSS 格式。使用的是 newcss 主题,再通过 GitHub Pages 和 Cloudflare Pages 发布。你也可以通过 1nan.pages.devyinan-c.github.io 访问。

本博客所有源 markdown 文件,以及模板开源,托管在 GitHub 上。

版权

本博客所有文章采用 CC BY 4.0 协议。您可以自由地:

  • 共享 - 在任何媒介以任何形式复制、发行本作品 在任何用途下,甚至商业目的。

  • 演绎 - 修改、转换或以本作品为基础进行创作 在任何用途下,甚至商业目的。

只要你遵守许可协议条款,许可人就无法收回你的这些权利。

惟须遵守下列条件:

  • 署名 - 您必须给出 适当的署名 ,提供指向本许可协议的链接,同时 标明是否(对原始作品)作了修改 。您可以用任何合理的方式来署名,但是不得以任何方式暗示许可人为您或您的使用背书。
  • 没有附加限制 - 您不得适用法律术语或者 技术措施 从而限制其他人做许可协议允许的事情。

如何只用一个 Escape 键退出 Raycast - Get the Best of Both Worlds with Raycast and Alfred

作者 Yinan
2024年4月15日 19:47

这篇文章主要想分享两件事,一是如何让 Raycast 能像 Alfred 一样只用一个 Escape 键退出搜索窗口,而不是每次摁一次只能一级一级得退出,二是如何利用 Deeplink 来同时使用 Raycast 和 Alfred, 发挥各自的优势。

TLDR

利用这个 Keyboard Maestro macro 实现在 Raycast 搜索窗口中 remap a single escape to multiple escape keys。

如果你还想听我唠叨

我不想讨论孰优孰劣,哪个是 mac 上最好用的 Launcher (LaunchBar:?),也并不希望任何一个产品被挤压到退市,并且市场上良性竞争促使产品进步是对消费者有益的。

在我的电脑上两个都装了(感谢最早让我深度体验 launcher 的 Raycast),但是目前为止还是主要在使用 Alfred,仅仅是因为能够一键呼出和退出搜索窗口,强大的 Universal Actions,更快地文件搜索和 Navigation(每次1对1老板都惊艳于我找文件的速度:D),并且我也写了几个 Alfred Workflow

但是 Raycast 也有很多优点,就比如同一个功能,eject disks, 我更偏向于 Raycast 的 hud 通知,而不是 Alfred 的系统通知(因为经常开着勿扰模式),另外比如 Show Desktop 这个 Raycast 内置插件,我并没有在 Alfred 社区找到合适的方案。如果你想要主要使用 Raycast,但也有这个烦恼, 那么你可以通过 Keyboard Maestro 设置一键退出 Raycast,如果你想要同时使用两个 Launcher,那么你可以利用 Deeplink 来实现。我会分别在下面两节讨论。

设置一键退出 Raycast

Raycast 有多级菜单,每次按 Escape 键只能退出一级,这是他们产品的特有设计,但确实大大减慢了我使用 Launcher 的速度。要实现一键退出多级菜单,Raycast 内置 Command + Escape 来回到主菜单,但是不会退出窗口(搜索完,还想让你继续搜索?),你仍然需要再次按下 escape 键才能退出。

之前用过 Keyboard Maestro 映射轻按 command + W 到 长按 command + W 来防止误关窗口,所以我想到了用 Keyboard Maestro 来实现映射一个 Escape 键到多个 Escape 键,关键问题在于如何识别 Raycast 的搜索窗口正在最前。好在已经有人在论坛上讨论过并且给出了解决方案,我稍微修改了一下,实现了 remap,下载地址在这儿

Deeplink: raycast:// 和 alfred:// 实现互相呼出

Raycast 和 Alfred 都支持 Deeplink,Raycast 中选中 command 摁下 Command + K,就可以看到 Copy Deeplink 的选项,然后你可以创建一个 Alfred Workflow 在打开这些 Raycast DeepLink 实现直接调用 Raycast command (并且整个过程 Raycast 窗口不会出现)

同样地,而如果你想要在 Raycast 或者 keyboard Maestro, Shortcuts 等其他地方调用 Alfred workflow,Alfred 提供了 External Actions 来实现通过 Deeplink 或者 AppleScript 调用 Alfred 的 workflow。在 Raycast 中设置 Quicklinks 打开这个 URL 即可以实现调用 Alfred Workflow。

划词制作 Anki 卡片

作者 Yinan
2024年3月30日 02:08

最近在研究背单词(奈何来英国几年了,才发现单词才是短板,惭愧),一方面我在尝试不同的背单词软件,另一方面也在折腾划词生成 Anki 卡片,来建立自己的生词库。

关于背单词软件,建议大家看少数派的这篇文章以及底下的评论,5 个维度、6 个 App,帮你选出最适合自己的「背单词神器」。或者可以网上找一些 Anki 卡片组,推荐两个制作精良的卡片组。

本文主要介绍如何用划词工具制作 Anki 卡片,模板教程主要是根据老黄老巢的教程基础上进行了一些修改。

达到的效果

最终在浏览器用 ODH 划词翻译之后选择恰当的意思,可以将当前句子(附带可点击的 URL)以及对应的英,中文意思(默认先显示英语释义,点击后显示中文释义)添加到 Anki 中,并且制成 Defination-Word 和 Word-Defination 两种卡片。

word-def def-word

需要的软件

配置 ODH

在此,我仅仅分享一下合适我的配置:

  • 我不需要全部的意思,只需要符合当前语境的意思,所以选择了 Consice 而不是 Glossary or Collins
  • 我需要中文在我点击的时候显示出来,所以我选择了 Collins EN-CN 字典
  • URL: 在我想看原文上下文的时候点击 Sentence 部分即可跳转
  • add-dw: 这一项不为0代表同时添加 Definition-Word 卡片

odh

具体每个配置的详细意思可以参考这篇博客,Antimoon 划词助手兼容模板 3.0 - 老黄老巢 或者项目的 GitHub 主页

修改卡片显示项目(可选)

上面提到我在老黄老巢的模板上进行了一些修改(比如把 glossary 改成 consice 只显示一种释义,比如增加 URL 和默认隐藏中文释义),主要是为了适应我的需求,你也可以根据你的使用习惯在 Card-type 中进行修改卡片模板。

Further Reading

Friends

作者 Yinan
2024年3月27日 00:30

暂时空空如也。

最近开始考虑增加友链,先准备从我订阅的 RSS 中发送一些申请。

如果你有兴趣,也欢迎发邮件

Avatars

作者 Yinan
2024年3月26日 23:00

我的 GitHub 和博客头像是这个,朋友都说跟我有点神似 :)

avatar

这其实是这个网站生成的 Notion 风格头像。

另外分享一个在刷推发现的 Ugly Avatar,我生成了这个用它作为我的 v2ex 账号头像。

ugly-avatar

Organizing /Applications folder in macOS

作者 Yinan
2024年3月15日 23:48

I struggle sometimes with hundreds of apps installed in my Applications folder.

For frequently-used apps, Alfred is my best friend. For most of the time, I can open the app I want within a few keystrokes.

But for other apps I use occationaly, it is hard to remember the name every time, so I can only skim through the Applications folder to find the app I need. But it's hard to get the functionality of each app just by looking through the icons and names, it is like find a needle in a haystack.

Although you can always group or sort the apps to help you find what you need, like the tip shown here to group them by default category, I still feel it's not enough for massive apps since the default categories are too broad.

So I decided to categorize them further myself, similar idea to how iOS does it in the App Library.

I came across this blog post by Jeff where he shared his way of categorizing the /Applications folder. As far as I appreciate the idea behind the post, there is some problems if you do exactly as he did as the time of writing.

The reason is Apple would not allow you move around stock apps(see picture below).

Even some third-party apps might not work properly if you move them. For example, applescript like the following would break if you move iTerm away from /Applications folder (This is the applescript that you can change default terminal to iTerm in Alfred's preferences):

on alfred_script(q) tell application "iTerm" activate tell current window create tab with default profile tell current session write text q end tell end tell end tell end alfred_script

Moreover, package installers(.pkg, not .dmg) would by default put the app to /Applications folder, and there might be problem if move them according to a comment in this post.

All this tells us it is better to leave as it is in the /Applications folder. So a good way to deal with this is to create a new folder and put the aliases of all the apps in the new folder. I use '~/Applications', and create alias are as simple as just dragging the apps to the new folder. An easy way to start - You can borrow the categories from the default categories groups using the tips here.

⌘ + J in the /Applications folder, group the apps by the default categories, and then move the apps in each group to different subfolders in the new folder. The groups might be too broad. Then you can start from there to modify the categories to your own preference.

Okay, now app alias are in different subfolders, we have the confidence to find the non-frequently-used apps more easily. But what if there is a new app installed? What if we want to remove an app? To keep the system running, an important thing is to keep the alias in the ~/Applications folder up-to-date.

For this, you can use Hazel or some automation tools (Automator, Keyboard Maestro, or other folder watcher) to script the process of creating alias and moving them to ~/Applications. Here is an example of how to do it with Hazel for the new app installed:

Now everytime there is a new app installed, Hazel will create an alias in the ~/Applications folder. Just like put it in app inbox, I can review the app and decide which category it belongs to or just toss it to keep the total number reasonable. Unfortunately, with Hazel, I don't find a good way to automatically remove the correspdonding alias when the app is removed. But I have made a keyboard maestro macro to do this, inspired by this post.

I did this because it bothers me sometimes, when I want to find a specific app but I forgot the name, and finding it without hierarchy is difficult. At the end of the day, you can always delete the apps you don't use to limit the number of apps. Then the flat structure of the /Applications folder is not a problem anymore.

If there aren't many apps at the first place or even there are that it does not bother you, there is no need to do this. Just as the saying goes, if it ain't broke, don't fix it.

推荐一些 macOS 应用

作者 Yinan
2024年3月15日 18:56

想写这个很久了,列表保持更新,括号内是我之前使用过的同类替代品。

  • Alfred(目前我最喜欢的应用,Raycast 也是一个非常好的免费替代品)
  • Keyboard Maestro(一个非常强大的自动化 App)
  • MacUpdater
  • Velja(浏览器选择器,付费的有 Openin
  • Popclip(对选中文本操作,有各种 extension,每天用它打开 URL, Google, searchlink, 添加到 Omnifocus 等)
  • SearchLink (不能严格算是一个 App,添加 markdown 中的 url 时很有用,我是和 Popclip 一起使用)
  • NetNewsWire (尝试过 Reeder,但我更喜欢 NNW)
  • DEVONthink, Zotero(文档和文献应用,Anybox 是一个不错的替代品)
  • Streaks app(习惯养成,保持我的日常运转)
  • OpenInTerminal-Lite 和 OpenInEditor-Lite(位于 Finder工具栏上的应用,可在终端中打开特定目录)
  • MagicQuitSwiftQuitQuitAllQuitter(自动关闭应用)
  • Wins.cool, Lasso, emmetapp, Moom(窗口管理,替代品可以是 Rectangle)
  • MonitorControl(单独控制不同显示器的亮度)
  • Karabiner Elements(对我来说是必不可少的 key-binding 应用,比如 shift 切换中英文,CAPS LOCK remap)
  • Input Source Pro, SwitchKey, ShowyEdge(根据应用自动切换输入法,在屏幕边缘显示当前输入法)
  • HomerowWooshy(用键盘代替鼠标操作)
  • HyperSwitchHyperDock(最近更新支持 Sonoma,App/Window Switcher,还有 Hotkeys, Alt-Tab 和 Manico, Raycast 也能给不同应用设置快捷键)
  • CodePiper(自动从短信中复制2FA)
  • Doll: A mac app to help monitor your app badges! (在菜单栏监控 Slack 和微信消息)
  • Dropover, dropzone, yoink(drag and drop stash)
  • Backup Status app
  • CommandQ 和 SlowerQuitApps(防止意外使用CommandQ,KM也可以写脚本做到这一点)
  • FinderMinder(固定 Finder 窗口大小)
  • Vitals, iStats Menus(菜单栏上显示不同 app CPU 使用率)
  • MediaMate(高颜值,显示当前播放歌曲)
  • Hazel(文件自动化)
  • Rapidmg (一键安装dmg,无需拖动弹出等操作)
  • Espanso(开源 Text expander)
  • Reflex(媒体键定向到 Spotify 和 Apple Music)
  • Onyx, HiDock(清理 mac,隐藏 Dock)
  • Subscriptions(订阅管理,可以和 App Store 联动)
  • BLEUnlock(通过 iPhone、Apple Watch 来锁定和解锁 Mac。)
  • ShortcutDetective(停更了,但仍然能用)
  • Sofa, FilmNoir, GameTrack(书影音记录)
  • ScreenFocus AppHazeover(使非聚焦的应用和显示器变暗)
  • CleanClip, PasteNow(剪贴板管理器,我也经常使用 Alfred)
  • DaisyDisk(分析磁盘空间)
  • Itsycal(小巧的菜单栏日历应用)
  • Later(暂时保存当前应用和会话)
  • MacWhisper(最佳音频转文字应用)
  • Marta(双面板 Finder 替代品,另有 QSpace 和 Forklift)
  • Omnivore(开源的稍后阅读)
  • Stempel(在右键菜单中以不同格式/预设来创建新文件)

以下是可以在 SetApp 中找到的应用,有些是订阅,大多数是一次性付费应用。

  • Airbuddy(iOS Airpods 体验)
  • Timing App
  • Bartender
  • BusyCal
  • Canary Mail
  • Cleanshot X(替代品 Shottr)
  • Focus and Session(专注)
  • Time Out(为了眼睛健康)
  • HookMark(链接一切)
  • HoudahSpot(全盘全文搜索,我更多用 Alfred、Devonthink 和 Foxtrot)
  • Mission Control Plus
  • Numi,Soulver(计算器)
  • OneSwitch(我经常用来清洁电脑,替代品:OnlySwitch, KeyboardCleanTool)
  • SnippetsLab
  • Swish(触控板窗口管理)

欢迎在评论中分享你的推荐。

❌
❌