Skip to main content

A CLI tool to sew github documentations into a compiled source for LLMs

Project description

🧵 SewSource

License: MIT Python 3.8+ PyPI version

📖 Overview

SewSource is a powerful command-line interface (CLI) tool that helps you aggregate documentation files from GitHub repositories. It clones repositories, combines specified documentation files, and creates a unified source perfect for interactive Learning Language Model (LLM) discussions using tools like NotebookLM.

🚀 Installation

pip install sewsource

🛠️ Usage

Basic Command

sewsource https://github.com/username/repository

Advanced Usage with Options

sewsource https://github.com/username/repository \
    --output-dir "./docs_combined" \
    --include-dirs "docs,wiki" \
    --exclude-dirs "tests" \
    --blacklist "README.md,CHANGELOG.md" \
    --extensions ".md,.rst,.txt"

📋 Command Options

Option Short Description Default
--output-dir -o Output directory for combined files ~/.sewsource
--include-dirs -i Directories to include All directories
--exclude-dirs -x Directories to exclude None
--blacklist -b Files to exclude None
--extensions -e File extensions to include .md, .mdx
--version - Show version information -
--help - Show help message -

💡 Examples

1. Basic Repository Aggregation

sewsource https://github.com/tensorflow/tensorflow

2. Specific Documentation Directories

sewsource https://github.com/pytorch/pytorch \
    --include-dirs "docs" -i "tutorials" \
    --extensions ".md" -e ".rst"

3. Excluding Certain Content

sewsource https://github.com/kubernetes/kubernetes \
    --exclude-dirs "vendor" -x "test" \
    --blacklist "CONTRIBUTING.md"

⚠️ Common Issues and Solutions

  • Large Repositories

    # For large repos, use specific directories
    sewsource https://github.com/large/repo --include-dirs "docs"
    

Next TODOs

  • Add support for comma separated values as arguments for multiple folders/files

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


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

sewsource-0.1.2.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

sewsource-0.1.2-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for sewsource-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1fcf295fa746773815958a597b4090060093ac6da519489088062ddb4cc48bdf
MD5 e4ef504135569840ed6f827fa89d8ef1
BLAKE2b-256 55fdfe67247ace8b97b62c0f7670cf8669866280c27b4e4a1ca79052cc1e6f4e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sewsource-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for sewsource-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 835caf1e5b970de86d6bab84962aa6fd61a397d18faea9288b790357255552a7
MD5 b41ab16967d89884914a23e3427436b5
BLAKE2b-256 26dc8111dd6b667221d7c24c91feeb5f4f627f99f48bc47c27a7da9c331a910f

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