1 # Author: David Goodger |
1 # Author: David Goodger |
|
2 # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
|
3 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
|
4 # |
|
5 # This file is part of CubicWeb. |
|
6 # |
|
7 # CubicWeb is free software: you can redistribute it and/or modify it under the |
|
8 # terms of the GNU Lesser General Public License as published by the Free |
|
9 # Software Foundation, either version 2.1 of the License, or (at your option) |
|
10 # any later version. |
|
11 # |
|
12 # logilab-common is distributed in the hope that it will be useful, but WITHOUT |
|
13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
|
14 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
|
15 # details. |
|
16 # |
|
17 # You should have received a copy of the GNU Lesser General Public License along |
|
18 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
2 """ |
19 """ |
3 |
20 |
4 :organization: Logilab |
|
5 :copyright: 2001-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
|
6 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
|
7 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
|
8 """ |
21 """ |
9 # Contact: goodger@users.sourceforge.net |
22 # Contact: goodger@users.sourceforge.net |
10 # Revision: $Revision: 1.2 $ |
23 # Revision: $Revision: 1.2 $ |
11 # Date: $Date: 2005-07-04 16:36:50 $ |
24 # Date: $Date: 2005-07-04 16:36:50 $ |
12 # Copyright: This module has been placed in the public domain. |
25 # Copyright: This module has been placed in the public domain. |
22 http://cvs.zope.org/Zope/lib/python/docutils/writers/Attic/html4zope.py?rev=1.1.2.2&only_with_tag=ajung-restructuredtext-integration-branch&content-type=text/vnd.viewcvs-markup |
35 http://cvs.zope.org/Zope/lib/python/docutils/writers/Attic/html4zope.py?rev=1.1.2.2&only_with_tag=ajung-restructuredtext-integration-branch&content-type=text/vnd.viewcvs-markup |
23 """ |
36 """ |
24 |
37 |
25 __docformat__ = 'reStructuredText' |
38 __docformat__ = 'reStructuredText' |
26 |
39 |
|
40 import os |
|
41 |
27 from logilab.mtconverter import xml_escape |
42 from logilab.mtconverter import xml_escape |
28 |
43 |
29 from docutils import nodes |
44 from docutils import nodes |
30 from docutils.writers.html4css1 import Writer as CSS1Writer |
45 from docutils.writers.html4css1 import Writer as CSS1Writer |
31 from docutils.writers.html4css1 import HTMLTranslator as CSS1HTMLTranslator |
46 from docutils.writers.html4css1 import HTMLTranslator as CSS1HTMLTranslator |
32 import os |
|
33 |
47 |
34 default_level = int(os.environ.get('STX_DEFAULT_LEVEL', 3)) |
48 default_level = int(os.environ.get('STX_DEFAULT_LEVEL', 3)) |
35 |
49 |
36 class Writer(CSS1Writer): |
50 class Writer(CSS1Writer): |
37 """css writer using our html translator""" |
51 """css writer using our html translator""" |