Skip to content

Latest commit

 

History

History
21 lines (12 loc) · 596 Bytes

README.textile

File metadata and controls

21 lines (12 loc) · 596 Bytes

Smarty to Twig

Converts templates in the smarty templating language to the twig templating language.

Installation

python setup.py install

Usage:

smartytotwig —smarty-file=examples/guestbook.tpl —twig-file=output.twig

Differences after fork:

- Added smartytotwig.bat
- Renamed “junk” to “whitespace” because usually junk refers to arbitrary data that is ignored by a parser
- Assigned some names for the quantifiers 0, -1 and -2
- Can parse config variables (a string like {# … #} in the Smarty template)
- Allows whitespace within the curly braces of an if condition