author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Thu, 02 Jul 2009 12:57:11 +0200 | |
branch | stable |
changeset 2240 | ff84892900ac |
parent 1977 | 606923dff11b |
child 2126 | a25859917ccc |
permissions | -rw-r--r-- |
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
1 |
""" |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
2 |
|
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
3 |
:organization: Logilab |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
4 |
:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
5 |
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
6 |
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
7 |
""" |
0 | 8 |
import sys |
9 |
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
|
10 |
from yams import schema2dot |
0 | 11 |
|
12 |
APPLROOT = abspath(join(dirname(abspath(__file__)), '..')) |
|
13 |
||
14 |
try: |
|
15 |
import custom |
|
16 |
except ImportError: |
|
17 |
sys.path.insert(0, APPLROOT) |
|
18 |
import custom |
|
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
19 |
|
0 | 20 |
|
21 |
schema = custom.SCHEMA |
|
22 |
skip_rels = ('owned_by', 'created_by', 'identity', 'is', 'is_instance_of') |
|
23 |
path = join(APPLROOT, 'data', 'schema.png') |
|
24 |
schema2dot.schema2dot(schema, path, #size=size, |
|
25 |
skiprels=skip_rels, skipmeta=True) |
|
26 |
print 'generated', path |
|
27 |
path = join(APPLROOT, 'data', 'metaschema.png') |
|
28 |
schema2dot.schema2dot(schema, path, #size=size, |
|
29 |
skiprels=skip_rels, skipmeta=False) |
|
30 |
print 'generated', path |