project generator

thumb
km0 3 years ago
parent 95f2d2755a
commit 4c1e422313

@ -1,6 +1,7 @@
- ~~workinon~~ - ~~workinon~~
- ~~panel~~ - ~~panel~~
- ~~spaghetti~~ - ~~spaghetti~~
- ovvvvvvverture atlas - ovvvvvvverture atlas
- emergent opera frontend - emergent opera frontend
- emergent opera api - emergent opera api

@ -0,0 +1,53 @@
import datetime
import os
import yaml
import frontmatter
title = input("🦗 Title: ")
sluggish_title = title.replace(' ', '-').lower()
slug = input(
f"🦈 Slug: [{sluggish_title}]") or sluggish_title
today = datetime.date.today().strftime('%d/%m/%Y')
date = input(f"🍲 Date: [{today}]") or today
categories = [category.strip()
for category in input("🚩 Categories: ").split(',')]
url = input("🔗 URL: ")
git = input("🪃 Git: ")
pad = input("🗒️ Pad: ")
cover = input("🖼️ Cover: ")
cover_alt = input("🎨 Cover Description: ")
project = input("🦾 Static HTML: ")
template = input("🏛️ Custom Template: ")
script = input("🧑 Custom JS: ")
css = input("🤪 Custom CSS: ")
project = {
'title': title,
'slug': slug,
'date': date,
'categories': categories,
'url': url,
'git': git,
'pad': pad,
'cover': cover,
'cover_alt': cover_alt,
'project': project,
'template': template,
'script': script,
'css': css
}
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)
Loading…
Cancel
Save