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
  • Add is_all option to concatenate all sources into a single final source file

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: sewsource-0.1.3.tar.gz
  • Upload date:
  • Size: 7.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.3.tar.gz
Algorithm Hash digest
SHA256 cb482ee2c9442e3d366bcec0f8e5df1fa832f28335ea75edae90501a02292cf8
MD5 07046e7258951b9fe11d1aa5a417d47a
BLAKE2b-256 1f48285a5de4aa3e5d7678436d96007e15b57a3c1e9639e5ef00b000cc31932d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sewsource-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 7.6 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 77bb34484f3f112374cd3861b13bb62862424d8b5ad28405739a0035d3986d98
MD5 dbe1b1be1a3f83b43f28345c6f489066
BLAKE2b-256 017dd3b37286e9c226d2e8bab6f85cf62839d248d6873c3a221ca5a3764a9ba8

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