一个命令行应用程序,用于使用Apple的Vision文本识别API将图像和图像的PDF文件转换为文本

特维尔

一个命令行应用程序,用于使用 Apple 的 Vision 文本识别 API 将图像和图像的 PDF 文件转换为文本。

显示文本的终端窗口:|% 额外 /穆勒报告.pdf |转换指定的 PDF 文件并在目录“/The-Mueller-Report”中输出文本 |16 的 448 [- ] 预计到达时间: 00:05:21 (在 1.34 它/秒)

安装

Textra 需要 Mac OS 版本 13 或更高版本才能访问最新的 Vision API。

最简单的安装方法是打开终端窗口并运行以下命令:textra

curl -L https://github.com/freedmand/textra/raw/main/install.sh | bash

或者,下载最新版本,解压缩它,然后将可执行文件放在变量上的某个位置。textra$PATH

用法

textra FILE1 [FILE2...]

参数

FILE1 [FILE2...]: One or more files to be converted. If multiple files are provided, the last file must be the output directory or a pattern containing an output path.

Examples

textra image.png
textra image1.png image2.png output-dir/
textra document.pdf
textra document.pdf output-dir/
textra document.pdf page-{}.txt

GitHub

点击跳转