Skip to content

Commit

Permalink
chore: Update template variables in structure.yaml and main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
httpdss committed Jul 14, 2024
1 parent 2947416 commit ad49c66
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example/structure.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
structure:
- README.md:
content: |
# {project_name}
# ${project_name}
This is a template repository.
- script.sh:
permissions: '0777'
content: |
#!/bin/bash
echo "Hello, {author_name}!"
echo "Hello, ${author_name}!"
- LICENSE:
file: https://raw.githubusercontent.com/nishanths/license/master/LICENSE
- .gitignore:
Expand Down
1 change: 1 addition & 0 deletions struct_module/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def apply_template_variables(self, template_vars):
if self.content and template_vars:
logging.debug(f"Applying template variables: {template_vars}")
template = Template(self.content)
print(template.substitute(template_vars))
self.content = template.substitute(template_vars)

def create(self, base_path, dry_run=False, backup_path=None, file_strategy='overwrite'):
Expand Down
Empty file added tests/__init__.py
Empty file.

0 comments on commit ad49c66

Please sign in to comment.