authors file
This commit is contained in:
parent
d758d4e1f7
commit
c6f41dcc04
|
@ -0,0 +1,6 @@
|
|||
Authors
|
||||
--------
|
||||
|
||||
Gwenaël Rémond <gremond@cadoles.com> lead developer
|
||||
Emmanuel Garette <egarette@cadoles.com> contributor
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
Tiramisu is placed under the terms of the GNU General Public License v3.0 as
|
||||
published by the Free Software Foundation; either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
See gpl-3.0.txt for more informations.
|
||||
|
||||
The documentation is licenced under the terms of a Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||
|
||||
See ccbysa3.0.txt or http://creativecommons.org/licenses/by-sa/3.0/deed.en_US for informations
|
||||
|
16
README
16
README
|
@ -1,21 +1,9 @@
|
|||
LICENSES
|
||||
---------
|
||||
|
||||
Tiramisu is under the terms of the GNU General Public License v3.0 as
|
||||
published by the Free Software Foundation; either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
See gpl-3.0.txt for more informations.
|
||||
|
||||
The documentation is licenced under the terms of a Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||
|
||||
See ccbysa3.0.txt or http://creativecommons.org/licenses/by-sa/3.0/deed.en_US for informations
|
||||
|
||||
Contributors:
|
||||
|
||||
Gwenaël Rémond <gremond@cadoles.com> lead developer
|
||||
Emmanuel Garette <egarette@cadoles.com> contributor
|
||||
see COPYING for licences of the code and the documentation
|
||||
|
||||
see AUTHORS for the details about the tiramisu team
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
#!/usr/bin/python
|
||||
# unproudly borrowed from David Goodger's rst2html.py
|
||||
|
||||
"""
|
||||
A minimal front end to the Docutils Publisher, producing HTML.
|
||||
"""
|
||||
|
||||
try:
|
||||
import locale
|
||||
locale.setlocale(locale.LC_ALL, '')
|
||||
except:
|
||||
pass
|
||||
|
||||
from docutils.core import publish_cmdline, default_description
|
||||
# ____________________________________________________________
|
||||
from docutils import nodes, utils
|
||||
from docutils.parsers.rst import roles
|
||||
from docutils.writers import manpage
|
||||
|
||||
"""
|
||||
description of the new roles:
|
||||
|
||||
`:api:` : link to the code
|
||||
|
||||
- code.py becomes api/code.html
|
||||
- code.Code.code_test becomes api/code.Code.code_test.html
|
||||
- code.Code() becomes api/code.Code.html
|
||||
|
||||
`:doc:`a link to an internal file
|
||||
example become example.html
|
||||
|
||||
ref: link with anchor as in an external file
|
||||
|
||||
:ref:`toto#titi` becomes toto.html#titi
|
||||
"""
|
||||
from os.path import splitext
|
||||
|
||||
def api_reference_role(role, rawtext, text, lineno, inliner,
|
||||
options={}, content=[]):
|
||||
basename = text
|
||||
if "(" in text:
|
||||
basename = text.split("(")[0]
|
||||
if ".py" in text:
|
||||
basename = splitext(text)[0]
|
||||
if "test_" in text:
|
||||
refuri = "api/" + "tiramisu.test." + basename + '.html'
|
||||
else:
|
||||
refuri = "api/" + "tiramisu." + basename + '.html'
|
||||
roles.set_classes(options)
|
||||
node = nodes.reference(rawtext, utils.unescape(text), refuri=refuri,
|
||||
**options)
|
||||
return [node], []
|
||||
|
||||
roles.register_local_role('api', api_reference_role)
|
||||
|
||||
def doc_reference_role(role, rawtext, text, lineno, inliner,
|
||||
options={}, content=[]):
|
||||
refuri = text + '.html'
|
||||
roles.set_classes(options)
|
||||
node = nodes.reference(rawtext, utils.unescape(text), refuri=refuri,
|
||||
**options)
|
||||
return [node], []
|
||||
|
||||
roles.register_local_role('doc', doc_reference_role)
|
||||
|
||||
def ref_reference_role(role, rawtext, text, lineno, inliner,
|
||||
options={}, content=[]):
|
||||
fname, anchor = text.split('#')
|
||||
refuri = fname + '.html#' + anchor
|
||||
roles.set_classes(options)
|
||||
node = nodes.reference(rawtext, utils.unescape(anchor), refuri=refuri,
|
||||
**options)
|
||||
return [node], []
|
||||
|
||||
roles.register_local_role('ref', ref_reference_role)
|
||||
|
||||
# ____________________________________________________________
|
||||
|
||||
description = ("Generates plain unix manual documents. " + default_description)
|
||||
|
||||
publish_cmdline(writer=manpage.Writer(), description=description)
|
||||
|
Loading…
Reference in New Issue