equal
deleted
inserted
replaced
|
1 import sys |
|
2 from os.path import dirname, abspath, join |
|
3 from yams import schema2dot |
|
4 |
|
5 APPLROOT = abspath(join(dirname(abspath(__file__)), '..')) |
|
6 |
|
7 try: |
|
8 import custom |
|
9 except ImportError: |
|
10 sys.path.insert(0, APPLROOT) |
|
11 import custom |
|
12 |
|
13 |
|
14 schema = custom.SCHEMA |
|
15 skip_rels = ('owned_by', 'created_by', 'identity', 'is', 'is_instance_of') |
|
16 path = join(APPLROOT, 'data', 'schema.png') |
|
17 schema2dot.schema2dot(schema, path, #size=size, |
|
18 skiprels=skip_rels, skipmeta=True) |
|
19 print 'generated', path |
|
20 path = join(APPLROOT, 'data', 'metaschema.png') |
|
21 schema2dot.schema2dot(schema, path, #size=size, |
|
22 skiprels=skip_rels, skipmeta=False) |
|
23 print 'generated', path |