Snippai:AI截图识别工具,公式表格一键转码

Mark Do · · 7 次阅读 · linux软件

Snippai:AI截图识别工具,公式表格一键转码

解决截图后的二次提取痛点

在日常工作中,截图几乎是高频操作。但很多时候,我们关注的并非图像本身,而是其中蕴含的信息——无论是纯文本、代码片段,还是复杂的数学公式。在 Linux 系统中,许多用户习惯使用 Spectacle 的“提取文本”功能,但这仅限于简单的纯文本识别。一旦截图内容涉及表格、数学公式或代码块,往往只能依靠手动录入,效率极低。

开源工具 Snippai 正是为了解决这一问题而生。它不仅是一个截图工具,更是一个集成了 AI 能力的识别引擎。Snippai 将截图内容发送至 AI 模型,自动判断内容类型(如公式、表格或代码),并输出对应格式的结果。例如,公式会被转换为 LaTeX,表格转为 Markdown,代码则会被清理整理。

核心功能与多场景支持

Snippai screenshot tool

Snippai 的工作逻辑非常直观:截取屏幕区域(或直接粘贴/拖入图片),工具会在旁边即时显示识别结果。默认模式下,AI 会自动识别内容类型并执行相应操作。如果自动识别不准,用户也可以通过顶部的标签页手动指定“动作”。

  • 公式识别:将打印或手写的数学公式转换为 LaTeX 代码。
  • 文本 OCR:支持包括手写体在内的纯文本识别。
  • 代码处理:提取图片中的代码,甚至可以对代码进行解释。
  • 表格转换:将图片中的表格转换为 Markdown 格式,并支持导出为 Excel。
  • 问题解决:直接解答图片中展示的问题。
  • 图像分析:描述图片内容或提取主色调。
  • 实用工具:文本翻译,或将日程信息转换为 .ics 日历文件。

Snippai main window in Auto mode with a drop area and Snip, Select text and Drop or paste shortcuts

值得注意的是,Snippai 是一个基于 Electron 的应用,官方主要宣传 macOS 和 Windows 版本,但开发者也提供了 Linux 支持。需要特别强调的是,Snippai 本身不捆绑 AI 模型,而是允许用户接入云端的或本地的 AI 提供商。这意味着你的截图数据会发送到你所配置的 AI 服务,处理敏感信息时需格外注意隐私。

安装与部署指南

Snippai tray menu on KDE Plasma with Show Snippai, Take Screenshot, Toggle Sticky Notes and Quick Action on Clipboard Text

对于 Linux 用户,Snippai 提供了 DEB、RPM 安装包以及通用的 ZIP 压缩包,涵盖 x64 和 ARM64 架构。在基于 Arch 的系统(如 CachyOS)上,由于没有直接的 pacman 包,建议下载 ZIP 包解压运行。安装完成后,Snippai 会驻留在系统托盘,在 KDE Plasma 中右键点击图标即可访问“显示 Snippai”、“截图”、“切换便签”等快捷功能。

配置 AI 模型提供商

LLM Providers page in Snippai settings listing OpenAI and Google Gemini, with Add provider buttons

要让 Snippai 发挥作用,必须配置 AI 后端。进入 设置 -> LLM Providers,你会看到默认列出了 OpenAI(如 gpt-4o)和 Google Gemini(如 gemini-2.0-flash-lite)。你可以点击按钮添加更多提供商,每个提供商需要填写名称、Base URL、API Key 以及模型列表。建议配置前先使用“Test”按钮验证连接。

例如,你可以创建一个名为“Google Gemini AI”的自定义提供商,填入你的 Gemini API Key,并选择 gemini-3.5-flash-lite 模型。配置完成后,在主界面下拉菜单中选中该模型即可开始工作。

Snippai Edit provider dialog with name, base URL, API key, organization ID and models fields

实际操作体验与注意事项

截图操作通常通过托盘菜单触发。虽然软件提示快捷键为 Ctrl+Shift+A,但在 KDE Plasma Wayland 环境下可能存在兼容性问题,直接使用托盘菜单更为稳妥。选定区域后,点击工具栏上的对勾符号即可提交识别。此外,你也可以完全跳过截图步骤,直接通过 Ctrl+V 粘贴图片或拖入文件,这对测试手写笔记的照片非常有用。

Custom Google Gemini AI provider with the gemini-3.5-flash-lite model enabled in Snippai

在实际测试中,Snippai 对拉马努金(Ramanujan)的圆周率倒数级数公式进行了截图识别。大部分功能输出的是源代码(如 LaTeX、Markdown 或 iCalendar 文本),而非直接渲染的结果。你需要将这些代码复制到相应的编辑器或应用中进行查看。这种设计更适合开发人员或研究人员,便于他们进一步处理数据。


关注微信号:智享开源 ,及时了解更新信息。

Snippai selection around Ramanujan's series for 1/pi on a web page, with the capture toolbar below

Snippai Formula tab showing a rendered preview and LaTeX source of Ramanujan's series for 1/pi

Photo of handwritten Schrodinger equations converted to LaTeX in an aligned block by Snippai

Snippai Explain tab identifying Ramanujan's 1914 formula for pi and explaining each symbol

Handwritten note read by the Snippai Text tab as 'Linux was first released in 1991 by Linus Torvalds'

Table of Git commands converted to a Markdown table by Snippai, with an Export as Excel button

8086 CPU pin diagram described by the Snippai Image tab as a 40-pin DIP with each pin listed

It's FOSS home page with its dominant colors listed in hex by the Snippai Color tab

Japanese paragraph about Ubuntu translated to English in the Snippai Translate tab

Fedora Linux 45 release party details turned into an iCalendar entry with a Save .ics button in Snippai

Snippai Rewrite action on clipboard text leaving some spelling mistakes uncorrected

Custom Fix Grammar action in Snippai correcting every mistake in the clipboard sentence

Snippai capture toolbar with shape, arrow, pen, text and pixelate tools and color choices, used on an article

Long screenshot button on the Snippai capture toolbar over a web article

Floating Snippai Note window with a snip and its result, and Toggle Sticky Notes in the tray menu

Model drop-down in the Snippai main window with gemini-3.5-flash-lite selected

阅读原文

Mark Do

关注我的头条 不要放弃,百折不挠,坚强、自信。

发表评论

评论列表
0 条评论
还没有任何评论,来发表第一条吧!