Skip to content

Commit 1b2248d

Browse files
committed
chore: Update .gitignore to exclude example_project/
1 parent ad49c66 commit 1b2248d

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ __pycache__
33
*.egg-info
44
.env
55
*.log
6+
example_project/

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ Here is an example of a YAML configuration file:
5353
structure:
5454
- README.md:
5555
content: |
56-
# {project_name}
56+
# ${project_name}
5757
This is a template repository.
5858
- script.sh:
5959
permissions: '0777'
6060
content: |
6161
#!/bin/bash
62-
echo "Hello, {author_name}!"
62+
echo "Hello, ${author_name}!"
6363
- LICENSE:
6464
file: https://raw.githubusercontent.com/nishanths/license/master/LICENSE
6565
```

struct_module/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ def apply_template_variables(self, template_vars):
7878
if self.content and template_vars:
7979
logging.debug(f"Applying template variables: {template_vars}")
8080
template = Template(self.content)
81-
print(template.substitute(template_vars))
8281
self.content = template.substitute(template_vars)
8382

8483
def create(self, base_path, dry_run=False, backup_path=None, file_strategy='overwrite'):
@@ -180,6 +179,10 @@ def main():
180179
if backup_path and not os.path.exists(backup_path):
181180
os.makedirs(backup_path)
182181

182+
if args.base_path and not os.path.exists(args.base_path):
183+
logging.info(f"Creating base path: {args.base_path}")
184+
os.makedirs(args.base_path)
185+
183186
logging.basicConfig(
184187
level=logging_level,
185188
filename=args.log_file,

0 commit comments

Comments
 (0)