Velocity Template Previewer
Desktop application for previewing and rendering Apache Velocity templates with real-time syntax highlighting and validation. Perfect for developers working with Atlassian products (Jira, Confluence), ScriptRunner, email templates, and web applications.
What is This?
Apache Velocity is a Java-based template engine commonly used in:
- Atlassian Products: Jira email templates, Confluence macros, ScriptRunner scripts
- Email Systems: Dynamic email generation
- Web Applications: Server-side templating
- Code Generation: Template-based code scaffolding
This tool lets you preview and test your Velocity templates instantly without deploying to production.
Features
- Real-time Preview: See changes as you type
- Syntax Highlighting: Color-coded templates and JSON data
- Validation: Catch errors before deployment
- Background Rendering: Smooth performance with large templates
- Auto-save: Never lose your work (saves every 30 seconds)
- Export: Generate static HTML from your templates
- Dark Mode: Easy on the eyes
- Recent Files: Quick access to your projects
Installation
Requirements: Python 3.10+ (Windows, macOS, Linux)
pip install velocity-previewer
velocity-previewer
Or from source:
git clone https://github.com/star7js/velocity-previewer.git
cd velocity-previewer
pip install -e .
velocity-previewer
Quick Start
- Open a template: File > Open or Ctrl+O
- Add your data: Switch to Data tab, paste JSON
- Render: Press F5
- Export (optional): File > Export to HTML
Try the included examples/example-template.vm with examples/example-data.json to see it in action.
Use Cases
Atlassian/ScriptRunner Development
Test Jira email notifications, Confluence macros, or ScriptRunner templates locally before deploying:
#if($issue.priority.name == "Critical")
<span style="color: red;">$issue.key - $issue.summary</span>
#end
Email Template Design
Preview dynamic email templates with test data:
Hello $customer.name,
Your order #$order.id has shipped!
#foreach($item in $order.items)
- $item.name (Qty: $item.quantity)
#end
Dynamic Reports
Generate reports from JSON data without manual formatting.
Keyboard Shortcuts
| Action | Shortcut |
|---|---|
| Render Template | F5 |
| Open Template | Ctrl+O |
| Save Template | Ctrl+S |
| Validate Template | Ctrl+Shift+V |
| Validate Data | Ctrl+Shift+D |
Supported Velocity Syntax
- Variables:
$variable,${variable} - Directives:
#if,#foreach,#set,#macro - Comments:
##(single line),#* ... *#(multi-line) - Properties:
$object.property,$array[0] - Methods:
$string.substring(0, 5)
Full Apache Velocity specification supported via Airspeed engine.
Platform Support
- ✅ Windows 10/11
- ✅ macOS 10.15+
- ✅ Linux (Ubuntu, Fedora, Arch)
Development
# Install dependencies
pip install -e .
# Run tests
pytest
# Type check
mypy src/
# Project structure
├── src/velocity_previewer/ # Main package
│ ├── main.py # Application UI and logic
│ ├── renderer.py # Background rendering & context building
│ ├── styles.py # Light/dark Qt stylesheets
│ ├── utils.py # Template processing
│ └── syntax_highlighters.py # Syntax highlighting
├── examples/ # Example templates and data
├── tests/ # Test files
└── pyproject.toml # Project configuration
Settings (window size, recent files) are saved to:
- Windows:
%APPDATA%/VelocityPreviewer - macOS:
~/Library/Application Support/VelocityPreviewer - Linux:
~/.config/VelocityPreviewer
Troubleshooting
| Issue | Solution |
|---|---|
| Template won't render | Use Tools > Validate Template (Ctrl+Shift+V) to see errors |
| JSON parse errors | Use Tools > Validate Data (Ctrl+Shift+D) to check format |
| Slow performance | Large templates render in background automatically |
| App won't start | Ensure PyQt5 is installed: pip install PyQt5 |
Roadmap
- Live preview mode (render on every keystroke)
- Multiple data sets for testing
- Template snippet library
- Velocity macro autocomplete
License
MIT License
Built With
Metadata
Release files for velocity-previewer 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| velocity_previewer-1.1.1.tar.gz | 20.2 kB | With provenance | Details for velocity_previewer-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| velocity_previewer-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for velocity_previewer-1.1.1-py3-none-any.whl |
Total release size: 37.1 kB
Release files / velocity_previewer-1.1.1.tar.gz
| Download URL | velocity_previewer-1.1.1.tar.gz |
|---|---|
| Size | 20.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6cb5324a434be82f9f2cf089d1605a52ec09060c7c3edd9a7889d1b95d98d9da
|
|
BLAKE2b-256 checksum How to use checksums |
313da240a638b2d20f20b1a3c973084a3597229f72d0a4244f9b658013304bb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 6, 2026.
Transparency logRelease files / velocity_previewer-1.1.1-py3-none-any.whl
| Download URL | velocity_previewer-1.1.1-py3-none-any.whl |
|---|---|
| Size | 17.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f7d09b5de3af4969c25c3b840d0f36db440ccc0bd4810d5b36bfe67fa4565f12
|
|
BLAKE2b-256 checksum How to use checksums |
f65f2fe5096a134d083695747efc6731ae057fc03fe596d132196d5e058dc11f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 6, 2026.
Transparency logSecurity for velocity-previewer 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for velocity_previewer-1.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.