Skip to main content

man2text

man2text is a Python library and CLI tool that converts all system man pages into clean, plain text files.
This makes it easy to index, vectorize, or otherwise process Unix documentation.

[!NOTE]
This is the very first version of man2text. Any contributions are appreciated!

Features

  • Converts all available English manpages (/usr/share/man/man*) into .txt.
  • Uses the standard man <cmd> | col -bx pipeline for accurate rendering.
  • Optional multiprocessing for faster conversion on large systems.
  • Provides both a CLI command and a Python API.

Installation

Clone and install locally in editable mode:

git clone https://github.com/yourusername/man2text.git
cd man2text
pip install -e .

Or using pip:

pip install man2text

Usage

CLI

Convert all manpages to text and save them in ./man-txt:

man2text --output ./man-txt

Options:

  • --output DIR → output directory (default: ./man-txt)
  • --processes N → number of processes to use (default: auto)

Python API

from man2text.core import convert_all

# Convert all manpages to ./txt-pages with 4 processes
convert_all(output_dir="./txt-pages", processes=4)

Example Output

For example, the ls manpage will produce ls.txt containing the plain text version of the manual page.

Metadata

Release files for man2text 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for man2text 0.5.0
File Size Uploaded
man2text-0.5.0.tar.gz 7.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for man2text 0.5.0
File Interpreter ABI Platform
man2text-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.1 kB

Release files / man2text-0.5.0.tar.gz

Download URL man2text-0.5.0.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bafb5d90e502395dfc879f2beb70814cd6403aaf30284af5dbc628c6541a4854
BLAKE2b-256 checksum
How to use checksums
3db3cd178889e45ebea4d2ea5dd3bd6c0d50e1afde1b41b6b92e3a320031f250
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / man2text-0.5.0-py3-none-any.whl

Download URL man2text-0.5.0-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f5bb6c786e9327f33e97e6050741d038928eacbfe64602ef393a43a5bbb2a71
BLAKE2b-256 checksum
How to use checksums
d0661fae4e552809a623eb975a9433ca0012d8e67e06a377f491e4fd95924a15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page