Skip to main content

Convert system manpages to plain UTF-8 text files (English-only by default).

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

man2text-0.5.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

man2text-0.5.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file man2text-0.5.0.tar.gz.

File metadata

  • Download URL: man2text-0.5.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for man2text-0.5.0.tar.gz
Algorithm Hash digest
SHA256 bafb5d90e502395dfc879f2beb70814cd6403aaf30284af5dbc628c6541a4854
MD5 9420b2fd691724e456e68561ce7d3d3e
BLAKE2b-256 3db3cd178889e45ebea4d2ea5dd3bd6c0d50e1afde1b41b6b92e3a320031f250

See more details on using hashes here.

File details

Details for the file man2text-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: man2text-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for man2text-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f5bb6c786e9327f33e97e6050741d038928eacbfe64602ef393a43a5bbb2a71
MD5 411407fd2a910e37072310ba0cf27987
BLAKE2b-256 d0661fae4e552809a623eb975a9433ca0012d8e67e06a377f491e4fd95924a15

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page