updates
This commit is contained in:
@@ -8,11 +8,10 @@ from logger import logger
|
||||
def create_content(filename):
|
||||
filename = Path(f"{Config.CONTENT_DIR}/{filename}.md")
|
||||
if not filename.exists():
|
||||
fh = DefaultFrontmatterHeader(filename.stem)
|
||||
logger.debug(f"Creating new content {filename}")
|
||||
with filename.open("w", encoding="utf-8") as f:
|
||||
f.writelines(['---\n', fh.title, fh.date, fh.description, fh.author, fh.omit_second_title, '---\n', '\n', '\n'])
|
||||
|
||||
new_content_item = ContentItem(filename)
|
||||
new_content_item.create_content()
|
||||
|
||||
def edit_content(filename):
|
||||
logger.debug(f"Editing content {filename}")
|
||||
editor = os.environ.get('EDITOR', 'vim')
|
||||
|
||||
Reference in New Issue
Block a user