CommunityWriting & Editinggithub.com

sunrisever/glm-ocr

AI-assisted GLM OCR toolkit for converting PDF, PPT, and images to Markdown.

What is glm-ocr?

This skill, sunrisever/glm-ocr, is an AI-powered OCR toolkit leveraging GLM (General Language Model) to convert PDFs, PPTs, and images into structured Markdown. It is particularly useful for developers and users who need to extract and preserve the layout of text and tables from non-editable documents. The tool supports automatic table detection and formatting, making it ideal for processing financial reports, academic papers, or meeting notes. It works seamlessly with CLI commands on Unix-like systems (Linux, macOS, WSL) and can be integrated into automated workflows.

Works with~Claude Code~Codex CLI~Cursor
npx skills add sunrisever/glm-ocr

Installed? Explore more Writing & Editing skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

What does glm-ocr do?

AI-assisted GLM OCR toolkit for converting PDF, PPT, and images to Markdown.

Features

  • Converts PDF, PPT, and image files to Markdown
  • Preserves table structures and formatting
  • Uses GLM AI for accurate text recognition
  • Supports batch processing via CLI

Usage

glm-ocr input.pdf -o output.md

Requirements

  • Python 3.8+
  • GLM API key configured in environment variable GLM_API_KEY

Installation

pip install glm-ocr

Configuration

Set your GLM API key:

export GLM_API_KEY='your-api-key-here'

Supported Platforms

  • Linux
  • macOS
  • Windows (via WSL)

How It Works

The tool sends document pages to the GLM AI model for OCR processing. It then reconstructs the text and tables into Markdown format, preserving the original layout as much as possible.

Example

Convert a PDF file:

glm-ocr report.pdf -o report.md

Convert an image:

glm-ocr screenshot.png -o notes.md

License

MIT

Related Skills