|
@@ -330,7 +330,8 @@ class RefreshDyncode(LodelScript):
|
330
|
330
|
"""
|
331
|
331
|
LodelContext.expose_modules(globals(), {
|
332
|
332
|
'lodel.settings': ['Settings'],
|
333
|
|
- 'lodel.editorial_model.model': ['EditorialModel']})
|
|
333
|
+ 'lodel.editorial_model.model': ['EditorialModel'],
|
|
334
|
+ 'lodel.leapi.lefactory': 'lefactory'})
|
334
|
335
|
em_translator = Settings.editorialmodel.emtranslator
|
335
|
336
|
model_file = args.em
|
336
|
337
|
if len(args.em.strip()) == 0:
|
|
@@ -339,8 +340,8 @@ class RefreshDyncode(LodelScript):
|
339
|
340
|
#Model loaded
|
340
|
341
|
model = EditorialModel.load(em_translator, filename = model_file)
|
341
|
342
|
#Creating dyncode
|
342
|
|
- dyncode_file = Settings.editorial_model.dyncode
|
343
|
|
- dyncode_content = lefactory.dyncode_from(model)
|
|
343
|
+ dyncode_file = Settings.editorialmodel.dyncode
|
|
344
|
+ dyncode_content = lefactory.dyncode_from_em(model)
|
344
|
345
|
with open(dyncode_file, 'w+') as dfp:
|
345
|
346
|
dfp.write(dyncode_content)
|
346
|
347
|
print("Dyncode written in %s from em %s" % (dyncode_file, model_file))
|