Browse Source

Bugfixes in dyncode core_script

Yann Weber 7 years ago
parent
commit
f2a8578981
1 changed files with 4 additions and 3 deletions
  1. 4
    3
      lodel/plugin/core_scripts.py

+ 4
- 3
lodel/plugin/core_scripts.py View File

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

Loading…
Cancel
Save