diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..4541b48 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,6 @@ +Authors +-------- + +Gwenaël Rémond lead developer +Emmanuel Garette contributor + diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..6617533 --- /dev/null +++ b/COPYING @@ -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 + diff --git a/README b/README index d904e82..0178e35 100644 --- a/README +++ b/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 lead developer -Emmanuel Garette contributor +see COPYING for licences of the code and the documentation +see AUTHORS for the details about the tiramisu team diff --git a/doc/rst2man.py b/doc/rst2man.py new file mode 100755 index 0000000..832ac9c --- /dev/null +++ b/doc/rst2man.py @@ -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) +