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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for man2text-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7de0eccb6fac14332fffdd1e50188b0a3510816cc8aa21097b7b3cf1e8810676
MD5 d548f905500b12bbf27ea859ec17d193
BLAKE2b-256 5ef1bee066f5f1d80a20f5db637d99a1536c6be90661a0c602b0938f74ce84e5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: man2text-0.1.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 53644ca753031483a6da0ffc2a54e3ef3ee843bbc15b6029f4c7f62e08326c36
MD5 258c40386e01eccbe13d28c2ce418154
BLAKE2b-256 ac585439f7dc71d5a5f10cb720618eb63e67a17f387ee226bb792206e83ca44d

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