diff options
author | rsiddharth <s@ricketyspace.net> | 2019-07-06 13:31:53 -0400 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2019-07-06 13:31:53 -0400 |
commit | 1464952fa984be6faa3009787a927b586cd079b8 (patch) | |
tree | 0397123d635253b1a127e43bcb0773f1b6637ee1 | |
parent | b3fe38f953fb2d9d1861566da2e54483d4fad558 (diff) |
bin/html: Update write.
* bin/html (write): Set permission on file.
-rw-r--r-- | bin/html | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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) |