From 1464952fa984be6faa3009787a927b586cd079b8 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sat, 6 Jul 2019 13:31:53 -0400 Subject: bin/html: Update write. * bin/html (write): Set permission on file. --- bin/html | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bin/html') diff --git a/bin/html b/bin/html index 80548b3..1c896b9 100644 --- a/bin/html +++ b/bin/html @@ -9,6 +9,7 @@ import datetime import os import os.path import re +import stat as st import subprocess as subp import sys @@ -66,6 +67,10 @@ def write(p, c): with open(p, 'w') as f: f.write(c) + os.chmod(p, st.S_IRUSR | st.S_IWUSR | st.S_IXUSR + | st.S_IRGRP | st.S_IXGRP + | st.S_IROTH | st.S_IXOTH) + def slug(p): m = re.search(r'([a-zA-Z\-]+)\.md', p) -- cgit v1.2.3