From 736c90e1616ec3c0834425d9e3a227f226e238a1 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Tue, 14 May 2019 20:39:10 -0400 Subject: bin/news: Add html. * bin/news (html): New function. --- bin/news | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'bin') diff --git a/bin/news b/bin/news index 6b75443..e0ca882 100644 --- a/bin/news +++ b/bin/news @@ -92,6 +92,15 @@ def markdown(c): return r.stdout +def html(t, d, c): + h = template('news') + h = h.replace(PH['title'], t, 2) + h = h.replace(PH['date'], datefmt(d), 1) + h = h.replace(PH['content'], markdown(c), 1) + + return h + + def process(f): c = read(f.path) -- cgit v1.2.3