MoreRSS

site iconGoidea | 槿呈修改

Leslie (aka L,.G.) ,INTJ,佛教徒、制作人。
请复制 RSS 到你的阅读器,或快速订阅到 :

Inoreader Feedly Follow Feedbin Local Reader

Goidea | 槿呈的 RSS 预览

一键发布 Newsletter:AppleScript 与 Quaily CLI 的完美配合

2025-03-06 16:38:00

Quaily 是一个新兴的、AI 驱动的现代化 Newsletter 服务,也是少有的由华人开发的产品。我初次了解这个平台是通过 Quaily 首席 Lyric 的一条推文,年代久远我就不去翻找了,大意是他比较了市面上的几个 Newsletter 平台后不甚满意,于是决定亲自开发一个。最初使用时,Quaily 的功能还不像现在这样完善,但其页面精美与时尚感就已经深深吸引了我。再加上听说 Lyric 本人也是位不折不扣的帅哥,对于一个「颜狗」来说,好看即正义!无脑冲呗。

事实证明,真正的帅哥魅力不仅来自外表,更在于能力与审美的完美结合。想想蒋丞、顾飞、江添、顾望……咳咳,言归正传。

Quaily 绝非徒有其表,而是拥有众多实用功能的专业工具。我并不想把这篇文章写成软文,具体功能介绍可以移步用户手册查看。下面,我将分享如何利用 AppleScript 实现一键发布的便捷操作。

为什么选择 AppleScript?

AppleScript 是 macOS 内置的自动化脚本语言,它使用户能够创建自动化工作流程,控制各种支持脚本的应用程序。选择 AppleScript 的优势在于:

  1. 无需安装额外软件,系统原生支持
  2. 与 macOS 系统深度集成,运行稳定
  3. 可以控制几乎所有支持脚本的 Mac 应用程序
  4. 可以直接让 AI 生成脚本,基本不需要修改就能使用(这一点尤为关键)

实现方式

区别于其他 Newsletter 服务,Quaily 提供了 Quail CLI 这款强大的命令行工具,可实现用户认证自动化、Markdown 文章管理以及用户详情获取等操作。它通过与 Quaily API 交互,让用户在命令行环境中完成各种操作,如登录、获取用户信息、文章的创建、更新、发布、取消发布和删除等,无需通过网页界面。这些功能为通过脚本实现自动化发布奠定了坚实基础。(具体使用说明请参见《介绍 Quail CLI:简化你的工作流》)。

注意:如果我们使用的是 Obsidian,可以直接使用 Quaily 官方提供的插件,无需自己编写脚本这么麻烦。

安装与配置 Quaily CLI

在构建自动化脚本之前,您需要先安装并配置 Quail CLI。安装过程十分简单,只需执行一条命令:

go install github.com/quailyquaily/quail-cli@latest

当然,前提是系统中已安装 Go 语言环境。或者您也可以直接从 GitHub 上安装 Quaily 官方编译好的二进制文件,截至 2025 年 3 月 6 日,二进制文件的版本号为 v.0.0.3。

安装完成后,需要进行登录认证。打开终端,执行 quail-cli login 命令,系统会启动 OAuth 流程完成 Quaily 身份验证。终端中会显示一个 URL,您需要访问该链接并授权应用程序访问您的账户。认证成功后,登录信息会保存在配置文件中(默认位于 $HOME/.config/quail-cli/config.yaml),今后操作就不再需要重复登录了。

配置文件包含您的认证信息和一些自定义设置,例如前置元数据映射等,这些设置能帮助您更好地适应自己的工作流程。比如,您可以自定义 frontmatter 中的键映射,将 featureImage 映射到 cover_image_url,使其更符合您的使用习惯。

AppleScript 基础与命令行交互

脚本的目标是实现一键发布到 Quaily,而 AppleScript 的关键优势在于它能执行 shell 命令,从而调用 Quail CLI。

在 AppleScript 中,执行 shell 命令通过 do shell script 命令实现。这个命令由 macOS 中的 Standard Additions 脚本扩展提供,让您可以在 AppleScript 中执行任何命令行工具。例如,要执行 ls /Applications/ 这样的简单命令,您可以这样写:do shell script "ls /Applications/"

需要注意的是,当 shell 命令包含空格或特殊字符时,必须正确引用这些字符。最简便的方法是使用 AppleScript 的 quoted form of 属性,它会返回一个安全的字符串形式,不受 shell 进一步解释的影响。例如:do shell script "ls " & quoted form of "/Library/Application Support/"

对于包含中文等非 ASCII 字符的文件路径或命令,正确设置环境变量至关重要。这能确保 UTF-8 编码的正确处理,避免乱码和路径识别错误,特别是在处理包含中文字符的 Markdown 文件或文件夹时。使用以下方式设置环境变量:

do shell script "export LC_ALL=en_US.UTF-8; export LANG=en_US.UTF-8; your_command_here"

这样,即使您的文件名或路径包含中文字符,AppleScript 也能正确处理而不会出现编码问题。

构建 AppleScript 脚本实现一键发布

现在就可以结合前面的知识,构建一个完整的 AppleScript 脚本,实现一键发布到 Quaily 了。这个脚本包括以下步骤:选择要发布的 Markdown 文件,使用 Quail CLI 上传并发布该文件。

首先,需要选择一个 Markdown 文件。这可以通过 AppleScript 的 choose file 命令实现:

set markdownFile to choose file with prompt "请选择要发布的 Markdown 文件:" of type {"md", "markdown"}

接下来,获取用户的列表(list)信息。为简便起见,可以在脚本中预设列表的 slug,或者通过对话框输入:

set listSlug to text returned of (display dialog "请输入要发布到的列表 slug:" default answer "your_list_slug")

然后,使用 Quaily CLI 的 post upsert 命令上传文件:

set uploadCommand to "export LC_ALL=en_US.UTF-8; export LANG=en_US.UTF-8; quail-cli post upsert " & quoted form of (POSIX path of markdownFile) & " -l " & quoted form of listSlug
set uploadResult to do shell script uploadCommand

