From 15a88074e98731052c61705778e2675332207e8c Mon Sep 17 00:00:00 2001 From: Lumither Tao Date: Mon, 14 Apr 2025 15:41:31 -0700 Subject: [PATCH] feat(cli::template) update post template --- client/templates/post.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/client/templates/post.py b/client/templates/post.py index 6e116f0..d500c83 100644 --- a/client/templates/post.py +++ b/client/templates/post.py @@ -10,13 +10,14 @@ from utils.lang import eprint, wprint POST_TEMPLATE = ''' --- +uuid: {{ uuid }} title: {{ title }} subtitle: {{ subtitle }} -published_date: {{ published_date }} -last_updated: {{ last_update }} +status: {{ status }} +date: {{ date }} +update: {{ update }} category: {{ category }} tags: {{ tags }} -uuid: {{ uuid }} --- WIP @@ -38,9 +39,9 @@ def get_subtitle(): return input("subtitle > ") -def get_published_date(): +def get_date(): while True: - d = input("published_date (YYYY-MM-DD) > ") + d = input("date (YYYY-MM-DD) > ") if d == "": wprint("using today's date") return dt.today().strftime("%Y-%m-%d") @@ -78,8 +79,8 @@ class BlogPost(Template): index_md = POST_TEMPLATE.format( title=get_title(), subtitle=get_subtitle(), - published_date=get_published_date(), - last_update=dt.today().strftime("%Y-%m-%d"), + date=get_date(), + update=dt.today().strftime("%Y-%m-%d"), tags=get_tags(), category=get_category(), uuid=uuid.uuid4()