Copy template from origin path to state.get_project_root().
| Parameters: | callback (function – default None) – A callback function to be called after copy is complete |
|---|---|
| Returns: | bool |
Print error that does not result in an exit (Red)
| Parameters: | message (str) – Message to print to user |
|---|
Common message prompting for gathering input form the end user.
| Parameters: | message (str) – Message to print to user |
|---|
Returns a list of files to ignore for rendering based on get_render_ignore_globs patterns.
| Parameters: | files (list) – List of files to check against |
|---|---|
| Returns: | list – list of filenames |
Print message information to user (Blue)
| Parameters: | message (str) – Message to print to user |
|---|
** Optional Key Word Arguments **
| Parameters: | color – Clint color function to use |
|---|---|
| Type: | function – default blue |
Renames directories that are named after context variables, for example: {{PROJECT_NAME}}.
| Returns: | generator |
|---|
Rename files that are named after context variables, for example: {{PROJECT_NAME}}.py
| Returns: | generator |
|---|
Reads the template and uses Jinja 2 to replace context variables with their real values.
Print a success message (Green)
| Parameters: | message (str) – Message to print to user |
|---|
Update the ignore glob patterns to include the list provided.
** Usage: **
from facio.template import Template
t = Template('foo', '/path/to/foo')
globs = [
'*.png',
'*.gif',
]
t.update_copy_ignore_globs(globs)
| Parameters: | globs (list) – A list of globs |
|---|
Update the render ignore glob patterns to include the list provided.
** Usage: **
from facio.template import Template
t = Template('foo', '/path/to/foo')
globs = [
'*.png',
'*.gif',
]
t.update_render_ignore_globs(globs)
| Parameters: | globs (list) – A list of globs |
|---|
Print a warning message (Yellow)
| Parameters: | message (str) – Message to print to user |
|---|