Add draft and src folders to lexicon folder

This commit is contained in:
Tim Van Baak 2020-02-21 07:08:51 -08:00
parent ef9fe5c0e2
commit c6cfe25e6d

View File

@ -54,6 +54,10 @@ def create_lexicon(name, editor):
cfg['editor'] = editor.uid
cfg['time']['created'] = int(time.time())
# Create subdirectories
os.mkdir(prepend(lex_dir, 'draft'))
os.mkdir(prepend(lex_dir, 'src'))
# Update the index with the new lexicon
with json_rw('lexicon', 'index.json') as index:
index[name] = lid