上传成功后,Quaily CLI 会返回包含帖子信息的 JSON 响应,您可以从中提取 slug 信息:

-- 假设 uploadResult 是类似 {"status":"success","data":{"id":"12345","slug":"my-post-slug",...}} 的 JSON 字符串
-- 使用简单的文本处理来提取 slug
set slugExtractCommand to "echo " & quoted form of uploadResult & " | grep -o '\"slug\":\"[^\"]*\"' | cut -d\\" -f4"
set postSlug to do shell script slugExtractCommand

这段代码使用管道命令组合 grepcut 从 JSON 响应中提取 slug 值。grep -o 查找包含 "slug" 的部分,然后 cut 命令分割字符串并提取 slug 的实际值。

获取到 slug 后,继续使用 post publish 命令发布该帖子:

set publishCommand to "export LC_ALL=en_US.UTF-8; export LANG=en_US.UTF-8; quail-cli post publish -l " & quoted form of listSlug & " -p " & quoted form of postSlug
set publishResult to do shell script publishCommand

最后,显示操作结果:

display dialog "帖子已成功发布!" buttons {"确定"} default button "确定"

将这些步骤组合起来,您就拥有了一个实用的一键发布脚本。

高级优化与自动化技巧

为了进一步提升自动化流程的效率,可以考虑以下高级优化策略:

自动提取 Markdown 前置元数据(frontmatter)是一个非常实用的功能。通过 shell 命令如 grepsed,可以解析 Markdown 文件并提取其中的 slug 信息,无需手动输入:

set extractSlugCommand to "grep -m 1 'slug:' " & quoted form of (POSIX path of markdownFile) & " | sed 's/slug: *//' | tr -d '\r\n'"
set postSlug to do shell script extractSlugCommand

加入错误处理机制也很重要,确保脚本在各种情况下都能稳定运行。例如,检查文件是否存在,检查上传和发布过程中是否有错误等。使用 AppleScript 的 try...on error...end try 结构实现:

try
    -- 脚本主体
on error errorMessage
    display dialog "发生错误:" & errorMessage buttons {"确定"} default button "确定" with icon stop
end try

AppleScript 支持将脚本保存为独立应用程序,并可添加到 Dock 或设置键盘快捷键,实现真正的「一键」发布。创建应用程序的步骤很简单:在 Script Editor 中编写脚本,然后选择「文件」→「输出」,在格式中选择「应用程序」。

此外,如果需要在发布过程中加入其他步骤,如预处理 Markdown 文件、自动生成标签、上传图片等,都可以通过扩展脚本来实现。

结合实际工作流的应用场景

在实际的内容创作工作流中,一键发布脚本可以与其他工具和流程无缝集成。例如,将其与 Markdown 编辑器结合,当文章编辑完成后,直接点击按钮或使用快捷键触发发布。就像我使用的文本编辑器 BBEdit,内置了 AppleScript 管理功能,可通过快捷键直接触发脚本。

您还可以考虑与其他自动化工具结合,如 Hazel、Keyboard Maestro 或 macOS 自带的 Automator,构建更复杂的工作流。例如,当将新的 Markdown 文件放入指定文件夹时,自动触发发布流程;或设置定时任务,在特定时间自动发布预先准备好的内容。

通过这些集成和扩展,一键发布脚本可以成为一个强大的内容管理和发布解决方案,大幅提升工作效率。

结语

在本文中,我并未提供自己使用的完整脚本,而是希望帮助您理解如何使用 AppleScript 和 Quail CLI 实现一键发布,并鼓励您根据自身需求定制和扩展这个解决方案。通过自动化处理重复性任务,我们可以将更多时间和精力投入到创意和内容质量上,这正是技术为创作者带来的最大价值。

注:本文中的 API 端点和参数仅为示例,实际使用时请参考 Quaily 的官方文档


本文初稿在 Tana 上完成,这是一款通过将 AI 驱动的结构化数据库与流畅的大纲列表相结合的笔记软件,重新定义了现代知识管理,使用户能够无缝地组织相互关联的想法,同时保持自由形式思考的灵活性。

悼友文

2025-02-16 06:27:00

噫吁嗟!天不假年,奪我良友,何其痛哉!君之驟逝,如朝露之晞,春花之謝,令人扼腕,悲從中來。

君遊學燕京,北雁南歸之地,赫赫大學,名冠神州。學業有成,已獲碩士之約,前程似錦,未來可期。豈料天妒英才,遽爾長逝,豈不悲歟!

君之才也,如明珠在握,光耀四壁;君之志也,若鴻鵠高飛,志在千里。吾與君相交,透紙傳神,傾心之至。或談天下興衰,或究人生真諦,或探玄思妙理,無所不包。每與君論道,君之見解,獨到精闢,常令吾茅塞頓開,獲益良多。君之胸懷,寬廣如海,包容萬物;君之德行,高潔如松,傲立霜雪。吾常嘆曰:得友如此,夫復何求!

曾約他日,吾歸故土,當共舉杯,把盞言歡。誰知天不假年,此約成空,徒留遺憾!憶昔論交,恍如昨日。今君已去,音容宛在,而形骸已杳,追思往事,不勝唏噓。雖未曾一面之緣,然情深意重,兩心相契。今追思往昔,淚濕襟袖。

君之逝也,吾失一良友,世失一英才。哀此永訣,難以言表。願君安息,來生再晤!

嗚呼哀哉!尚饗!


本文初稿在 Tana 上完成,這是一款通過將 AI 驅動的結構化數據庫與流暢的大綱列表相結合的筆記軟件,重新定義了現代知識管理,使用户能夠無縫地組織相互關聯的想法,同時保持自由形式思考的靈活性。

电子报与博客

2025-02-11 20:19:00

自从开始写电子报,我逐渐发现一个困扰:长文写作的能力似乎在悄然流失,最直观的体现就是博客更新的频率越来越低。

