Home
# ðŠ gtext
**The text wizard** - Transform text files with pluggable extensions.
What is gtext?
gtext is a universal text processor that transforms text files using a pluggable extension system. It reads source files with .gtext extension, processes them through customizable plugins, and generates final output files.
Think of it as a preprocessor for any text format - Markdown, Python, YAML, HTML, or any other text file type.
Key Features
- ð§ Universal: Works with any text file format
- ð Pluggable: Easy-to-create extension system
- ð Include Files: Static files, CLI output, and glob patterns
- ⥠Zero Dependencies: Standalone, no external requirements
- ð Modern Python: Python 3.10+ with type hints
- ð Well Documented: Comprehensive docs and examples
Quick Example
Source file (report.md.gtext):
# Monthly Report
## Statistics
```include
cli: python scripts/get_stats.py
```
## Documentation
```include
glob: docs/**/*.md
```
Command:
Result (report.md):
# Monthly Report
## Statistics
[output from get_stats.py]
## Documentation
[all .md files from docs/]
Use Cases
ð Documentation
- Living documentation that updates from real data
- Multi-file documentation aggregation
- Auto-generated API docs from code
ðŧ Code Management
- License headers across codebase
- Boilerplate code injection
- Shared imports and configurations
ð Reports
- Dynamic reports with live database queries
- System monitoring snapshots
- Business dashboards in Markdown
âïļ Content Management
- Blog post templates with includes
- Multi-language content generation
- Reusable content blocks
How It Works
- Write source files with
.gtextextension (e.g.,document.md.gtext) - Add directives like
\``include` blocks in your content - Run gtext to process and generate output files
- Extend with custom plugins as needed
Installation
See the Installation Guide for more details.
Quick Start
Jump to the Quick Start Guide to get started in minutes.
Project Status
- Status: Alpha (v0.1.0)
- Python: 3.10+
- License: MIT
- Author: Giovanni Porcari
- Contributors: Genro Team
Community
- GitHub: github.com/genropy/gtext
- Issues: Report bugs or request features
- Contributing: See Contributing Guide
Made with âĻ by Giovanni Porcari
Like a weaverbird ðŠķ that masterfully weaves its nest, gtext weaves together different content sources into unified documents.