🎨 make the markdown file configuration explicit
This commit is contained in:
@@ -53,7 +53,7 @@ def main():
|
||||
"""Add a new comic entry with defaults"""
|
||||
parser = argparse.ArgumentParser(description='Add a new comic entry to comics_data.py')
|
||||
parser.add_argument('-m', '--markdown', action='store_true',
|
||||
help='Generate a markdown file for author notes')
|
||||
help='Generate a markdown file for author notes and add author_note_md field to comic entry')
|
||||
args = parser.parse_args()
|
||||
|
||||
# Get next number
|
||||
@@ -77,7 +77,16 @@ def main():
|
||||
content = f.read()
|
||||
|
||||
# Format new entry
|
||||
entry_str = f""" {{
|
||||
if args.markdown:
|
||||
entry_str = f""" {{
|
||||
'number': {comic['number']},
|
||||
'filename': {repr(comic['filename'])},
|
||||
'date': {repr(comic['date'])},
|
||||
'alt_text': {repr(comic['alt_text'])},
|
||||
'author_note_md': {repr(comic['date'] + '.md')}
|
||||
}}"""
|
||||
else:
|
||||
entry_str = f""" {{
|
||||
'number': {comic['number']},
|
||||
'filename': {repr(comic['filename'])},
|
||||
'date': {repr(comic['date'])},
|
||||
|
||||
Reference in New Issue
Block a user