fsfi

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 9691dd9533ec01f07010e373c5a36906738a4d08
parent de28e88a8d4d5fbef16f76808f493b17240a8ae0
Author: rsiddharth <s@ricketyspace.net>
Date:   Tue, 14 May 2019 19:49:19 -0400

bin/news: Add slug.

Diffstat:
bin/news | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/bin/news b/bin/news @@ -33,6 +33,15 @@ def read(f): return c +def slug(p): + m = re.search(r'([a-zA-Z\-]+)\.md', p) + + if not m: + err('Unable to get slug') + + return m.group(1) + + def title(c): m = re.search(r'^\# (.+)$', c, re.M)