Mercurial > babel > old > mirror
changeset 238:d75cfd01f218
Documentation stuff moved to a shared repository.
author | cmlenz |
---|---|
date | Tue, 07 Aug 2007 13:07:37 +0000 |
parents | 1e2f17433085 |
children | 4c5fc8879d03 |
files | doc/conf/docutils.ini doc/conf/epydoc.ini doc/index.txt doc/style/bkgnd_pattern.png doc/style/docutils.css doc/style/edgewall.css doc/style/epydoc.css doc/style/pygments.css doc/style/shadow.gif doc/style/vertbars.png setup.py |
diffstat | 11 files changed, 8 insertions(+), 666 deletions(-) [+] |
line wrap: on
line diff
deleted file mode 100644 --- a/doc/conf/docutils.ini +++ /dev/null @@ -1,9 +0,0 @@ -[general] -input_encoding = utf-8 -strip_comments = yes -toc_backlinks = none - -[html4css1 writer] -embed_stylesheet = no -stylesheet = style/edgewall.css -xml_declaration = no
deleted file mode 100644 --- a/doc/conf/epydoc.ini +++ /dev/null @@ -1,24 +0,0 @@ -[epydoc] - -name: Documentation Index -url: ../index.html -modules: babel -verbosity: 1 - -# Extraction -docformat: restructuredtext -parse: yes -introspect: yes -exclude: .*\.tests.* -inheritance: listed -private: no -imports: no -include-log: no - -# HTML output -output: html -target: doc/api/ -css: doc/style/epydoc.css -top: babel -frames: no -sourcecode: no
--- a/doc/index.txt +++ b/doc/index.txt @@ -1,8 +1,8 @@ .. -*- mode: rst; encoding: utf-8 -*- -===== -Babel -===== +======= +Preface +======= .. image:: logo.png :width: 426
deleted file mode 100644 index 90e92682135d3f7213332f870f973bd06d6d57ee..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 GIT binary patch literal 0 Hc$@<O00001
deleted file mode 100644 --- a/doc/style/docutils.css +++ /dev/null @@ -1,277 +0,0 @@ -/* -:Author: David Goodger -:Contact: goodger@users.sourceforge.net -:Date: $Date: 2005-12-18 01:56:14 +0100 (Sun, 18 Dec 2005) $ -:Revision: $Revision: 4224 $ -:Copyright: This stylesheet has been placed in the public domain. - -Default cascading style sheet for the HTML output of Docutils. - -See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to -customize this style sheet. -*/ - -/* used to remove borders from tables and images */ -.borderless, table.borderless td, table.borderless th { - border: 0 } - -table.borderless td, table.borderless th { - /* Override padding for "table.docutils td" with "! important". - The right padding separates the table cells. */ - padding: 0 0.5em 0 0 ! important } - -.first { - /* Override more specific margin styles with "! important". */ - margin-top: 0 ! important } - -.last, .with-subtitle { - margin-bottom: 0 ! important } - -.hidden { - display: none } - -a.toc-backref { - text-decoration: none ; - color: black } - -blockquote.epigraph { - margin: 2em 5em ; } - -dl.docutils dd { - margin-bottom: 0.5em } - -dl.docutils dt { - font-weight: bold } - -div.abstract { - margin: 2em 5em } - -div.abstract p.topic-title { - font-weight: bold ; - text-align: center } - -div.admonition, div.attention, div.caution, div.danger, div.error, -div.hint, div.important, div.note, div.tip, div.warning { - margin: 2em ; - border: medium outset ; - padding: 1em } - -div.admonition p.admonition-title, div.hint p.admonition-title, -div.important p.admonition-title, div.note p.admonition-title, -div.tip p.admonition-title { - font-weight: bold ; - font-family: sans-serif } - -div.attention p.admonition-title, div.caution p.admonition-title, -div.danger p.admonition-title, div.error p.admonition-title, -div.warning p.admonition-title { - color: red ; - font-weight: bold ; - font-family: sans-serif } - -/* Uncomment (and remove this text!) to get reduced vertical space in - compound paragraphs. -div.compound .compound-first, div.compound .compound-middle { - margin-bottom: 0.5em } - -div.compound .compound-last, div.compound .compound-middle { - margin-top: 0.5em } -*/ - -div.dedication { - margin: 2em 5em ; - text-align: center ; - font-style: italic } - -div.dedication p.topic-title { - font-weight: bold ; - font-style: normal } - -div.figure { - margin-left: 2em ; - margin-right: 2em } - -div.footer, div.header { - clear: both; - font-size: smaller } - -div.line-block { - display: block ; - margin-top: 1em ; - margin-bottom: 1em } - -div.line-block div.line-block { - margin-top: 0 ; - margin-bottom: 0 ; - margin-left: 1.5em } - -div.sidebar { - margin-left: 1em ; - border: medium outset ; - padding: 1em ; - background-color: #ffffee ; - width: 40% ; - float: right ; - clear: right } - -div.sidebar p.rubric { - font-family: sans-serif ; - font-size: medium } - -div.system-messages { - margin: 5em } - -div.system-messages h1 { - color: red } - -div.system-message { - border: medium outset ; - padding: 1em } - -div.system-message p.system-message-title { - color: red ; - font-weight: bold } - -div.topic { - margin: 2em } - -h1.section-subtitle, h2.section-subtitle, h3.section-subtitle, -h4.section-subtitle, h5.section-subtitle, h6.section-subtitle { - margin-top: 0.4em } - -h1.title { - text-align: center } - -h2.subtitle { - text-align: center } - -hr.docutils { - width: 75% } - -img.align-left { - clear: left } - -img.align-right { - clear: right } - -ol.simple, ul.simple { - margin-bottom: 1em } - -ol.arabic { - list-style: decimal } - -ol.loweralpha { - list-style: lower-alpha } - -ol.upperalpha { - list-style: upper-alpha } - -ol.lowerroman { - list-style: lower-roman } - -ol.upperroman { - list-style: upper-roman } - -p.attribution { - text-align: right ; - margin-left: 50% } - -p.caption { - font-style: italic } - -p.credits { - font-style: italic ; - font-size: smaller } - -p.label { - white-space: nowrap } - -p.rubric { - font-weight: bold ; - font-size: larger ; - color: maroon ; - text-align: center } - -p.sidebar-title { - font-family: sans-serif ; - font-weight: bold ; - font-size: larger } - -p.sidebar-subtitle { - font-family: sans-serif ; - font-weight: bold } - -p.topic-title { - font-weight: bold } - -pre.address { - margin-bottom: 0 ; - margin-top: 0 ; - font-family: serif ; - font-size: 100% } - -pre.literal-block, pre.doctest-block { - margin-left: 2em ; - margin-right: 2em ; - background-color: #eeeeee } - -span.classifier { - font-family: sans-serif ; - font-style: oblique } - -span.classifier-delimiter { - font-family: sans-serif ; - font-weight: bold } - -span.interpreted { - font-family: sans-serif } - -span.option { - white-space: nowrap } - -span.pre { - white-space: pre } - -span.problematic { - color: red } - -span.section-subtitle { - /* font-size relative to parent (h1..h6 element) */ - font-size: 80% } - -table.citation { - border-left: solid 1px gray; - margin-left: 1px } - -table.docinfo { - margin: 2em 4em } - -table.docutils { - margin-top: 0.5em ; - margin-bottom: 0.5em } - -table.footnote { - border-left: solid 1px black; - margin-left: 1px } - -table.docutils td, table.docutils th, -table.docinfo td, table.docinfo th { - padding-left: 0.5em ; - padding-right: 0.5em ; - vertical-align: top } - -table.docutils th.field-name, table.docinfo th.docinfo-name { - font-weight: bold ; - text-align: left ; - white-space: nowrap ; - padding-left: 0 } - -h1 tt.docutils, h2 tt.docutils, h3 tt.docutils, -h4 tt.docutils, h5 tt.docutils, h6 tt.docutils { - font-size: 100% } - -tt.docutils { - background-color: #eeeeee } - -ul.auto-toc { - list-style-type: none }
deleted file mode 100644 --- a/doc/style/edgewall.css +++ /dev/null @@ -1,77 +0,0 @@ -@import url(docutils.css); -@import url(pygments.css); - -html, body { height: 100%; margin: 0; padding: 0; } -html, body { background: #4b4d4d url(bkgnd_pattern.png); color: #000; } -body, th, td { - font: normal small Verdana,Arial,'Bitstream Vera Sans',Helvetica,sans-serif; -} -pre, code, tt { font-size: medium; } -h1, h2, h3, h4 { - border-bottom: 1px solid #ccc; - font-family: Arial,Verdana,'Bitstream Vera Sans',Helvetica,sans-serif; - font-weight: bold; letter-spacing: -0.018em; -} -h1 { font-size: 19px; margin: 2em 0 .5em; } -h2 { font-size: 16px; margin: 1.5em 0 .5em; } -h3 { font-size: 14px; margin: 1.2em 0 .5em; } -hr { border: none; border-top: 1px solid #ccb; margin: 2em 0; } -p { margin: 0 0 1em; } - -table { border: 1px solid #999; border-width: 0 1px 0 0; - border-collapse: separate; border-spacing: 0; -} -table thead th { background: #999; border: 1px solid #999;; color: #fff; - font-weight: bold; -} -table td { border: 1px solid #ccc; border-width: 0 0 1px 1px; padding: .3em; } - -:link, :visited { text-decoration: none; border-bottom: 1px dotted #bbb; - color: #b00; -} -:link:hover, :visited:hover { background-color: #eee; color: #555; } -:link img, :visited img { border: none } -h1 :link, h1 :visited ,h2 :link, h2 :visited, h3 :link, h3 :visited, -h4 :link, h4 :visited, h5 :link, h5 :visited, h6 :link, h6 :visited { - color: #000; -} - -div.document { background: #fff url(shadow.gif) right top repeat-y; - border-left: 1px solid #000; margin: 0 auto 0 40px; - min-height: 100%; width: 54em; padding: 0 180px 1px 20px; -} -h1.title, div.document#babel h1 { border: none; color: #666; - font-size: x-large; margin: 0 -20px 1em; padding: 2em 20px 0; -} -h1.title { background: url(vertbars.png) repeat-x; } -div.document#babel h1.title { text-indent: -4000px; } -div.document#babel h1 { text-align: center; } -pre.literal-block, div.highlight pre { background: #f4f4f4; - border: 1px solid #e6e6e6; color: #000; margin: 1em 1em; padding: .25em; - overflow: auto; -} - -div.contents { font-size: 90%; position: absolute; position: fixed; - margin-left: 80px; left: 60em; top: 30px; right: 0; -} -div.contents .topic-title { display: none; } -div.contents ul { list-style: none; padding-left: 0; } -div.contents :link, div.contents :visited { color: #c6c6c6; border: none; - display: block; padding: 3px 5px 3px 10px; -} -div.contents :link:hover, div.contents :visited:hover { background: #000; - color: #fff; -} - -div.admonition, div.attention, div.caution, div.danger, div.error, div.hint, -div.important, div.note, div.tip, div.warning { - border: none; color: #333; font-style: italic; margin: 1em 2em; -} -div.attention p.admonition-title, div.caution p.admonition-title, div.danger -p.admonition-title, div.error p.admonition-title, -div.warning p.admonition-title { - color: #b00; -} -p.admonition-title { margin-bottom: 0; text-transform: uppercase; } -tt.docutils { background-color: transparent; } -span.pre { white-space: normal; }
deleted file mode 100644 --- a/doc/style/epydoc.css +++ /dev/null @@ -1,136 +0,0 @@ -html { background: #4b4d4d url(../style/bkgnd_pattern.png); margin: 0; - padding: 1em 1em 3em; -} -body { background: #fff url(../style/vertbars.png) repeat-x; - border: 1px solid #000; color: #000; margin: 1em 0; padding: 0 1em 1em; -} -body, th, td { - font: normal small Verdana,Arial,'Bitstream Vera Sans',Helvetica,sans-serif; -} -h1, h2, h3, h4 { - font-family: Arial,Verdana,'Bitstream Vera Sans',Helvetica,sans-serif; - font-weight: bold; letter-spacing: -0.018em; -} -h1 { font-size: 19px; margin: 2em 0 .5em; } -h2 { font-size: 16px; margin: 1.5em 0 .5em; } -h3 { font-size: 14px; margin: 1.2em 0 .5em; } -hr { border: none; border-top: 1px solid #ccb; margin: 2em 0; } -p { margin: 0 0 1em; } -:link, :visited { text-decoration: none; border-bottom: 1px dotted #bbb; - color: #b00; -} -:link:hover, :visited:hover { background-color: #eee; color: #555; } - -table { border: none; border-collapse: collapse; } - -table.navbar { background: #000; color: #fff; margin: 2em 0 .33em; } -table.navbar th { border: 1px solid #000; font-weight: bold; padding: 1px; } -table.navbar :link, table.navbar :visited { border: none; color: #fff; } -table.navbar :link:hover, table.navbar :visited:hover { background: none; - text-decoration: underline overline; -} -table.navbar th.navbar-select { background: #fff; color: #000; } -span.breadcrumbs { color: #666; font-size: 95%; } -h1.epydoc { border: none; color: #666; - font-size: x-large; margin: 1em 0 0; padding: 0; -} -pre.base-tree { color: #666; margin: 0; padding: 0; } -pre.base-tree :link, pre.base-tree :visited { border: none; } -pre.py-doctest, pre.variable, pre.rst-literal-block { background: #eee; - border: 1px solid #e6e6e6; color: #000; margin: 1em; padding: .25em; - overflow: auto; -} -pre.variable { margin: 0; } - -/* Summary tables */ - -table.summary { margin: .5em 0; } -table.summary tr.table-header { background: #f7f7f0; } -table.summary td.table-header { color: #666; font-weight: bold; } -table.summary th.group-header { background: #f7f7f0; color: #666; - font-size: 90%; font-weight: bold; text-align: left; -} -table.summary th, table.summary td { border: 1px solid #d7d7d7; } -table.summary th th, table.summary td td { border: none; } -table.summary td.summary table td { color: #666; font-size: 90%; } -table.summary td.summary table br { display: none; } -table.summary td.summary span.summary-type { font-family: monospace; - font-size: 90%; -} -table.summary td.summary span.summary-type code { font-size: 110%; } -p.indent-wrapped-lines { color: #999; font-size: 85%; margin: 0; - padding: 0 0 0 7em; text-indent: -7em; -} -p.indent-wrapped-lines code { color: #999; font-size: 115%; } -p.indent-wrapped-lines :link, p.indent-wrapped-lines :visited { border: none; } -.summary-sig { display: block; font-family: monospace; font-size: 120%; - margin-bottom: .5em; -} -.summary-sig-name { font-weight: bold; } -.summary-sig-arg { color: #333; } -.summary-sig :link, .summary-sig :visited { border: none; } -.summary-name { font-family: monospace; font-weight: bold; } - -/* Details tables */ - -table.details { margin: 2em 0 0; } -div table.details { margin-top: 0; } -table.details tr.table-header { background: transparent; } -table.details td.table-header { border-bottom: 1px solid #ccc; padding: 2em 0 0; } -table.details span.table-header { - font: bold 140% Arial,Verdana,'Bitstream Vera Sans',Helvetica,sans-serif; - letter-spacing: -0.018em; -} -table.details th, table.details td { border: none; } -table.details th th, table.details td td { border: none; } -table.details td { padding-left: 2em; } -table.details td td { padding-left: 0; } -table.details h3.epydoc { margin-left: -2em; } -table.details h3.epydoc .sig { color: #999; font-family: monospace; } -table.details h3.epydoc .sig-name { color: #000; } -table.details h3.epydoc .sig-arg { color: #666; } -table.details h3.epydoc .sig-default { font-size: 95%; font-weight: normal; } -table.details h3.epydoc .sig-default code { font-weight: normal; } -table.details h3.epydoc .fname { color: #999; font-size: 90%; - font-style: italic; font-weight: normal; line-height: 1.6em; -} - -dl dt { color: #666; margin-top: 1em; } -dl dd { margin: 0; padding-left: 2em; } -dl.fields { margin: 1em 0; padding: 0; } -dl.fields dt { color: #666; margin-top: 1em; } -dl.fields dd ul { margin: 0; padding: 0; } -div.fields { font-size: 90%; margin: 0 0 2em 2em; } -div.fields p { margin-bottom: 0.5em; } - -table td.footer { color: #999; font-size: 85%; margin-top: 3em; - padding: 0 3em 1em; position: absolute; width: 80%; } -table td.footer :link, table td.footer :visited { border: none; color: #999; } -table td.footer :link:hover, table td.footer :visited:hover { - background: transparent; text-decoration: underline; -} - -/* Syntax highlighting */ - -.py-prompt, .py-more, .variable-ellipsis, .variable-op { color: #999; } -.variable-group { color: #666; font-weight: bold; } -.py-string, .variable-string, .variable-quote { color: #093; } -.py-comment { color: #06f; font-style: italic; } -.py-keyword { color: #00f; } -.py-output { background: #f6f6f0; color: #666; font-weight: bold; } - -/* Index */ - -table.link-index { background: #f6f6f0; border: none; margin-top: 1em; } -table.link-index td.link-index { border: none; font-family: monospace; - font-weight: bold; padding: .5em 1em; -} -table.link-index td table, table.link-index td td { border: none; } -table.link-index .index-where { color: #999; - font-family: Verdana,Arial,'Bitstream Vera Sans',Helvetica,sans-serif; - font-size: 90%; font-weight: normal; line-height: 1.6em; -} -table.link-index .index-where :link, table.link-index .index-where :visited { - border: none; color: #666; -} -h2.epydoc { color: #999; font-size: 200%; line-height: 10px; }
deleted file mode 100644 --- a/doc/style/pygments.css +++ /dev/null @@ -1,57 +0,0 @@ -div.highlight { background: #ffffff; } -div.highlight .c { color: #999988; font-style: italic } -div.highlight .err { color: #a61717; background-color: #e3d2d2 } -div.highlight .k { font-weight: bold } -div.highlight .o { font-weight: bold } -div.highlight .cm { color: #999988; font-style: italic } -div.highlight .cp { color: #999999; font-weight: bold } -div.highlight .c1 { color: #999988; font-style: italic } -div.highlight .cs { color: #999999; font-weight: bold; font-style: italic } -div.highlight .gd { color: #000000; background-color: #ffdddd } -div.highlight .ge { font-style: italic } -div.highlight .gr { color: #aa0000 } -div.highlight .gh { color: #999999 } -div.highlight .gi { color: #000000; background-color: #ddffdd } -div.highlight .go { color: #888888 } -div.highlight .gp { color: #555555 } -div.highlight .gs { font-weight: bold } -div.highlight .gu { color: #aaaaaa } -div.highlight .gt { color: #aa0000 } -div.highlight .kc { font-weight: bold } -div.highlight .kd { font-weight: bold } -div.highlight .kp { font-weight: bold } -div.highlight .kr { font-weight: bold } -div.highlight .kt { color: #445588; font-weight: bold } -div.highlight .m { color: #009999 } -div.highlight .s { color: #bb8844 } -div.highlight .na { color: #008080 } -div.highlight .nb { color: #999999 } -div.highlight .nc { color: #445588; font-weight: bold } -div.highlight .no { color: #008080 } -div.highlight .ni { color: #800080 } -div.highlight .ne { color: #990000; font-weight: bold } -div.highlight .nf { color: #990000; font-weight: bold } -div.highlight .nn { color: #555555 } -div.highlight .nt { color: #000080 } -div.highlight .nv { color: #008080 } -div.highlight .ow { font-weight: bold } -div.highlight .mf { color: #009999 } -div.highlight .mh { color: #009999 } -div.highlight .mi { color: #009999 } -div.highlight .mo { color: #009999 } -div.highlight .sb { color: #bb8844 } -div.highlight .sc { color: #bb8844 } -div.highlight .sd { color: #bb8844 } -div.highlight .s2 { color: #bb8844 } -div.highlight .se { color: #bb8844 } -div.highlight .sh { color: #bb8844 } -div.highlight .si { color: #bb8844 } -div.highlight .sx { color: #bb8844 } -div.highlight .sr { color: #808000 } -div.highlight .s1 { color: #bb8844 } -div.highlight .ss { color: #bb8844 } -div.highlight .bp { color: #999999 } -div.highlight .vc { color: #008080 } -div.highlight .vg { color: #008080 } -div.highlight .vi { color: #008080 } -div.highlight .il { color: #009999 }
deleted file mode 100644 index 326cd1b37dcd637d2e8b7193fe0011f51cca3ce9..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 GIT binary patch literal 0 Hc$@<O00001
deleted file mode 100644 index 42ae3f86d7f1513fd585ad02959afbb37ad476cb..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 GIT binary patch literal 0 Hc$@<O00001
--- a/setup.py +++ b/setup.py @@ -22,89 +22,11 @@ from distutils.core import setup import sys - -class build_doc(Command): - description = 'Builds the documentation' - user_options = [ - ('force', None, - "force regeneration even if no reStructuredText files have changed"), - ('without-apidocs', None, - "whether to skip the generation of API documentaton"), - ] - boolean_options = ['force', 'without-apidocs'] - - def initialize_options(self): - self.force = False - self.without_apidocs = False - - def finalize_options(self): - pass - - def run(self): - from docutils.core import publish_cmdline - from docutils.nodes import raw - from docutils.parsers import rst - - docutils_conf = os.path.join('doc', 'conf', 'docutils.ini') - epydoc_conf = os.path.join('doc', 'conf', 'epydoc.ini') - - try: - from pygments import highlight - from pygments.lexers import get_lexer_by_name - from pygments.formatters import HtmlFormatter - - def code_block(name, arguments, options, content, lineno, - content_offset, block_text, state, state_machine): - lexer = get_lexer_by_name(arguments[0]) - html = highlight('\n'.join(content), lexer, HtmlFormatter()) - return [raw('', html, format='html')] - code_block.arguments = (1, 0, 0) - code_block.options = {'language' : rst.directives.unchanged} - code_block.content = 1 - rst.directives.register_directive('code-block', code_block) - except ImportError: - print 'Pygments not installed, syntax highlighting disabled' - - for source in glob('doc/*.txt'): - dest = os.path.splitext(source)[0] + '.html' - if self.force or not os.path.exists(dest) or \ - os.path.getmtime(dest) < os.path.getmtime(source): - print 'building documentation file %s' % dest - publish_cmdline(writer_name='html', - argv=['--config=%s' % docutils_conf, source, - dest]) - - if not self.without_apidocs: - try: - from epydoc import cli - old_argv = sys.argv[1:] - sys.argv[1:] = [ - '--config=%s' % epydoc_conf, - '--no-private', # epydoc bug, not read from config - '--simple-term', - '--verbose' - ] - cli.cli() - sys.argv[1:] = old_argv - - except ImportError: - print 'epydoc not installed, skipping API documentation.' - - -class test_doc(Command): - description = 'Tests the code examples in the documentation' - user_options = [] - - def initialize_options(self): - pass - - def finalize_options(self): - pass - - def run(self): - for filename in glob('doc/*.txt'): - print 'testing documentation file %s' % filename - doctest.testfile(filename, False, optionflags=doctest.ELLIPSIS) +sys.path.append(os.path.join('doc', 'common')) +try: + from doctools import build_doc, test_doc +except ImportError: + build_doc = test_doc = None setup(