Install
openclaw skills install @itspremkumar/doc-extractorExtract text from PDF, DOCX, and TXT with encoding detection and page/paragraph structure
openclaw skills install @itspremkumar/doc-extractorExtract text from PDF, DOCX, and TXT with encoding detection and page/paragraph structure.
Keywords: pdf, docx, extract, text, cli, documents, python, open-source, agent, automation, MIT
Part of the itsPremkumar Hermes / OpenClaw / Paperclip agent stack — 31 free, MIT-licensed, CI-tested agent-native tools.
Getting clean text out of PDFs/DOCX for RAG or search is fiddly. Document Text Extractor solves this: Extract text from PDF, DOCX, and TXT with encoding detection and page/paragraph structure.
Best for: RAG builders, researchers, and data engineers.
# Requires Python 3.8+. No pip install needed.
curl -O https://raw.githubusercontent.com/itsPremkumar/doc-extractor/main/doc_extractor.py
# Or copy the file anywhere — it's self-contained.
python doc_extractor.py self-test # prove it works end-to-end
python doc_extractor.py extract --help # extract subcommand
python doc_extractor.py list-formats --help # list-formats subcommand
python doc_extractor.py batch --help # batch subcommand
| Alternative | Why this skill is better |
|---|---|
| Copy-paste from a viewer | Scriptable batch extraction. |
| One-format tools | PDF + DOCX + TXT in one CLI. |
| Lost structure | Structured output for RAG. |
Q: Formats?
A: PDF, DOCX, TXT (list with list-formats).
Q: Encoding?
A: Auto-detected.
Q: Structure?
A: Page/paragraph boundaries are preserved where available.
Q: Offline?
A: Yes.
Built and maintained by @itsPremkumar (Chennai, India · serving developers worldwide). Free for individuals and teams everywhere. Documentation in English; tool output is locale-neutral.
# .github/workflows/verify.yml
name: Verify
on: [push]
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Self-test doc-extractor
run: python doc_extractor.py self-test
Free + MIT-0 (free, modifiable, no attribution required). Sponsor if useful:
⭐ Star on GitHub