summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-09-18 01:06:48 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-09-18 01:06:48 +0200
commit77cf539b842ba3941b62caa932118b54270af46e (patch)
tree4885497983610511c55f74dbe8cad8ccb01aa04b
parentHandle inline links. (diff)
downloadvimwiki-scripts-77cf539b842ba3941b62caa932118b54270af46e.tar.gz
vimwiki-scripts-77cf539b842ba3941b62caa932118b54270af46e.tar.xz
Now takes any heading.
-rwxr-xr-xdo.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/do.py b/do.py
index 476c6d2..b1e5722 100755
--- a/do.py
+++ b/do.py
@@ -23,7 +23,7 @@ def get_heading(name, data):
return tail
-[_, infile, *rest] = sys.argv
+[_, infile, heading, *rest] = sys.argv
file = open(infile, 'r')
data = file.read()
@@ -41,7 +41,7 @@ output.write(f'''
\\usepackage{{verbatim}}
\\usepackage{{fullpage}}
-\\title{{Lysator Möte 1}}
+\\title{{{heading}}}
\\date\\today
\\author{{{name}}}
\\begin{{document}}
@@ -50,7 +50,7 @@ output.write(f'''
# '\\verbatiminput
-page1 = get_heading('Möte 1', data)
+page1 = get_heading(heading, data)
# bilagor = get_heading('Bilagor', page1).strip().split('\n')
r = "\\[\\[([^|#\\]]*)(?:#([^|\\]]*))?(?:[|]([^\\]]*))?\\]\\]"
bilagor = re.findall(r, page1)