电子报的写作节奏确实偏向短平快。尽管我始终以认真严谨的态度对待每一期内容,投入了大量私人时间,但回顾这些年的积累,能够真正沉淀下来的内容究竟有多少,我心中始终没有一个明确的答案。细看过往的电子报,不少内容过于注重时效性,而另一些议题本可以进行更深入的探讨,或者因为我自己的成长产生了新的认知。

我并不想让这种创作停留在浅层。特别是在电子报转向全面付费模式后,内容需要做出革新。

于是我开始思考一个根本性的问题:电子报的主线究竟是什么?要厘清这个问题,不能仅仅回顾已发布的内容,更要审视自己的笔记库,看看哪些领域的积累更为丰富、深入。经过几天的梳理,我确定了四条核心主线:

  1. 人文与科技的交汇
  2. 东西方哲学对现代生活的启示
  3. 美学素养、批判性思维如何塑造个体认知
  4. 个人成长与复利思维的结合

这四个方向是我长期以来持续关注并深入思考的领域。它们有着共同的指向:探讨「如何成为更好的自己」这个永恒命题。在这个探索过程中,人文精神与科学理性相辅相成,美学修养、信仰建构、批判性思维和独立思考缺一不可。

未来的电子报将以这四条主线为基础,展开更深层次的探讨。我深知电子报不应仅仅充当信息的搬运工,而应该成为孕育思想的发酵池。每一期内容都将围绕特定主线展开深入探讨,通过多维度的视角,为读者提供更具启发性的思考空间。

具体来说,Weekly Spark 的 Insight 和 Case Study(或 Mental Model)板块将围绕这四条主线交替展开,我会致力于将每个议题从不同维度深入探讨,直至达到一定的深度后再切换主线。与此同时,CETDE Fortnight 将成为 Weekly Spark 的有力补充。读者还可以通过我在 Are.na 建立的 Channel,了解我的内容筛选过程和思考轨迹,形成一个完整的知识探索生态。

至于博客,我并没有什么野心,只是希望它能兼具轻盈与厚重。一方面,保留生活随笔的趣味与温度;另一方面,着力那些经过长期酝酿、反复推敲的深度长文。那些深度内容或许需要数周乃至数月的时间来完成,但正是这样的沉淀过程,才能确保思考的深度与内容的价值。说到底,我是博客的第一位读者,因此博客的创作更多的是面向我自己,依然是「如何成为更好的自己」。

这次的反思带来的一个意外收获是,对于信息消费和笔记中的思考方向更加聚焦了。


本文初稿在 Tana 上完成,这是一款通过将 AI 驱动的结构化数据库与流畅的大纲列表相结合的笔记软件,重新定义了现代知识管理,使用户能够无缝地组织相互关联的想法,同时保持自由形式思考的灵活性。

本文的头脑风暴在 Heptabase 上完成,这是一个以卡片、白板和标签为基础,专注于帮助使用者更好地学习、思考、研究和规划,并以中观视角对摄取的信息、知识建立深度理解的可视化知识管理工具。

里斯本日记(二):邂逅塞图巴尔

2024-12-29 00:37:00

2024 年 12 月 27 日,我们选择在圣诞季的尾声探访 Setúbal——特茹河南岸最具分量的城市,也是里斯本大都会区的重要组成部分。

因为只打算走马观花式地转一转,所以我们选择午饭后搭乘火车前往。走去车站的路上,泽泽一如既往、兴致勃勃地踩着地上的落叶,仿佛为了补足童年里缺失的玩落叶的记忆。而我则想着:凋零,是不是也意味着新生?就如同阴阳,万物皆有其往复之道。无门慧开禅师在《颂平常心是道》中说:

春有百花秋有月,夏有凉风冬有雪。若无闲事挂心头,便是人间好时节。

如此大好的天色,就不想那么多了,享受当下最重要。

出发前惯例查看导航,虽然 Apple Map 和 Moovit 都建议在 Sete Rios 换乘 Fertagus 列车,但我坚持从 Roma-Areeiro 始发站登车。事实证明这个决定果然明智,我们不仅轻松找到座位,还能选择观景最佳的位置。待列车经过两站抵达 Sete Rios 时,车厢内早已座无虚席,新上车的乘客只能站着。

在 Roma-Areeiro 换乘时,遇到了一对要去 Sintra 的母女,看到我们在月台上刷公交卡,就试探性地问我们是不是一定要在月台上 check-in,她们以为上车后有专人检票。用英语和她们说了在里斯本乘坐公共交通的规则后,才听到母女在用华语交流。我的一句「原来你们也说华语」,瞬间拉近了距离,话匣子随之打开。(之所以使用「华语」而非「汉语」是因为掺杂了大量的英语词汇。)

Fertagus 列车是上下双层的,为了更方便地看风景,我们去了二层。上楼梯的时候,我在脑子里迅速地过了一遍沿途可以看到的地标景点和列车运行的方向,为泽泽挑选了最佳观景位置。坐下后,迅速地打开地图看了一眼,确认没有错,就很炫耀地和泽泽说他等会儿可以看到什么什么。泽泽一脸震惊,「你到底是怎么记住方向和地图的?」

第一次去特茹河南岸,泽泽和我都显得有些兴奋,有点像小时候玩儿帝国时代探索地图发现了矿产、村落。列车行经 Ponte 25 de Abril(四月二十五日大桥) 时,第一次俯瞰里斯本的老城和海港,恍若穿越时空,与这座城市的过往不期而遇。

列车缓缓驶入特茹河南岸,窗外的景致徐徐展开:错落有致的社区、静谧的农场、质朴的村落接连掠过。我不禁用葡语感叹:"Gosto de estar aqui"(我喜欢这里)。泽泽也深有同感,附和道:"Sim, sim, também gosto de cá estar"(是的,我也喜欢在这里)。这里少了里斯本市区的喧嚣与拥挤,多了几分悠然与舒适。虽然尚未真正体验这里的生活,我们却已不约而同地畅想起在此置业的可能。

