pyragify Skill
Source
- Repo: https://github.com/ThomasBury/pyragify
- PyPI:
pip install pyragify - Version: v0.2.0 (April 2026)
- License: Unlicense (fully free)
What It Does
Converts any code repository or document directory into clean, semantically-chunked .txt files optimized for NotebookLM ingestion. Run this BEFORE uploading to NotebookLM.
Setup
pip install pyragify
Usage
CRITICAL: Always use relative portable paths to execute the OS Engine so the workspace can be ported to new machines without breaking:
# With a config file (recommended)
.\.venv\Scripts\pyragify.exe --config-file config.yaml
# Or inline
.\.venv\Scripts\pyragify.exe \
--repo-path /path/to/repository \
--output-dir /path/to/output \
--max-words 200000 \
--skip-dirs "__pycache__" \
--skip-dirs "node_modules" \
--verbose
Example config.yaml
repo_path: c:\Users\BAB AL SAFA\Desktop\open-workspace
output_dir: c:\Users\BAB AL SAFA\Desktop\open-workspace\.core\toolbox_library\core.toolbox\notebooklm\skills\pyragify\output
max_words: 200000
max_file_size: 10485760 # 10 MB
skip_patterns:
- "*.log"
- "*.tmp"
skip_dirs:
- "__pycache__"
- "node_modules"
- ".git"
verbose: false
Output Structure
output/
python/ ← Python functions, classes, comments
markdown/ ← Markdown sections split by headers
html/ ← HTML script and style chunks
css/ ← CSS rule chunks
other/ ← All other readable file types
remaining/ ← Overflow chunks after word limit
metadata.json
hashes.json ← MD5 hashes for incremental re-runs (only reprocesses changed files)
Supported Inputs
.py— chunked by function/class/comment.md,.markdown— split by header sections.html— script and style chunks.css— CSS rule chunks- All other UTF-8 readable files — included as plain text
Workflow with notebooklm-py
# Step 1: Preprocess the workspace
pyragify --config-file config.yaml
# Step 2: Upload output chunks to NotebookLM
notebooklm create "Workspace Analysis"
notebooklm use <notebook_id>
notebooklm source add "./output/markdown/chunk_0.txt"
notebooklm source add "./output/python/chunk_0.txt"
# Step 3: Query and generate
notebooklm ask "What are the architectural gaps in this workspace?"