summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-06-01 18:01:47 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-06-01 18:01:47 +0200
commitc1a1dc38318afb705854b7f21c447f75b3bdf784 (patch)
treebc9f4dfb1df03d546eccc4ca3248b8e07de04eb4
parentPlace main in procedure. (diff)
downloadvimwiki-scripts-c1a1dc38318afb705854b7f21c447f75b3bdf784.tar.gz
vimwiki-scripts-c1a1dc38318afb705854b7f21c447f75b3bdf784.tar.xz
Add support for author field.
-rwxr-xr-xdo.py4
1 files 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