mirror of
https://github.com/alvierahman90/gronk.git
synced 2024-12-22 20:11:59 +00:00
update gronk_add_uuid.py
This commit is contained in:
parent
b61f1ba3b2
commit
36f40f3269
21
gronk_add_uuid.py
Executable file → Normal file
21
gronk_add_uuid.py
Executable file → Normal file
@ -1,11 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import editfrontmatter
|
||||
import frontmatter
|
||||
|
||||
import pathlib
|
||||
import sys
|
||||
import uuid
|
||||
|
||||
|
||||
import editfrontmatter
|
||||
import frontmatter
|
||||
|
||||
def get_args():
|
||||
""" Get command line arguments """
|
||||
|
||||
@ -19,13 +22,13 @@ def get_args():
|
||||
|
||||
def main(args):
|
||||
""" Entry point for script """
|
||||
template_str= [
|
||||
"author: {{ author }}"
|
||||
"date: {{ date }}"
|
||||
"title: {{ title }}"
|
||||
"tags: {{ tags }}"
|
||||
"uuid: {{ uuid }}"
|
||||
].join("\n")
|
||||
template_str= "\n".join([
|
||||
"author: {{ author }}"
|
||||
"date: {{ date }}"
|
||||
"title: {{ title }}"
|
||||
"tags: {{ tags }}"
|
||||
"uuid: {{ uuid }}"
|
||||
])
|
||||
|
||||
with open(args.filename) as fp:
|
||||
fm_pre = frontmatter.load(fp)
|
||||
|
Loading…
Reference in New Issue
Block a user