author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Fri, 16 Oct 2009 14:37:11 +0200 | |
branch | stable |
changeset 3700 | fd550e4dc515 |
parent 2126 | a25859917ccc |
child 4212 | ab6573088b4a |
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 |
2126
a25859917ccc
stop using meta attribute from yams schema. Use instead sets defining meta relations and another defining schema types. Refactor various schema view based on this
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
11 |
from cubicweb.web.views.schema import SKIP_TYPES |
0 | 12 |
|
13 |
APPLROOT = abspath(join(dirname(abspath(__file__)), '..')) |
|
14 |
||
15 |
try: |
|
16 |
import custom |
|
17 |
except ImportError: |
|
18 |
sys.path.insert(0, APPLROOT) |
|
19 |
import custom |
|
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
20 |
|
0 | 21 |
|
22 |
schema = custom.SCHEMA |
|
23 |
skip_rels = ('owned_by', 'created_by', 'identity', 'is', 'is_instance_of') |
|
24 |
path = join(APPLROOT, 'data', 'schema.png') |
|
25 |
schema2dot.schema2dot(schema, path, #size=size, |
|
2126
a25859917ccc
stop using meta attribute from yams schema. Use instead sets defining meta relations and another defining schema types. Refactor various schema view based on this
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
26 |
skiptypes=SKIP_TYPES) |
0 | 27 |
print 'generated', path |
28 |
path = join(APPLROOT, 'data', 'metaschema.png') |
|
2126
a25859917ccc
stop using meta attribute from yams schema. Use instead sets defining meta relations and another defining schema types. Refactor various schema view based on this
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
29 |
schema2dot.schema2dot(schema, path) |
0 | 30 |
print 'generated', path |