Skip to content

AndreKR/smartytotwig

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Converts Smarty templates into Twig templates.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Shell 0.2%