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.dev3.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.dev3-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: docporter-0.2.2.dev3.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.dev3.tar.gz
Algorithm Hash digest
SHA256 5c4f7e4517aa675f47eac0a41b6696b0ce56a5df7983ac607120cffc4f6d84f9
MD5 f7cd1ae52c6f6baf893b00fe495c8e2d
BLAKE2b-256 1e8a2c4d377d2539b4aa941b27d253ea8a24af531137ead4ee25f90e6c1deafb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: docporter-0.2.2.dev3-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.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 d39a654f7d7654c4a38902a1ff67304aafa60c322cfcd22dea873ff52175b50c
MD5 1eda4794bb47de757196c29bd3b9551a
BLAKE2b-256 ea17063a67f6bdedd8d06dd1b37cf723801430a03849bb627a62e84e2db18026

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