1 import sys |
1 import sys |
2 from os.path import dirname, abspath, join |
2 from os.path import dirname, abspath, join |
3 from yams import schema2dot |
3 from yams import schema2dot |
4 |
4 |
5 APPLROOT = abspath(join(dirname(abspath(__file__)), '..')) |
5 APPLROOT = abspath(join(dirname(abspath(__file__)), '..')) |
6 |
6 |
7 try: |
7 try: |
8 import custom |
8 import custom |
9 except ImportError: |
9 except ImportError: |
10 sys.path.insert(0, APPLROOT) |
10 sys.path.insert(0, APPLROOT) |
11 import custom |
11 import custom |
12 |
12 |
13 |
13 |
14 schema = custom.SCHEMA |
14 schema = custom.SCHEMA |
15 skip_rels = ('owned_by', 'created_by', 'identity', 'is', 'is_instance_of') |
15 skip_rels = ('owned_by', 'created_by', 'identity', 'is', 'is_instance_of') |
16 path = join(APPLROOT, 'data', 'schema.png') |
16 path = join(APPLROOT, 'data', 'schema.png') |
17 schema2dot.schema2dot(schema, path, #size=size, |
17 schema2dot.schema2dot(schema, path, #size=size, |