|
|
|
@ -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)
|
|
|
|
|