约莫一小时后,列车驶入终点站。午后的阳光格外灿烂,我们都忘记拿墨镜,只得寻找着遮阳的街道前行。漫步间,一副雕刻着双龙的店面装饰突然映入眼帘。走近细看,原来是一家颇具港式风味的中餐厅,门口的餐牌价格比里斯本市区亲民许多。我们在店前驻足观望时,热情的老板娘随即迎了出来,当得知我们路过时被熟悉的中式装潢吸引,她脸上的笑意更深了几分。

不远处传来的欢声笑语牵引着我们的脚步。循声而去,孩子们正在公园一角尽情嬉戏——有的在秋千上荡出欢乐的弧线,有的沉浸在捉迷藏的游戏里,还有的在追逐着足球奔跑。

池塘中,喷泉的水柱在阳光下折射出晶莹的光芒,野鸭和鸳鸯悠然自得地划过水面,岸边的鸽群则静静地享受着午后时光。

在铺满落叶的草地上,一位年轻人悠然地倚靠在雕塑上,耳机里流淌的音乐似乎让他沉浸在专属的时空里。午后的阳光慷慨地挥洒,为这个画面镀上一层温暖的金色。这一刻,时光仿佛凝固,却又在微风中轻轻流动,构成了一幅完美的「都市闲情图」。在动与静的交织中,平凡的生活场景也变得诗意起来。我情不自禁地举起相机,试图将这份难得的惬意永远定格在镜头里。

漫步至一条安静的小巷,高大的树木列队一侧,枝干虬劲,阳光穿过树梢,在落叶与石板之间跳跃。古朴的石板路面纹理清晰,黄叶点缀其上,在阳光的斜照下,每一片落叶都仿若被镀上了一层金边。树影婆娑,光影交错,为这个冬日增添了几分诗意与温度。这样的场景,让我们不由得放慢脚步,感受季节更迭带来的静谧之美,再次由衷感叹:"Gostamos de estar aqui"(我们喜欢这里)。

塞图巴尔的城市肌理中处处渗透着海洋的气息。从消波块造型的街头雕塑,到公园绿地上巨大的船锚,再到建筑上甲板造型的飞檐,每一处细节都在映射着这座城市与大海的深厚渊源。这些符号不仅是装饰,更是一代代塞图巴尔人与海洋共生的见证。

在码头边,垂钓者们静静地守候在海边,构成了一幅生动的生活画卷。冬日的暖阳下,他们娴熟地操控着鱼竿,脸上的皱纹和粗糙的双手无声地记录着与海为伴的人生。

城市的艺术气息同样浸润着海洋元素。街边的墙面被艺术家们装点成富有想象力的海底世界:绿色的底色上波浪翻涌,流动的色彩犹如是海洋在城市中的延伸。一艘被创意性安置在房顶的旧渔船,虽已不再远航,却依然默默低语着渔民的故事。

沿海一带的餐厅完美融合了海洋特色,"Mezé"、"Azul Mar" 等特色餐馆的招牌在阳光下熠熠生辉。随风轻摆的遮阳伞,混合着咸咸的海风,营造出浓郁的海港氛围。

在塞图巴尔,海洋不仅是地理概念,更像是一种精神寄托。城市中的每一处细节,都在彰显着一个关于大海的记忆。

遍布的教堂,是塞图巴尔的另一个特色。在这座海滨城市的街道间,哥特式的尖顶与曼努埃尔风格的立面交相辉映,传递着几个世纪以来的信仰传承。其中,Convento de Jesus(耶稣修道院)是当地历史最悠久的教堂之一,也是欧洲七大濒危古迹之一。这座建于 15 世纪末的修道院,以其别具一格的建筑风格在葡萄牙建筑史上留下了浓墨重彩的一笔,被誉为曼努埃尔风格的开山之作。

走进修道院,时光仿佛倒流。墙壁上精美的蓝白 azulejo 瓷砖,以其特有的细腻笔触,生动地描绘着圣母马利亚的生平场景。拱形的穹顶向上延伸,好似要触及天堂;而斑驳的石柱则默默见证着世俗的沧桑。

1755 年,那场改变葡萄牙历史进程的里斯本大地震,也让这座教堂饱受创伤。地震、海啸和随之而来的大火,让许多建筑在一夜之间化为废墟。然而,Convento de Jesus 虽受重创却依然屹立,见证着这片土地上的沧海桑田。

我们坐在古朴的长椅上,闭上眼睛,耳畔回荡着空灵的颂歌。阳光透过彩绘玻璃窗洒落,在地面上投射出斑斓的光影,为这份宁静增添了几分神圣。在这里,恍若可以暂时逃离现代生活的喧嚣,找回内心深处那份久违的平和。

离教堂不远处的 Chafariz da Praça Teófilo Braga(泰奥菲洛·布拉加广场喷泉)为历史悠久的城市增添了一抹优雅。这座始建于 1697 年的喷泉,见证了塞图巴尔三个世纪的变迁。我们坐在广场的长椅上休息时,恰逢下午 16 时整,教堂的钟声、喷泉潺潺的水声、远处海港的汽轮声交织在一起,编织成一首城市交响曲。在那一刻我能感受到时光的脉动。

在欣赏城市建筑时,我注意到一个细节:许多建筑物上都装饰着浑天仪的图案。这让我想起葡萄牙的国旗,它是全世界唯一一面绘制有浑天仪的国旗。这个独特的符号,不仅彰显着葡萄牙辉煌的航海史,也象征着这个国家对探索与进取的不懈追求。从大航海时代至今,浑天仪始终是葡萄牙人心中那份对未知世界的好奇与敬畏的完美写照。在塞图巴尔的街头,宗教建筑的庄严与航海文明的印记相互交融,共同诉说着这座城市的过往与未来。

返回里斯本时,我们选择搭乘 CP 列车前往 Barreiro,再乘坐轮渡返回 Baixa。这样的安排,让我们终于完成了一个小小的成就——体验了里斯本都会区所有类型的公共交通工具。

