summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblackbird <devnull@localhost>2007-01-13 11:03:25 +0100
committerblackbird <devnull@localhost>2007-01-13 11:03:25 +0100
commitdbf655bf5c98148bc60722bdb9107c80a431ae40 (patch)
tree16b3dcd66729716a9e4b3e8061051c662faa0a53
parente1cfcf8d31c8c814acb7c72b05289993718bf3f9 (diff)
downloadpygments-dbf655bf5c98148bc60722bdb9107c80a431ae40.tar.gz
[svn] added authors and changelog to documentation
-rw-r--r--docs/generate.py32
-rw-r--r--docs/src/authors.txt5
-rw-r--r--docs/src/changelog.txt5
-rw-r--r--docs/src/index.txt6
4 files changed, 47 insertions, 1 deletions
diff --git a/docs/generate.py b/docs/generate.py
index c52677a5..a99a6c78 100644
--- a/docs/generate.py
+++ b/docs/generate.py
@@ -93,9 +93,37 @@ def generate_filter_docs():
''' % (cls.__name__, cls.__doc__, name))
return ''.join(out)
+def generate_changelog():
+ fn = os.path.abspath(os.path.join(os.path.dirname(__file__), '..',
+ 'CHANGES'))
+ f = file(fn)
+ result = []
+ in_header = False
+ header = True
+ for line in f:
+ if header:
+ if not in_header and line.strip():
+ in_header = True
+ elif in_header and not line.strip():
+ header = False
+ else:
+ result.append(line.rstrip())
+ f.close()
+ return '\n'.join(result)
+
+def generate_authors():
+ fn = os.path.abspath(os.path.join(os.path.dirname(__file__), '..',
+ 'AUTHORS'))
+ f = file(fn)
+ r = f.read().rstrip()
+ f.close()
+ return r
+
LEXERDOCS = generate_lexer_docs()
FORMATTERDOCS = generate_formatter_docs()
FILTERDOCS = generate_filter_docs()
+CHANGELOG = generate_changelog()
+AUTHORS = generate_authors()
PYGMENTS_FORMATTER = HtmlFormatter(style='pastie', cssclass='syntax')
@@ -347,7 +375,9 @@ def generate_documentation(data, link_style):
writer = DocumentationWriter(link_style)
data = data.replace('[builtin_lexer_docs]', LEXERDOCS).\
replace('[builtin_formatter_docs]', FORMATTERDOCS).\
- replace('[builtin_filter_docs]', FILTERDOCS)
+ replace('[builtin_filter_docs]', FILTERDOCS).\
+ replace('[changelog]', CHANGELOG).\
+ replace('[authors]', AUTHORS)
parts = publish_parts(
data,
writer=writer,
diff --git a/docs/src/authors.txt b/docs/src/authors.txt
new file mode 100644
index 00000000..c8c532aa
--- /dev/null
+++ b/docs/src/authors.txt
@@ -0,0 +1,5 @@
+=======
+Authors
+=======
+
+[authors]
diff --git a/docs/src/changelog.txt b/docs/src/changelog.txt
new file mode 100644
index 00000000..6caf0a32
--- /dev/null
+++ b/docs/src/changelog.txt
@@ -0,0 +1,5 @@
+=========
+Changelog
+=========
+
+[changelog]
diff --git a/docs/src/index.txt b/docs/src/index.txt
index 88bf8591..1b80240a 100644
--- a/docs/src/index.txt
+++ b/docs/src/index.txt
@@ -44,6 +44,12 @@ Welcome to the Pygments documentation.
- `Using Pygments in ReST documents <rstdirective.txt>`_
+- About Pygments
+
+ - `Changelog <changelog.txt>`_
+
+ - `Authors <authors.txt>`_
+
--------------