Skip to main content

🧵 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.


Metadata

Release files for sewsource 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sewsource 0.1.3
File Size Uploaded
sewsource-0.1.3.tar.gz 7.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sewsource 0.1.3
File Interpreter ABI Platform
sewsource-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 15.0 kB

Release files / sewsource-0.1.3.tar.gz

Download URL sewsource-0.1.3.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
cb482ee2c9442e3d366bcec0f8e5df1fa832f28335ea75edae90501a02292cf8
BLAKE2b-256 checksum
How to use checksums
1f48285a5de4aa3e5d7678436d96007e15b57a3c1e9639e5ef00b000cc31932d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / sewsource-0.1.3-py3-none-any.whl

Download URL sewsource-0.1.3-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77bb34484f3f112374cd3861b13bb62862424d8b5ad28405739a0035d3986d98
BLAKE2b-256 checksum
How to use checksums
017dd3b37286e9c226d2e8bab6f85cf62839d248d6873c3a221ca5a3764a9ba8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page