渡轮缓缓驶入特茹河与大西洋的交汇处,泽泽推开舷窗,混合着烤栗子香气的海风涌入船舱,让我想起「法朵女王」Amália Rodrigues 那首著名的 Cheira a Lisboa

在这首歌里,她用温柔的嗓音描绘着里斯本的每一种气息:清晨的第一班电车与河边渔民的木屐声交织;雨后的泥土芳香仿佛应许之地;隐秘小巷中酒馆里飘散的美食与葡萄酒的香气;阁楼上盛开的康乃馨,花园中绽放的玫瑰;码头上高耸的船帆,执着穿行的鱼贩;罗西奥广场咖啡馆的醇香;寒冷时节烤栗子的温暖气息;盛夏时节成熟水果的甜美……

Lisboa já tem Sol mas cheira a Lua Quando nasce a madrugada sorrateira E o primeiro elétrico da rua Faz coro com as chinelas da Ribeira

Um craveiro numa água furtada Cheira bem, cheira a Lisboa Uma rosa a florir na tapada Cheira bem, cheira a Lisboa

Lisboa cheira aos cafés do Rossio E o fado cheira sempre a solidão Cheira a castanha assada se está frio Cheira a fruta madura quando é verão

A fragata que se ergue na proa A varina que teima em passar Cheiram bem porque são de Lisboa Lisboa tem cheiro de flores e de mar

此刻被暮色笼罩的里斯本,正如歌中所唱:"Lisboa tem cheiro de flores e de mar"——这座城市永远带着花朵与大海的芬芳,在每个季节里散发着独特的魅力。

Say Goodbye to 2024

2024-12-23 22:13:00

When I stand at the end of 2024 and look back on this year, what will I say to myself? This question has been occupying my thoughts lately, and after much reflection, one truth resonates deeply:

The meaning of life isn't found solely in pursuing grand ideals, but also in embracing the beauty of our ordinary, everyday existence.

This year has been transformative for me, for Jayz, and for our family. Through our experiences, we've come to understand a shared truth: while we may not have the power to change everything around us, we do have the ability to choose how we live in the present moment. It's about making meaningful choices within the circumstances we're given.

Immigration

In September, Jayz and I moved to Lisbon, leaving our parents behind to start a new chapter of our lives. While the transition hasn't been without its challenges, we've gradually adapted to our new home.

Life in this historic city has surprised me – it's remarkably similar to China in terms of lifestyle and dietary structure. The main difference lies in the sense of freedom and openness here. As long as you respect the law and local customs, there's a genuine space for personal expression and choices.

This geographical distance has given me a new lens through which to view China – its politics, society, and human nature. I've always disliked politics, believing it shouldn't dominate our daily consciousness. Yet, despite having relocated, Jayz and I find ourselves keeping a mindful eye on our homeland's situation, primarily because our parents continue to live there. This connection keeps us anchored to a reality we'd prefer to distance ourselves from, yet cannot fully ignore. This lingering necessity to stay informed deeply unsettles me, and I look forward to the day when such concerns no longer cast a shadow over our new life.

Learning Portuguese has proved more challenging than my experience with English. The language's complex verb conjugations and mood systems present a unique set of challenges. Perhaps the biggest hurdle is keeping up with local speech patterns – Lisbon natives speak quickly, and Portuguese words tend to flow together. Without a solid foundation in grammar and vocabulary, following conversations can feel like quite a task.

Fortunately, the Portuguese people have shown incredible patience and kindness. They often adjust their speaking pace or switch to English to help bridge the communication gap. What's particularly striking is that I've never encountered any discrimination – whether related to language or otherwise – since arriving here.

My Portuguese is now approaching A2 level, and I'm looking forward to improving further in the coming year.

Change

The most significant change in my life this year has been a deliberate shift in my information consumption habits, a transition I began in early 2024. This explains why I haven't published my usual blog posts about recommended information sources this year.

This decision emerged from my experience using Perplexity for research, which revealed concerning levels of information distortion, particularly in humanities-related content. While I understand the underlying political motivations for controlling public discourse to maintain stability, this approach essentially creates an isolated information silo.

I'm not suggesting that English-language sources are inherently more reliable or authentic. However, I've found that they generally align more closely with my observed reality and lived experiences.

Chinese characters hold a special place in my heart – they embody the spirit and wisdom of a civilisation spanning millennia. It's disheartening to see how these beautiful characters, which should serve as vessels of knowledge and cultural heritage, are sometimes misused to shape narratives that diverge from truth.

Another significant shift this year has been in my approach to understanding the world around me. While I had intellectually grasped the importance of prioritising lived experience over grand narratives years ago, 2024 was when I truly put this principle into practice.

Take, for instance, my approach to understanding economic realities. Rather than relying solely on published statistics, I've learnt to trust my direct observations of price changes and daily economic patterns. When evaluating the cost of living, my personal experience at local markets and shops has become more valuable than abstract economic indicators.

This shift in perspective has, at times, left me feeling somewhat disconnected from mainstream discussions. For a period, I questioned whether I was falling victim to observer bias or confirmation bias – seeing only what I wanted to see. However, conversations with several experienced individuals who have witnessed similar patterns over the years helped validate my observations. Their insights confirmed that my perceptions weren't merely personal biases but reflected genuine patterns in our changing world.

Since October, I've made another intentional change: taking my notes in English and Portuguese rather than Chinese. This practice has proved invaluable, as it encourages me to think through different cultural lenses. It's not just about language acquisition; it's about understanding different ways of structuring thoughts and perceiving the world.

However, as mentioned earlier about my deep connection with Chinese characters, I still maintain Chinese as my primary language for notes related to Chinese culture and society. Some concepts and nuances are simply untranslatable – they carry layers of cultural and historical meaning that can only be fully expressed through Chinese characters. This selective multilingual approach to note-taking has become an unexpected tool for both broadening my perspective and preserving the depth of cultural understanding where it matters most.

