Skip to content

Commit e4810b6

Browse files
committed
update readme
1 parent 1ad1bdb commit e4810b6

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

README-CN.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,18 @@ Release 二进制默认带 OCR,请确保宿主机安装了 Tesseract 运行时
9090
sudo apt install libtesseract-dev
9191
```
9292

93-
### 源码编译
93+
### Go install
9494

9595
```bash
96+
# 安装不带 OCR 的 kbr
97+
go install github.com/libi/ko-browser/cmd/kbr@latest
98+
9699
# 安装带 OCR 支持的 kbr(需要先安装 Tesseract)
97100
CGO_ENABLED=1 go install -tags=ocr github.com/libi/ko-browser/cmd/kbr@latest
98101
```
99102

100-
> 发布出去的安装方式统一使用 OCR 版本
101-
> OCR 依赖 Tesseract:`brew install tesseract`(macOS)/ `apt install libtesseract-dev`(Linux)。
103+
> 如果只需要基础浏览器能力,可以直接使用 `go install`
104+
> 如果需要 OCR,使用带 `-tags=ocr` 的安装命令,并先安装 Tesseract:`brew install tesseract`(macOS)/ `apt install libtesseract-dev`(Linux)。
102105
103106
### 安装浏览器
104107

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,18 @@ Release binaries are built with OCR enabled, so make sure the Tesseract runtime
101101
sudo apt install libtesseract-dev
102102
```
103103

104-
### From source
104+
### Go install
105105

106106
```bash
107+
# Install kbr without OCR
108+
go install github.com/libi/ko-browser/cmd/kbr@latest
109+
107110
# Install kbr with OCR support (requires Tesseract to be installed)
108111
CGO_ENABLED=1 go install -tags=ocr github.com/libi/ko-browser/cmd/kbr@latest
109112
```
110113

111-
> OCR is required for the published packages.
112-
> This requires Tesseract: `brew install tesseract` (macOS) / `apt install libtesseract-dev` (Linux).
114+
> Use the plain `go install` command if you only need the core browser automation features.
115+
> If you want OCR support, use the `-tags=ocr` variant and install Tesseract first: `brew install tesseract` (macOS) / `apt install libtesseract-dev` (Linux).
113116
114117
### Install Chrome (if not already installed)
115118

0 commit comments

Comments
 (0)