MPL refmanul: fix copyrights, move all build files in the _build dir
[SVN r55621]
This commit is contained in:
1 parent
5a2abc4d58
commit
0efce8938c
233 files changed
+1176
-1167
No files matched your search
+21
@@ -0,0 +1,21 @@
|
||||
|
||||
# Copyright Aleksey Gurtovoy 2009
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
from docutils.parsers.rst import Directive
|
||||
from docutils import nodes
|
||||
|
||||
|
||||
class license_and_copyright( nodes.General, nodes.Element ): pass
|
||||
|
||||
class LicenseAndCopyright( Directive ):
|
||||
has_content = True
|
||||
|
||||
def run( self ):
|
||||
self.assert_has_content()
|
||||
result_node = license_and_copyright( rawsource = '\n'.join( self.content ) )
|
||||
self.state.nested_parse( self.content, self.content_offset, result_node )
|
||||
return [ result_node ]
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# Copyright Aleksey Gurtovoy 2007-2008
|
||||
# Copyright Aleksey Gurtovoy 2007-2009
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -16,8 +16,9 @@ setup(
|
||||
description="convert C++ rst documentation to a set of HTML pages/frames.",
|
||||
author="Aleksey Gurtovoy",
|
||||
author_email="agurtovoy@meta-comm.com",
|
||||
packages=['docutils.writers.html4_refdoc'],
|
||||
package_dir={'docutils.writers.html4_refdoc': 'writers/html4_refdoc'},
|
||||
packages=['docutils.writers.html4_refdoc', 'docutils.parsers.rst.directives'],
|
||||
package_dir={'docutils.writers.html4_refdoc': 'writers/html4_refdoc'
|
||||
,'docutils.parsers.rst.directives': 'parsers/rst/directives' },
|
||||
package_data={'docutils.writers.html4_refdoc': ['frames.css']},
|
||||
scripts=["tools/rst2htmlrefdoc.py"],
|
||||
)
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# Copyright Aleksey Gurtovoy 2004-2008
|
||||
# Copyright Aleksey Gurtovoy 2004-2009
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -13,8 +13,11 @@ try:
|
||||
except:
|
||||
pass
|
||||
|
||||
from docutils.core import publish_cmdline, default_description
|
||||
from docutils.parsers.rst import directives
|
||||
from docutils.parsers.rst.directives import htmlrefdoc
|
||||
directives.register_directive( 'copyright', htmlrefdoc.LicenseAndCopyright )
|
||||
|
||||
from docutils.core import publish_cmdline, default_description
|
||||
|
||||
description = ('Generates "framed" (X)HTML documents from standalone reStructuredText '
|
||||
'sources. ' + default_description)
|
||||
|
||||
@@ -134,6 +134,17 @@ class refdoc_translator(html4_frames.frame_pages_translator):
|
||||
self.in_literal_block = False
|
||||
|
||||
|
||||
def visit_license_and_copyright(self, node):
|
||||
self = self.active_visitor()
|
||||
self.context.append( len( self.body ) )
|
||||
|
||||
def depart_license_and_copyright(self, node):
|
||||
self = self.active_visitor()
|
||||
start = self.context.pop()
|
||||
self.footer = self.body[start:]
|
||||
del self.body[start:]
|
||||
|
||||
|
||||
def visit_Text(self, node):
|
||||
if not self.in_literal_block:
|
||||
self.__super.visit_Text(self, node)
|
||||
@@ -161,8 +172,19 @@ class refdoc_translator(html4_frames.frame_pages_translator):
|
||||
print 'Unresolved substitution_reference:', node.astext()
|
||||
raise nodes.SkipNode
|
||||
|
||||
def _handle_depart_page(self, translator, node):
|
||||
pass
|
||||
|
||||
def _footer_content(self):
|
||||
self = self.active_visitor()
|
||||
parts = ''.join( self.footer ).split( '\n' )
|
||||
parts = [ '<div class="copyright">%s</div>' % x if x.startswith( 'Copyright' ) else x for x in parts ]
|
||||
return '<td><div class="copyright-footer">%s</div></td>' % '\n'.join( parts ) if len( parts ) else ''
|
||||
|
||||
|
||||
def _toc_as_text( self, visitor ):
|
||||
footer_end = visitor.body.pop()
|
||||
visitor.body.append( self._footer_content() )
|
||||
visitor.body.append( footer_end )
|
||||
return visitor.astext()
|
||||
|
||||
|
||||
def _handle_include_sub(base, self, match):
|
||||
|
||||
Reference in new issue
Block a user