TemplateGen

Template Generator:

Usage

Use this for generating a file on some template. Before start using please change the please mention your template folder path in the config.py file.

For adding template in your template file, use the template extension. For example py1.template is a template file.

Commands :

  • For listing all templates use -l flag.
templategen -l
  • For generating a file from a template use -t flag for template name then the file name. for example:
templategen -t py1 test.py
  • For adding a template use -a flag for template name then the file name. for example:
templategen -a py1 test.py
  • The above command create a template named py1.template in your template folder with test.py content.

  • Use --help for help.

templategen --help

Installation :

chmod +x main.py
sudo ln -s (pwd)/main.py /usr/bin/templategen
  • This works for both fish and bash shell.