update gronk_add_uuid.py
This commit is contained in:
parent
b61f1ba3b2
commit
36f40f3269
11
gronk_add_uuid.py
Executable file → Normal file
11
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= [
|
||||
template_str= "\n".join([
|
||||
"author: {{ author }}"
|
||||
"date: {{ date }}"
|
||||
"title: {{ title }}"
|
||||
"tags: {{ tags }}"
|
||||
"uuid: {{ uuid }}"
|
||||
].join("\n")
|
||||
])
|
||||
|
||||
with open(args.filename) as fp:
|
||||
fm_pre = frontmatter.load(fp)
|
||||
|
Reference in New Issue
Block a user