diff --git a/llplenum b/llplenum
index 9f1546c..76f7eec 100755
--- a/llplenum
+++ b/llplenum
@@ -14,9 +14,8 @@ months = ["",
clipboard = subprocess.check_output(["xclip", "-out", "-selection", "clipboard"]).decode()
-m = re.match(
- r"# ([0-9][0-9]+)\. Plenum .+ ([0-9]{1,2})\. (" + "|".join(months[1:]) + ") (20[0-9]{2})",
- clipboard)
+m = re.match(r"# ([0-9][0-9]+)\. Plenum .+ ([0-9]{1,2})\. (" + "|".join(months[1:]) + ") (20[0-9]{2})",
+ clipboard)
if not m:
print("Error: Überschrift nicht erkannt.", file=sys.stderr)
sys.exit(1)
@@ -44,19 +43,14 @@ if month_later == 13:
month_name = month_name.lower()
earlier = "verein:plenum:{}_{}_{}".format(str(num - 1).rjust(3, "0"),
- months[month_earlier].lower(),
+ months[month_earlier].lower().replace("ä", "ae"),
year_earlier)
later = "verein:plenum:{}_{}_{}".format(str(num + 1).rjust(3, "0"),
- months[month_later].lower(),
+ months[month_later].lower().replace("ä", "ae"),
year_later)
-links = "[⇐ vorheriges Plenum]({}) | [nächstes Plenum ⇒]({})".format(earlier,
- later)
-
+links = "[⇐ vorheriges Plenum]({}) | [nächstes Plenum ⇒]({})".format(earlier, later)
markdown = "{}\n\n{}".format(links, clipboard)
-pandoc_output = subprocess.check_output(["pandoc", "-f", "markdown", "-t", "dokuwiki"],
- input=markdown.encode()).decode()
-replaced = pandoc_output.replace("[x]",
- "☑").replace("[ ]",
- "☐")
+output = f"\n\n{markdown}"
+replaced = output.replace("[x]", "☑").replace("[ ]", "☐")
subprocess.run(["xclip", "-in", "-selection", "clipboard"], input=replaced.encode())
print("Dokuwiki-Code kopiert.")