diff --git a/new-project.py b/new-project.py index 201b264..3e190a7 100644 --- a/new-project.py +++ b/new-project.py @@ -1,7 +1,5 @@ import datetime import os - -import yaml import frontmatter @@ -9,10 +7,10 @@ title = input("🦗 Title: ") sluggish_title = title.replace(' ', '-').lower() slug = input( - f"🦈 Slug: [{sluggish_title}]") or sluggish_title + f"🦈 Slug: [{sluggish_title}] ") or sluggish_title today = datetime.date.today().strftime('%d/%m/%Y') -date = input(f"🍲 Date: [{today}]") or today +date = input(f"🍲 Date: [{today}] ") or today categories = [category.strip() for category in input("🚩 Categories: ").split(',')] @@ -48,6 +46,5 @@ post = frontmatter.Post('', **project) os.makedirs(f'projects/{slug}') with open(f'projects/{slug}/documentation.md', 'w') as f: - # documentation = yaml.dump(project) documentation = frontmatter.dumps(post) f.write(documentation)