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.4.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.4.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: man2text-0.4.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.4.0.tar.gz
Algorithm Hash digest
SHA256 f89beea5cabfc7e927aaf3a85c763e298f1d753d8ff3d3e19b3fa079c99707c0
MD5 961fa24edc085eaaefb95022f2e06280
BLAKE2b-256 9431ca64ff1bfae9e6608728de3b5fcaf2da7ee1564e31f0494d61394fa72a51

See more details on using hashes here.

File details

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

File metadata

  • Download URL: man2text-0.4.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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a31c6e9484fe91a1bccf165357c0cdb9700dc3f4f8356e11112705c16ca4e53a
MD5 d7b4460092d15235cc937b42bc083940
BLAKE2b-256 b2383fd61c06f661222fb9c92554e0a00308cc1b83bed364c5d8147a38df197c

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