author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Wed, 27 May 2009 15:00:38 +0200 | |
branch | stable |
changeset 1963 | c97c03082de9 |
parent 1802 | d628defebc17 |
child 1977 | 606923dff11b |
permissions | -rw-r--r-- |
0 | 1 |
import sys |
2 |
from os.path import dirname, abspath, join |
|
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
3 |
from yams import schema2dot |
0 | 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 |
|
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
12 |
|
0 | 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 |