Fix article folder not being created
This commit is contained in:
parent
44bb51f0a1
commit
d0f57c85ce
|
@ -50,14 +50,14 @@ def prepend(*path):
|
|||
joined = os.path.join(CONFIG_DIR, joined)
|
||||
return joined
|
||||
|
||||
def open_sh(*path, mode):
|
||||
return amanuensis.config.loader.open_sh(prepend(*path), mode)
|
||||
def open_sh(*path, **kwargs):
|
||||
return amanuensis.config.loader.open_sh(prepend(*path), **kwargs)
|
||||
|
||||
def open_ex(*path, mode):
|
||||
return amanuensis.config.loader.open_ex(prepend(*path), mode)
|
||||
def open_ex(*path, **kwargs):
|
||||
return amanuensis.config.loader.open_ex(prepend(*path), **kwargs)
|
||||
|
||||
def json_ro(*path):
|
||||
return amanuensis.config.loader.json_ro(prepend(*path))
|
||||
def json_ro(*path, **kwargs):
|
||||
return amanuensis.config.loader.json_ro(prepend(*path), **kwargs)
|
||||
|
||||
def json_rw(*path):
|
||||
return amanuensis.config.loader.json_rw(prepend(*path))
|
||||
def json_rw(*path, **kwargs):
|
||||
return amanuensis.config.loader.json_rw(prepend(*path), **kwargs)
|
||||
|
|
|
@ -55,9 +55,13 @@ def create_lexicon(name, editor):
|
|||
cfg['editor'] = editor.uid
|
||||
cfg['time']['created'] = int(time.time())
|
||||
|
||||
with json_rw(lex_dir, 'info.json', new=True) as info:
|
||||
pass
|
||||
|
||||
# Create subdirectories
|
||||
os.mkdir(prepend(lex_dir, 'draft'))
|
||||
os.mkdir(prepend(lex_dir, 'src'))
|
||||
os.mkdir(prepend(lex_dir, 'article'))
|
||||
|
||||
# Update the index with the new lexicon
|
||||
with json_rw('lexicon', 'index.json') as index:
|
||||
|
|
Loading…
Reference in New Issue