diff options
author | rsiddharth <s@ricketyspace.net> | 2019-05-14 20:39:10 -0400 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2019-05-14 20:39:10 -0400 |
commit | 736c90e1616ec3c0834425d9e3a227f226e238a1 (patch) | |
tree | 5566bb3db55597003bd53b101715f4ab73eec667 /bin | |
parent | ba498ef4d82672767d5b37d007d55a060955f14a (diff) |
bin/news: Add html.
* bin/news (html): New function.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/news | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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) |