Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .agents/tools/ocr/glm-ocr.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ tools:

# GLM-OCR - Local Document OCR

> **Note:** The command examples in this guide are primarily for macOS. On Linux, use equivalent commands where needed (for example, `apt` instead of `brew`).

<!-- AI-CONTEXT-START -->

## Quick Reference
Expand Down Expand Up @@ -95,6 +97,8 @@ done > extracted_text.txt

### PDF to Text (via ImageMagick)

> **Note:** This workflow requires [ImageMagick](https://imagemagick.org/). On macOS, install with `brew install imagemagick`.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve usability for Linux users, who are mentioned in the note at the top of the document, it would be helpful to include the installation command for ImageMagick on common Linux distributions like Debian/Ubuntu, in addition to the macOS command.

Suggested change
> **Note:** This workflow requires [ImageMagick](https://imagemagick.org/). On macOS, install with `brew install imagemagick`.
> **Note:** This workflow requires [ImageMagick](https://imagemagick.org/). On macOS, install with `brew install imagemagick`. On Debian/Ubuntu, use `sudo apt-get install imagemagick`.


```bash
# Convert PDF pages to images, then OCR
convert -density 300 document.pdf -quality 90 /tmp/page-%03d.png
Expand Down Expand Up @@ -175,7 +179,7 @@ ollama list
### Slow Performance

```bash
# Check available memory (model needs ~4GB RAM)
# Check available memory (model needs at least 8GB RAM)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Since vm_stat is a macOS-specific command, it would be helpful for Linux users to also mention the equivalent command, such as free -h, to improve cross-platform usability. This is consistent with the new note at the top of the file that acknowledges Linux users.

Suggested change
# Check available memory (model needs at least 8GB RAM)
# Check available memory (model needs at least 8GB RAM). On Linux, use a command like `free -h`.

vm_stat | head -5

# For large batches, process sequentially to avoid memory pressure
Expand Down
Loading