Jinja2-TT2
view release on metacpan or search on metacpan
bin/jinja2tt2 view on Meta::CPAN
=head1 OPTIONS
=over 4
=item B<-h, --help>
Print this help message and exit.
=item B<-v, --version>
Print version information and exit.
=item B<-d, --debug>
Print debug information (tokens and AST) to stderr.
=item B<-o, --output> FILE
Write output to FILE instead of stdout.
=item B<-i, --inplace>
Convert file in place, creating a .tt file alongside the input.
=back
=head1 EXAMPLES
# Simple variable
echo '{{ user.name }}' | jinja2tt2
# Output: [% user.name %]
# Filter
echo '{{ name|upper }}' | jinja2tt2
# Output: [% name.upper %]
# Loop
echo '{% for item in items %}{{ item }}{% endfor %}' | jinja2tt2
# Output: [% FOREACH item IN items %][% item %][% END %]
# Conditional
echo '{% if user %}Hello{% endif %}' | jinja2tt2
# Output: [% IF user %]Hello[% END %]
=head1 SUPPORTED CONSTRUCTS
=over 4
=item * Variables and attribute access
=item * Filters (most common ones)
=item * for loops (including else clause)
=item * if/elif/else conditionals
=item * Blocks and inheritance (partial)
=item * Includes
=item * Macros
=item * Comments
=item * Whitespace control (-% tags)
=back
=head1 LIMITATIONS
=over 4
=item * Template inheritance (extends) requires manual adjustment
=item * Some filters need TT2 plugins (JSON, Dumper, etc.)
=item * Complex expressions may need review
=item * Autoescape is not directly supported in TT2
=back
=head1 AUTHOR
Luciano Federico Pereira
=cut
( run in 0.415 second using v1.01-cache-2.11-cpan-a1f116cd669 )