Creating

This year has seen a noticeable decrease in my blog posts and newsletter frequency compared to 2023. This shift stems from two main factors: a natural ebb in my desire for expression, and a growing awareness of the responsibility that comes with sharing ideas. I've come to realise that publishing thoughts before they're fully developed risks spreading incomplete or potentially misleading information.

A significant example of this concerns LifeOS, my attempted comprehensive personal management system that encompassed knowledge, information, and document management. Many readers have requested more detailed content about this system, specifically asking for manual-like instructions. However, I've come to realise that LifeOS, despite its ambitious scope, became too cumbersome in practice and ultimately strayed from its original purpose.

In light of these reflections, I would encourage readers to shift their attention to the CETDE framework – a model I've previously written about extensively. Compared to LifeOS, CETDE offers a more focused and practical approach to personal knowledge management, while maintaining the philosophical depth that initially inspired these systems.

This experience has taught me valuable lessons about content creation. It has led me to adopt a more measured approach to writing, ensuring that what I share is not only well-thought-out but also practically valuable to readers. Sometimes, simplicity and applicability are more important than comprehensive complexity.

Since April, I've immersed myself in the study of AI aesthetics, seeking to position myself at the intersection of technology and humanities. AI has become a crucial component in my workflow, and this deep integration has led me beyond viewing it as merely humanity's latest technological achievement. This daily interaction has sparked new questions: Can humans create beauty through AI? Can AI itself generate aesthetic value? And more profoundly, can AI contribute to enriching our humanistic values? While I haven't published blog posts on AI aesthetics after May, the insights gained from exploring these questions have subtly influenced my perspective and writing across various topics.

Looking ahead to 2025, I plan to focus more intensively on the intersection of technology and humanities, exploring how these seemingly distinct domains can enrich and inform each other. This exploration will likely shape both my personal growth and my future writing.

Prospect

As I prepare to step into 2025, my path forward is becoming clearer. The experiences and changes of 2024 have laid a foundation for what I hope to achieve in the coming year.

My focus will centre on three main areas. First, deepening my integration into Portuguese life and culture. While I've made progress with the language, reaching A2 level is just the beginning. I aim to achieve B1 proficiency by the end of 2025, which will allow me to engage more meaningfully with local communities and better understand the nuances of Portuguese culture.

Second, I plan to explore more deeply the intersection of technology and humanities. My studies in AI aesthetics have opened new perspectives on how technology can enhance rather than diminish our human experience. This exploration isn't just about understanding AI's capabilities; it's about discovering how technology can contribute to our cultural and spiritual enrichment.

Lastly, I want to return to more regular writing, but with a renewed purpose. Rather than feeling pressured to maintain a strict publishing schedule, I'll focus on sharing insights that emerge naturally from my experiences and studies. Quality and depth will take precedence over quantity, as I believe this approach better serves both my readers and my own growth.

These goals aren't just items on a to-do list; they represent a continuation of the journey I've begun this year – one that embraces both change and continuity, technology and humanity, personal growth and community connection. As I wrote at the beginning of this reflection, life's meaning lies not just in grand pursuits, but in finding beauty in our daily existence. This will remain my guiding principle as I move forward.

How I computer in 2024

2024-12-14 06:18:00

I've always been curious about how people use their computers. For instance, I browse forums to learn which applications others choose, ask friends about their productivity setups, and pay attention to what products, computers, and mobile apps people showcase on social media. Over the years, I've learned many great practices from others, so at this year's end, I want to organize my digital toolbox and share it. Although I've already listed my hardware devices and commonly used software on my blog's Uses page.

Return to Native Apps

In an era where tools like Cursor claim to enable rapid app development, I've chosen what seems like a counter-trend path—returning to native applications. This decision wasn't made on a whim but rather based on long-term self-observation and careful consideration: if system-provided apps can meet my needs, I no longer seek third-party alternatives.

The convenience brought by this transition has exceeded expectations. For example, the built-in OCR functionality in iOS Camera and Photos apps makes document scanning and text extraction effortless and natural. The deep integration between system-level calendar and reminders enables more efficient time and task management. Meanwhile, Apple Notes not only ensures sensitive information security through end-to-end encryption but also impresses with its performance in document scanning and team collaboration scenarios.

In practice, I've found that Apple's native app ecosystem can elegantly cover most aspects of daily digital life. From map navigation to weather information, from file previews to instant messaging, these basic but essential needs are well met. This integrated convenience is particularly noticeable on mobile devices, bringing an unprecedented smooth experience to daily use.

Returning to native apps has brought other significant advantages. First is improved performance and stability, as native apps typically better adapt to the system and consume fewer system resources. Second is enhanced privacy protection, eliminating concerns about third-party apps collecting and using data. Finally, it reduces maintenance costs, eliminating the need for frequent updates and debugging of various third-party apps while also reducing subscription expenses.

For scenarios that genuinely require third-party apps, I've begun prioritizing applications that support Apple Native design standards. These apps not only maintain consistency with the system in interface and interaction but also better utilize system features such as deep AppleScript integration, Shortcuts automation support, Live Activities, Focus mode, and other functionalities, providing a more unified and fluid user experience.

Of course, this return doesn't mean completely abandoning third-party apps. For specific professional needs, excellent third-party applications remain indispensable supplements. The key lies in finding the balance between native apps and third-party tools, allowing them to fulfill their respective roles, work together, and collectively build an efficient and unified operating environment.

Privacy and Security

In this era of rampant phishing and cyber fraud, personal privacy and cybersecurity have become crucial issues that no one can ignore. Every web browsing session and application usage can leave digital footprints. Therefore, building a comprehensive privacy protection system has become particularly important. In my practice, this system primarily revolves around three core components: DNS-level protection, content filtering, and credential management.

