No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

refreshdyn.py 527B

12345678910111213141516171819
  1. # -*- coding: utf-8 -*-
  2. ## @package refreshdyn Python script designed to generate dynamic API
  3. # @see leapi.lefactory
  4. import sys
  5. from EditorialModel.model import Model
  6. from leapi.lefactory import LeFactory
  7. from EditorialModel.backend.json_backend import EmBackendJson
  8. OUTPUT = 'leapi/dyn.py' if len(sys.argv) == 1 else sys.argv[1]
  9. EMJSON = 'EditorialModel/test/me.json' if len(sys.argv) < 3 else sys.argv[2]
  10. em = Model(EmBackendJson(EMJSON))
  11. fact = LeFactory(OUTPUT)
  12. fact.create_pyfile(em)
  13. print(fact.generate_python(em))