剪贴板规范化器
Clipboard Normalizer

原始链接: https://www.jefftk.com/p/clipboard-normalizer-in-mac-app-store

作者将早期的剪贴板规范化脚本制作成一款免费的 Mac App Store 菜单栏应用。它会移除不受支持的格式,同时保留语义内容;将富文本与 Markdown 相互转换;并显示简短通知,说明执行的操作或解释为何无法转换。 大部分开发工作由 Claude 完成。它用 SwiftSoup 替换了基于 GPL 许可证的 Pandoc 依赖,添加了 Swift 封装,将原本独立的格式规范化和 Markdown 转换应用合并,并创建了统一界面。Claude 还协助添加针对 XSS 和异常格式的测试、修复边界情况,并指导完成 App Store 提交流程。该应用首次审核未通过,因为作者没有采纳 Claude 提供的演示视频建议;补充视频后,应用获批。

Hacker News 用户讨论了 **Clipboard Normalizer**,这是一款 Mac 应用,可以将复制的 Markdown 转换为纯文本或其他格式,可能是为了提供一个符合 App Store 要求、可替代 GPL 许可 Pandoc 的工具。 一些 commenters 表示,他们会将内容粘贴到浏览器地址栏作为快速转成纯文本的方法,然后再复制一次并返回应用。也有人建议使用应用特有的快捷键,例如 **Ctrl+Shift+V** 或 **Cmd+Shift+V**,但其可用性和行为会有所不同;Outlook 和 Teams 还可能把粘贴的 URL 转换成以页面标题为文本的超链接。有人提到了 Alfred 工作流,以及 `pbpaste` 等可用于文本转换的命令行工具。 一名 commenter 请求提供一个开源 GitHub 仓库,作者则链接到了 **jeffkaufman/clipboard-markdown**。讨论还涉及 App Store 对 GPL 软件的限制、GPLv2 与 GPLv3 之间的区别,以及地区可用性由开发者控制这一点。
相关文章

原文
Several months ago I wrote a program to normalize your clipboard, removing fonts / colors / sizes and mostly leaving semantic information: anything that can't be represented in Markdown was dropped. Now that I can have walk me through things, however, I've made it available as a free app on the Mac App Store:

It's now a single menu bar app, which offers a few options:

In addition to normalizing your clipboard, it can also convert copied rich text to markdown and back again.

Video demo:

youtube

It's amazing how much software development has changed in the last few months. In December, when I made the first version, it was simple enough that I think I still wrote it by hand (with some asking questions to Claude) and then Claude walked me through using Platypus to package the script as a Mac app. This time I just said I wanted it in the Mac App Store and Claude rewrote it to be compatible. This included:

  • Replacing Pandoc (GPL and so incompatible the the App Store TOS) with SwiftSoup.
  • Writing Swift code to wrap SwiftSoup.
  • Merging the separate "Normalize Clipboard" and "Markdownify Clipboard" apps into a single menu bar app.
  • Making it show a little toast describing what it had just done, including an FYI if you tried an impossible conversion.
  • Adding tests, including ones for XSS and others for very strange formatting.
  • Fixing a few edge cases the old one mishandled.
  • Walking me through the App Store review process.

I needed to provide a little guidance, in telling it where I wanted to draw the line on which formatting to keep, and I did notice a few small conversion bugs.

It failed the review process the first time, mostly because I was lazy and skipped Claude's recommendation to make a demo video. The second time it got through fine.

Referenced in: Clipboard Normalization

Comment via: facebook, lesswrong, mastodon, bluesky

"; } } return h; } function gotComments(serviceName, response) { all_comments[serviceName] = add_space_for_children(response); redrawComments(); if (window.location.hash && window.location.hash.length > 0) { var s = window.location.hash; window.location.hash = ""; window.location.hash = s; var highlighted_comment = document.getElementById(s.replace('#', '')); if (highlighted_comment) { highlighted_comment.className += " highlighted"; } } } function deep_copy(x) { return JSON.parse(JSON.stringify(x)); } function recursively_add_service(c, service) { c.push(service); var children = c[5]; for (var i = 0 ; i "; h += display_posts(all_comments_sorted()); window.acs = all_comments_sorted(); window.dictionary = dictionary; window.quoting = quoting; h += "

联系我们 contact @ memedata.com