The choice of DNS service is the first line of defense in protecting personal privacy. While in China, I chose to use the open-source EasyMosdns DNS-over-HTTPS (DoH) service within the Surge environment. This solution protects user privacy through IP-based encrypted DNS queries, offering not only highly accurate DNS resolution but also effective protection against DNS poisoning. After moving to Lisbon, I switched to NextDNS service. While its query response time may be marginally slower than Cloudflare Public DNS, this slight latency difference is hardly noticeable, and the comprehensive privacy protection features it offers far outweigh this minor trade-off. NextDNS's rich configuration options allow me to block tracking scripts at the source while effectively filtering advertisements. The free tier of 300,000 queries per month is quite generous for individual users, and the premium plan at just €1.99/month offers exceptional value.

To build a more comprehensive protection network, I installed the Wipr 2 content blocker extension on Safari for both desktop and mobile devices. This lightweight tool not only effectively blocks advertisements but also filters various tracking scripts and malicious code, creating a dual-layer protection system alongside the DNS-level defense. This combination not only enhances the browsing experience but, more importantly, ensures personal data isn't arbitrarily collected.

In the realm of credential security, I've adopted a dual strategy using Bitwarden and Ente Auth. Bitwarden serves as my primary password manager, earning my trust over many years with its open-source nature and robust encryption implementation. Although it supports self-hosting, considering security implications and maintenance overhead, and given my lack of confidence in my technical abilities, I opted for the official cloud service at $10 per year. This not only allows me to securely access my credential vault across various devices but, more importantly, enables advanced features including multi-factor authentication (MFA). Notably, Bitwarden's integration with Fastmail allows me to generate disposable email addresses for various website registrations, playing a crucial role in protecting personal privacy and preventing spam.

While I use Bitwarden for most MFA needs, I chose Ente Auth to manage certain special authentication requirements. For example, Bitwarden account's own MFA tokens and second-factor authentication for other critical services. Ente Auth's unique next-token preview feature brings great convenience in practical use, making multi-factor authentication no longer a cumbersome process. Both tools embrace open-source principles with fully transparent codebases, not only ensuring security through public scrutiny but fundamentally guaranteeing user data privacy.

Productivity Tools

2024 marked a year of breaking through established perceptions in my choice of digital tools. This breakthrough is reflected not only in tool selection but also in the transformation of usage concepts. From note management to writing tools, from information acquisition to automated workflows, each choice was thoroughly considered, ultimately forming a highly efficient collaborative system.

In terms of note-taking tools, I completed the transition from Heptabase to Tana. As a note-taking tool that combines the bidirectional linking flexibility of Roam Research with the structured database capabilities of Notion, Tana has fundamentally redefined my approach to knowledge management. It not only supports traditional outline-style hierarchical recording but also enables structured data management through SuperTags. Its powerful search node functionality ensures convenient and precise content retrieval. Tana's AI integration particularly impressed me, especially its voice-to-text feature, which makes capturing insights remarkably easy—when ideas flash through my mind, I can simply record them via phone, and Tana AI automatically converts them into structured text.

Although I detailed the collaborative workflow between Tana and Heptabase in July this year, a method that continues to spark my creativity, my deeper usage of Tana revealed that it could fully assume Heptabase's role in deep understanding. This unexpected realization led to my gradually reduced dependence on Heptabase. Nevertheless, I still deeply admire Heptabase's design philosophy and hope for its continued development.

In writing tools, this year's biggest surprise came from discovering BBEdit, a text editor older than myself. This seemingly plain tool provided me with unprecedented "aha moments." Its value lies not only in its powerful text processing capabilities but also in its deep integration with macOS. Through AppleScript, I automated the complete workflow from article drafting to publishing: including processing Markdown metadata, changing file names, moving file locations, and pushing to GitHub repositories through git commands. It maintains smooth performance when handling large text files, an advantage many modern editors struggle to match.

Using BBEdit not only improved my writing efficiency but unexpectedly prompted me to explore advanced features of Raycast and DEVONthink. Raycast, as a macOS efficiency tool, enables one-click access to frequently used folders and applications through its QuickLink feature. More importantly, using its Script Command functionality, I developed several automation scripts, including creating file Deep Links, enabling one-way linking between local files and Tana, upgrading my local file management approach. Meanwhile, DEVONthink, another long-standing software, plays an increasingly important role in my workflow through its deep integration with AppleScript and seamless cooperation with BBEdit.

Regarding AI assistance tools, Perplexity and Kagi have performed to my satisfaction. The Pro version of Perplexity not only offers more powerful AI model choices, but its real-time internet search capability also makes information retrieval highly efficient and precise. It has played an unexpected role in my life abroad—for instance, while shopping in Lisbon supermarkets, I often photograph products and ask Perplexity about Portuguese product information, helping me make purchase decisions and greatly improving my shopping experience.

Before using Kagi, I never considered paying for a search engine, but the actual experience completely changed this perspective. It not only provides clean, ad-free search results, but its Universal Summarizer feature has saved me considerable time when browsing news and long articles. Features like Kagi Bangs and Kagi Lens significantly improve information retrieval accuracy, while its consistently high-quality and objective search results are particularly valuable in today's internet environment saturated with SEO-optimized content.

Communication and Reading

This year's choices in communication and reading continue last year's focus on practicality.

For email services, after thorough comparison, I ultimately chose to continue using Fastmail rather than migrating to Tuta. This decision stems from rational consideration of practical usage scenarios: while Tuta is known for its robust security, this advantage is often difficult to fully utilize in today's email communication environment, especially when most communication partners still use mainstream services like Gmail. In comparison, while Fastmail may not match Tuta's security level, it still far exceeds mainstream email service providers in security while offering significant practical advantages. It supports creating up to 600 anonymous email addresses, which, combined with Bitwarden integration, provides great convenience in managing registrations for various websites and applications. More importantly, it seamlessly integrates with Apple Calendar and Apple Notes, making schedule management and work log synchronization much easier.

