From c1a1dc38318afb705854b7f21c447f75b3bdf784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 1 Jun 2022 18:01:47 +0200 Subject: Add support for author field. --- do.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/do.py b/do.py index d17a560..5ddc592 100755 --- a/do.py +++ b/do.py @@ -427,7 +427,6 @@ def main(): pass output = open(outfile, 'w') - name = pwd.getpwuid(os.getuid()).pw_gecos if mode == 'tex': @@ -542,6 +541,7 @@ def main(): options = { 'date': '\\today' if mode == 'tex' else f'{datetime.now():%Y-%m-%d}', 'mode': 'vimwiki', + 'author': pwd.getpwuid(os.getuid()).pw_gecos } # split the text into paragraph blocks @@ -568,7 +568,7 @@ def main(): output.write(f""" \\title{{{heading}}} \\date{{{options['date']}}} -\\author{{{name}}} +\\author{{{options['author']}}} \\begin{{document}} \\maketitle % \\tableofcontents -- cgit v1.2.3