Start fleshing out build script
This commit is contained in:
parent
0b8b77697b
commit
4e64d9e340
4 changed files with 149 additions and 12 deletions
24
templating/internal/units.py
Normal file
24
templating/internal/units.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
"""Contains all the units for the spec."""
|
||||
from . import AccessKeyStore
|
||||
import os
|
||||
|
||||
def _load_examples():
|
||||
path = "../event-schemas/examples"
|
||||
examples = {}
|
||||
for filename in os.listdir(path):
|
||||
with open(filename, "r") as f:
|
||||
print filename
|
||||
return examples
|
||||
|
||||
|
||||
UNIT_DICT = {
|
||||
"event-examples": _load_examples
|
||||
}
|
||||
|
||||
|
||||
def load():
|
||||
store = AccessKeyStore()
|
||||
for unit_key in UNIT_DICT:
|
||||
unit = UNIT_DICT[unit_key]()
|
||||
store.add(unit_key, unit)
|
||||
return store
|
Loading…
Add table
Add a link
Reference in a new issue