For bookmark management, I chose the retro yet sufficient Pinboard. The key to this choice lies in its open API interface, allowing perfect integration into my workflow: whether syncing with DEVONthink through AppleScript or connecting Tana and Telegram channels via N8N, data transfer flows smoothly. Considering the practical value of its full-text archiving and retrieval features, I didn't hesitate to subscribe to the complete version.

For reading tools, Readwise Reader remains my platform of choice. Although the emerging RSS reader Follow shows promising potential, considering its stability is still being refined, I currently use it only as a supplementary information source.

Driven by multilingual reading needs, I finally purchased Bob Translate, a text translation tool that I wish I'd discovered sooner. By configuring free DeepL API and Groq's large language model, it provides fast, accurate, and elegant translation services. For more professional translation scenarios, I use Immersive Translate as a supplement. Interestingly, my reading habits have evolved significantly with the change in language environment: while in China, I was accustomed to reading in Chinese-English parallel texts, but after moving to Lisbon, I prefer reading English texts directly, using Bob for word translation only when encountering difficult phrases. Perhaps this transformation reflects not only the natural improvement in language ability but also the important role of tools in adaptive learning.

Storage and Backup

Data storage security and reliable backup remain essential fundamental needs. Although I detailed my specific data storage and backup strategies in Newsletter #92, here I want to focus on sharing the deeper considerations behind choosing these services and how they work together to form a complete data protection system.

As an Apple ecosystem user, iCloud provides me with unparalleled inter-device connectivity. This advantage is particularly prominent in family scenarios—since family members also use Apple devices, through iCloud+'s family sharing feature, we can easily achieve sharing and synchronization of photos, documents, and other data. This seamless collaborative experience is difficult to match on other platforms and is a key reason why I continue to stick with the Apple ecosystem.

However, iCloud's weakness in external sharing prompted me to seek a traditional cloud storage service as a complement. Considering actual usage scenarios, I spent two weeks intensively evaluating European cloud storage providers, thoroughly comparing Mega, pCloud, Internxt, Koofr, and icedrive among others. Eventually, German-based Filen stood out with its excellent overall performance. This secure cloud storage service, which employs zero-knowledge end-to-end encryption technology, maintains satisfactory transfer speeds while ensuring high-strength encryption. More remarkably, it sets no limits on file version numbers and transfer bandwidth, making it an ideal file sharing tool.

Filen's value extends beyond file sharing; it's also a reliable backup for important data. Its desktop client offers flexible file synchronization options, completing data backup tasks silently in the background. This seamless backup mechanism greatly reduces the mental load of daily use. However, even though Filen's security is commendable, when backing up important data, I still use encryption tools to encrypt the data before backup.

For building an off-site disaster recovery backup solution, I chose the professional BorgBase service. This choice was based on several key considerations: first, BorgBase is a service specifically designed for Borg backup, perfectly supporting incremental backup and deduplication features, ensuring complete backup history while effectively saving storage space; second, it provides an intuitive web interface for backup status monitoring, equipped with open-source desktop GUI for operations, and supports SSH key authentication to ensure security; finally, BorgBase's servers deployed across multiple European locations provide me with quality access speeds and low network latency. These professional features make it more suitable as an off-site disaster recovery backup solution compared to ordinary object storage services.

These three layers of protection—iCloud for daily synchronization, Filen for secure sharing and backup, and BorgBase for professional archival storage—form a comprehensive data security assurance system. iCloud handles daily device synchronization and family sharing, Filen takes care of file sharing and routine backup tasks, while BorgBase serves as the final security line, ensuring complete data recovery in extreme situations. Additionally, there's cold backup on external hard drives (though my backup frequency this year hasn't been as high, needing improvement next year). This multi-layered backup strategy not only provides sufficient data redundancy but also meets usage needs in different scenarios, providing peace of mind.

Setapp

When facing multiple software subscription renewals mid-year, I discovered that most of these applications were available in Setapp's library. After recalculating the costs, subscribing to Setapp's basic package became a natural choice.

Currently, the applications I use through Setapp cover multiple areas including system maintenance, productivity enhancement, media processing, document handling, and AI enhancement. For system maintenance, CleanMyMac and AIDente Pro handle system cleaning and battery management respectively; for productivity tools, CleanShot X, Yoink, and PopClip greatly simplify daily operations; in media processing, Downie and Permute provide comprehensive download and format conversion solutions; for document processing, Marked perfectly complements BBEdit, providing real-time document rendering preview; while in AI enhancement, Superwhisper and BoltAI offer various conveniences.

Self-hosted

As life in Lisbon has gradually stabilized, my self-hosting needs have changed significantly. No longer requiring a 24/7 Surge environment or worrying about IP issues for using AI platforms and payment platforms, I've been able to substantially streamline my server configuration: currently maintaining only one Hetzner VPS managed through Zeabur, plus one Oracle free VPS. This simplification not only reduces maintenance costs but allows me to focus attention on truly important services.

On these servers, my self-hosted projects mainly include:

  • TiddlyWiki as my Digital Garden, displaying public notes
  • RSSHub and WeWe RSS responsible for building personalized feed sources
  • Telegram RSSbot for receiving important instant information
  • Ladder for bypassing paywall restrictions
  • N8N handling various automation processes including content aggregation, data transformation, and scheduled tasks
  • Uptime Kuma for real-time monitoring
  • Twikoo providing a lightweight comment system for the blog
  • R2 Uploader for graphical management of Cloudflare R2

My philosophy for deploying self-hosted services is: lightweight, automated, and reliable. The goal is to provide stable and reliable functional support while minimizing maintenance costs.

Conclusion

Looking back at my digital tool choices for 2024, I clearly see several main trends: first is the return to native applications; second is the continued emphasis on privacy and security; third is the deep integration between tools, weaving independent tools into an organic whole through automation means like AppleScript and Shortcuts.

I hope to continue following this rational and practical approach next year. The focus isn't on how many tools one has, but on how to make existing tools better serve actual needs and create real value. Meanwhile, I also look forward to exploring more possibilities for improving efficiency while maintaining the stability of existing workflows.