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.1.tar.gz (6.3 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.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sewsource-0.1.1.tar.gz
  • Upload date:
  • Size: 6.3 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.1.tar.gz
Algorithm Hash digest
SHA256 b0bed9030b7c0ad4d55a9da8d59850b442e999323f6cd6d81ef8c0d368915b42
MD5 0d96778b51b84d89582764c23099aad0
BLAKE2b-256 0d867e093ec67e7ca8eb477378cd756b5123bf36ba5a14b177b99bcb0ff3c1e9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sewsource-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3d0bcc65515ad19347be1ce13f04e44a9ae338200654eebc1b16d43b5bda492d
MD5 98f72d213d077d565bc11972fb16b25f
BLAKE2b-256 40908883393ff337e200eaf0f88d04c1665818ef3446b3abd6d6a6e9638516d0

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