summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/news14
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/news b/bin/news
index 09a57f8..6b75443 100644
--- a/bin/news
+++ b/bin/news
@@ -8,6 +8,7 @@
import datetime
import os
import re
+import subprocess as subp
import sys
@@ -78,6 +79,19 @@ def datefmt(d):
return datetime.datetime.strptime(d, '%Y%m%d').strftime('%B %d, %Y')
+def markdown(c):
+ try:
+ r = subp.run(['bin/markdown'],
+ input=c,
+ stdout=subp.PIPE,
+ check=True,
+ universal_newlines=True)
+ except Exception as e:
+ p('Markdown failed for {}'.format(c))
+
+ return r.stdout
+
+
def process(f):
c = read(f.path)