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.3.0.tar.gz (7.5 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.3.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for man2text-0.3.0.tar.gz
Algorithm Hash digest
SHA256 07b8e957e0e3dc15bf5438cf25d75066d00a80c30f45811284228dad9c63d0ba
MD5 97ec1241a9d900744814b51cbf944378
BLAKE2b-256 b331985056097e395ab22ea1e29bf33e713f5b76f9de1fa8bfb7e5d205da5c28

See more details on using hashes here.

File details

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

File metadata

  • Download URL: man2text-0.3.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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0010f8269b4636b6364f69881b328d74ef5f3a9ae818bbc8f6f2bf7ca5a1975e
MD5 879013b6a5fdd73a7743dd6726bb5b38
BLAKE2b-256 89a6a2f054b95ea6fa8a70ce292c64b7419b42ae26d48d0581d34c413ae8f383

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