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
1 changed files with 4 additions and 0 deletions

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