剪贴板规范化器
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 新 | 往期 | 评论 | 提问 | 展示 | 工作 | 提交 登录 剪贴板规范化工具 (jefftk.com) 3 分 作者:luu 1 小时前 | 隐藏 | 原文 | 收藏 | 3 条评论 MiroslavPokorny 16 分钟前 [–] 感谢分享,希望能看到 GitHub 仓库。 回复 jefftk 16 分钟前 | 上级 [–] https://github.com/jeffkaufman/clipboard-markdown 回复 MiroslavPokorny 16 分钟前 | 根评论 | 上级 [–] 已关注并收藏 回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请加入 YC | 联系方式 搜索:
相关文章

原文
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