Skip to main content

A tool to extract documentation files from GitHub repositories and local folders

Project description

Doc Porter

A Python package to extract documentation files from GitHub repositories and local folders.

Features

  • GitHub Support:

    • Clones repositories (shallow clone)
    • Handles various GitHub URL formats
    • Automatically cleans up after cloning
  • Local Folder Support:

    • Processes documentation files from local directories
    • Validates path existence and permissions
  • Documentation Extraction:

    • Recognizes .md, .mdx, .rst, .txt files
    • Automatically includes README files
    • Preserves directory structure in output
  • CLI Interface:

    • Simple command-line usage
    • Custom output directory support
    • Help messages and error handling
    • Copies documentation in LLM ingestible format to clipboard

Installation

Install directly from PyPI:

pip install docporter

Or install from source:

git clone https://github.com/aatitkarki/docporter
cd docporter
pip install .

Usage

Extract documentation from GitHub repository:

docporter extract https://github.com/aatitkarki/docporter.git -o ./output-docs

Extract documentation from local folder:

docporter extract /path/to/local/docs -o ./output-docs

Copy documentation in LLM ingestible xml format to clipboard:

docporter copy /path/to/local/docs

Options

  • -o, --output: Specify custom output directory (default: [repo_name]-docs)

Examples

  1. Extract docs from GitHub with default output:
docporter extract https://github.com/user/repo.git
  1. Extract docs from local folder with custom output:
docporter extract ./my-docs -o ./extracted-docs

Development

Run tests:

pytest

License

MIT

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

docporter-0.2.2.dev1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

docporter-0.2.2.dev1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file docporter-0.2.2.dev1.tar.gz.

File metadata

  • Download URL: docporter-0.2.2.dev1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for docporter-0.2.2.dev1.tar.gz
Algorithm Hash digest
SHA256 eea3e6698d8d99eab852a38f51985080d250a5696714e5550024a07a06118361
MD5 b0062b6e89d050bb2d429b981bcbcd08
BLAKE2b-256 58c8c1324a51589be79578903ae319603113f62de4a87c7476a7569ba70bd06d

See more details on using hashes here.

File details

Details for the file docporter-0.2.2.dev1-py3-none-any.whl.

File metadata

  • Download URL: docporter-0.2.2.dev1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for docporter-0.2.2.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 675e8adc39611b7f162a2474f5196bb3576f9159a0396724697f55ec4ba246b9
MD5 7abade8209639fe9935ae4780eae283f
BLAKE2b-256 b7550e2151d9cdee219df31fd461783104e465114c3451586ec1e844aeb1bcd5

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