ParsedPage objects for downstream processing.
Source Types
Git Repositories
Extract documentation from GitHub, GitLab, or any git repository with version control.How It Works
The git extractor (extract/git.py) uses sparse checkout for efficiency:
Sparse checkout downloads only the documentation directories you need, not the entire repository. This is much faster for large repos.
Version Resolution
OpenGround intelligently resolves git refs (fromextract/git.py:80-119):
Supported File Types
Fromextract/common.py:36-38, git extraction supports:
- Parses YAML front matter in Markdown/MDX
- Extracts cells from Jupyter notebooks
- Converts HTML to Markdown using Trafilatura
- Skips build artifacts (
node_modules,__pycache__,.git)
URL Generation
Each extracted file gets a web URL for reference (fromextract/git.py:268-270):
Sitemaps
Extract documentation from websites that provide a sitemap.xml.How It Works
The sitemap extractor (extract/sitemap.py) fetches and processes web pages:
1
Fetch Sitemap
2
Check robots.txt
3
Process Pages Concurrently
4
Extract Content
JavaScript Detection
Fromextract/sitemap.py:141-156, OpenGround warns about JS-required pages:
Local Paths
Extract documentation from directories on your file system.How It Works
The local path extractor (extract/local_path.py) is the simplest:
Local paths use
file:// URLs for references. Perfect for work-in-progress documentation or private codebases.Version Naming
For local paths, OpenGround generates a version string automatically:Source Configuration Files
OpenGround remembers source configurations so you can update libraries without re-specifying URLs.Sources File Locations
Fromconfig.py:35-37, there are two sources files:
Priority Order
Fromextract/source.py:109-161, OpenGround checks sources in order:
1
Custom Path
If you specify
--sources-file /path/to/sources.json, use that.2
Project-Local
Check
.openground/sources.json in current directory.Allows project-specific configurations to override user defaults.3
User Sources
Check
~/.openground/sources.json.Shared across all your projects.4
Package Bundled
Fall back to bundled sources (if any).
Sources File Format
From the README example (lines 149-162):Auto-Save Behavior
Fromextract/source.py:58-89, OpenGround automatically saves sources:
File Processing Pipeline
All source types share a common file processing pipeline (fromextract/common.py:145-227):
1
Filter Files
2
Extract Content
Different handlers for each file type:
- Markdown/MDX/RST: Parse YAML front matter
- Jupyter: Extract markdown + code cells
- HTML: Use Trafilatura for content extraction
3
Generate Metadata
4
Create ParsedPage
Raw Data Storage
Extracted pages are saved as JSON files before embedding (fromextract/common.py:230-258):
config.py:41-52:
Incremental Updates
OpenGround supports efficient updates by detecting changed content (fromextract/common.py:260-289):
update command uses this to:
- Fetch new documentation
- Hash each page’s content
- Compare with existing hashes
- Only re-embed changed pages
Next Steps
Embeddings
Learn how OpenGround converts text to vector embeddings
Search
Understand hybrid search with vector similarity and BM25
Architecture
See how sources fit into the overall architecture
Add Documentation
Step-by-step guide to adding your first library