improvements

2020
Dawid J. Kubis 5 years ago
parent 10ec3df58c
commit b0dd677cd5

@ -1,4 +1,11 @@
all: code site
site: site:
python3 site_gen.py python3 site_gen.py
.PHONY: site code:
python3 code_gen.py
.PHONY: site code

@ -41,14 +41,15 @@ def path_dict(files):
di[x].append(y) di[x].append(y)
return di return di
prefix = [] if __name__=='__main__':
if os.path.exists('PREFIX.md'): prefix = []
if os.path.exists('PREFIX.md'):
with open('PREFIX.md') as p: with open('PREFIX.md') as p:
prefix = p.readlines() prefix = p.readlines()
files = sorted([i[2:] for i in get_mds('.') if i != './README' and i != './PREFIX']) files = sorted([i[2:] for i in get_mds('.') if i != './README' and i != './PREFIX'])
with open('README.md', 'w') as f: with open('README.md', 'w') as f:
to_write = mkformat(files) to_write = mkformat(files)
to_write = [i + '\n' for i in to_write] to_write = [i + '\n' for i in to_write]
to_write = prefix + to_write to_write = prefix + to_write

Loading…
Cancel
Save