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

Installation

Install directly from PyPI:

pip install docporter

Or install from source:

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

Usage

From GitHub repository:

doc-porter https://github.com/user/repo.git -o ./output-docs

From local folder:

doc-porter /path/to/local/docs -o ./output-docs

Options

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

Examples

  1. Extract docs from GitHub with default output:
doc-porter https://github.com/user/repo.git
  1. Extract docs from local folder with custom output:
doc-porter ./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.1.2.tar.gz (4.1 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.1.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file docporter-0.1.2.tar.gz.

File metadata

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

File hashes

Hashes for docporter-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4a320391af8df3385c39de4d1896d32e625760a59be483bc93fa226006bae3ad
MD5 1732b81e1e35b869b2cc013db4632df1
BLAKE2b-256 f704d773a393630f8aedc3b2bed91a1fc3975434183b991011b3bdea9a57a19a

See more details on using hashes here.

File details

Details for the file docporter-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: docporter-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.6 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.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ddf9819569c0af11a844f3ac1637eb40e70159c45cb65c9e18031a12f4066580
MD5 c60d14db88c00723b72dd31779f81175
BLAKE2b-256 634adf914bb4c1cbbe275e7251b8115130af613faeb4219259d5b04a1b784bf5

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