r694 - in branches/jrst-docutils-jython: jrst/src/test/java/org/nuiton/jrst jrst-doc/src/site jrst-doc/src/site/en/rst jrst-doc/src/site/en/rst/devel jrst-doc/src/site/en/rst/user jrst-doc/src/site/resources/schemas jrst-doc/src/site/rst jrst-doc/src/site/rst/devel jrst-doc/src/site/rst/user
Author: jpages Date: 2012-06-04 16:42:30 +0200 (Mon, 04 Jun 2012) New Revision: 694 Url: http://nuiton.org/repositories/revision/jrst/694 Log: Mise ?\195?\160 jour de la documentation pour prendre en compte le choix de la m?\195?\169thode de g?\195?\169n?\195?\169ration (--simple) en fran?\195?\167ais et en anglais. Added: branches/jrst-docutils-jython/jrst-doc/src/site/en/rst/devel/developerDocDocutils.rst branches/jrst-docutils-jython/jrst-doc/src/site/en/rst/devel/developerDocJRSTParser.rst branches/jrst-docutils-jython/jrst-doc/src/site/en/rst/user/functionality.rst branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeClassDocutils.dia branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeClassDocutils.png branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeClassJRSTParser.png branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeGenerationDocutils.dia branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeGenerationDocutils.png branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeGenerationJRSTParser.dia branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeGenerationJRSTParser.png branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeSequenceDocutils.dia branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeSequenceDocutils.png branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeSequenceJRSTParser.png branches/jrst-docutils-jython/jrst-doc/src/site/rst/devel/docDevDocutils.rst branches/jrst-docutils-jython/jrst-doc/src/site/rst/devel/docDevJRSTParser.rst branches/jrst-docutils-jython/jrst-doc/src/site/rst/user/fonctionnalites.rst Removed: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/class-diagram.dia branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeClass.png branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeGeneration.dia branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeGeneration.png branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeSequence.dia branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeSequence.png Modified: branches/jrst-docutils-jython/jrst-doc/src/site/en/rst/devel/developerDoc.rst branches/jrst-docutils-jython/jrst-doc/src/site/en/rst/index.rst branches/jrst-docutils-jython/jrst-doc/src/site/rst/devel/docDeveloppeur.rst branches/jrst-docutils-jython/jrst-doc/src/site/rst/index.rst branches/jrst-docutils-jython/jrst-doc/src/site/rst/user/index.rst branches/jrst-docutils-jython/jrst-doc/src/site/site_en.xml branches/jrst-docutils-jython/jrst-doc/src/site/site_fr.xml branches/jrst-docutils-jython/jrst/src/test/java/org/nuiton/jrst/JRSTAbstractTest.java Modified: branches/jrst-docutils-jython/jrst/src/test/java/org/nuiton/jrst/JRSTAbstractTest.java =================================================================== --- branches/jrst-docutils-jython/jrst/src/test/java/org/nuiton/jrst/JRSTAbstractTest.java 2012-06-01 15:05:38 UTC (rev 693) +++ branches/jrst-docutils-jython/jrst/src/test/java/org/nuiton/jrst/JRSTAbstractTest.java 2012-06-04 14:42:30 UTC (rev 694) @@ -29,6 +29,7 @@ import org.apache.commons.logging.LogFactory; import org.junit.Assert; import org.junit.BeforeClass; +import org.nuiton.util.TimeLog; import java.io.File; import java.io.IOException; @@ -110,16 +111,18 @@ } public void generate() throws Exception { + TimeLog simpleModeTimeLog = new TimeLog("Simple Mode"); + simpleModeTimeLog.setTimeToLogInfo(100l); + Long start = TimeLog.getTime(); + JRST.generate(outputType, in, out, overwrite, true); + simpleModeTimeLog.log(start, "Simple Mode generation"); + assertJRST(in, out); - //time + TimeLog docutilsTimeLog = new TimeLog("DocUtils"); + start = TimeLog.getTime(); JRST.generate(outputType, in, out, overwrite, false); + docutilsTimeLog.log(start, "DocUtils generation"); assertJRST(in, out); - - //time - JRST.generate(outputType, in, out, overwrite, true); - assertJRST(in, out); - - //log time } /** Modified: branches/jrst-docutils-jython/jrst-doc/src/site/en/rst/devel/developerDoc.rst =================================================================== --- branches/jrst-docutils-jython/jrst-doc/src/site/en/rst/devel/developerDoc.rst 2012-06-01 15:05:38 UTC (rev 693) +++ branches/jrst-docutils-jython/jrst-doc/src/site/en/rst/devel/developerDoc.rst 2012-06-04 14:42:30 UTC (rev 694) @@ -27,100 +27,30 @@ Developer Documentation ======================= -.. contents:: +Types of generation +=================== -Class diagram -============= +In this version of JRST, the user can choose two types of generation : -.. image:: ../../schemas/diagrammeClass.png - :align: center +Use of Jython_ and DocUtils_ +---------------------------- -**JRST** Class contents main() method, it's looking after options, files reading and writing. Initially, it calls Jython_ class **PythonInterpreter** which allows to execute DocUtils' Python script to generate an intermediate file. Then it only remains to apply several desired XSL (if needed) by using **JRSTGenerator** Class. +The first method uses DocUtils_ to generate intermediate XML document. However, scripts are written in Python, so we have to use Jython_ to launch them in the java virtual machine. +This is the best way if RST documents are complex and structured. -This sequence diagram describes the parser's mechanism throughout the generation : +For further information, please visit this page_. -.. image:: ../../schemas/diagrammeSequence.png - :align: center +Use of our own parser +--------------------- -Generation -========== +The second method allows a simpler and faster generation but the whole ReStructuredText specification_ is not available. It could be used with simple documents. -.. image:: ../../schemas/diagrammeGeneration.png - :align: center +You can visit `this page`_ if you want more informations. -Links : - - * dn2dbk.xsl (conversion from xml of docutils towards docbook) : http://membres.lycos.fr/ebellot/dn2dbk - * nwalsh xsl (conversion from docbook towards FO and xhtml) : http://nwalsh.com - * IText (conversion from HTML towards PDF) : http://itextpdf.com/ - -Use example -=========== - -We want to convert this following reStructuredText document (text.rst) to html (text.html) : - -:: - - ===== - Title - ===== - - :Author: Letellier Sylvain - - .. Attention:: this text must be interpreted independently - because it must be interpreted like a **paragraph** - - -So we use this following command:: - - JRST -t html -o text.html text.rst - -**JRSTGenerator** Class with the XSL file rst2xhtml.xsl, returns following html file:: - - <?xml version="1.0" encoding="UTF-8"?> - <html xmlns="http://www.w3.org/TR/xhtml1/strict"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> - <meta name="generator" content="JRST http://jrst.labs.libre-entreprise.org/"/> - <title>Title</title> - </head> - <body> - <h1>Title</h1> - <table class="docinfo" frame="void" rules="none"> - <col class="docinfo-name"/> - <col class="docinfo-content"/> - <tbody valign="top"> - <tr> - <th class="docpatterninfo-name">author :</th> - <td class="docinfo-content">Letellier Sylvain</td> - </tr> - </tbody> - </table> - <div class="attention"> - <p class="title">attention :</p> - <p class="body"> - <p>this text must be interpreted independently - because it must be interpreted like a <strong>paragraph</strong> - </p> - </p> - </div> - </body> - </html> - -What display the page (CSS [1]_ was added to layout) : - -.. topic:: Titre - - :Author: Letellier Sylvain - - .. Attention:: this text must be interpreted independently - because it must be interpreted like a **paragraph** - - Uses external XSL ================= -JRST is able to transform DocUtils XML with external XSL [2]_ files. +JRST able to transform DocUtils XML with external XSL [1]_ files. You must use this following command:: JRST -x XSLfile, XSLfile2 RSTfile @@ -130,13 +60,14 @@ JRST --xslFile XSLfile, XSLfile2 RSTfile JRST process RST_ file, returned DocUtils_ XML will be transformed by JRSTgenerator Class -starting by "XSLfile" then "XSL2file2". +starting by XSLfile then XSL2file2... -.. [1] `Cascading Style Sheets`_ -.. [2] XSL documentation is available here_. +.. [1] XSL documentation is available here_. -.. _here: ./presentationXSL.html -.. _RST: http://docutils.sourceforge.net/rst.html -.. _Cascading Style Sheets: http://en.wikipedia.org/wiki/Cascading_Style_Sheets +.. _here: presentationXSL.html +.. _page: developerDocDocutils.html +.. _`this page`: developerDocJRSTParser.html .. _DocUtils: http://docutils.sourceforge.net/docs/ref/doctree.html .. _Jython: http://jython.org/index.html +.. _specification: http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html +.. _RST: http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html Added: branches/jrst-docutils-jython/jrst-doc/src/site/en/rst/devel/developerDocDocutils.rst =================================================================== --- branches/jrst-docutils-jython/jrst-doc/src/site/en/rst/devel/developerDocDocutils.rst (rev 0) +++ branches/jrst-docutils-jython/jrst-doc/src/site/en/rst/devel/developerDocDocutils.rst 2012-06-04 14:42:30 UTC (rev 694) @@ -0,0 +1,129 @@ +.. - +.. * #%L +.. * JRst :: Documentation +.. * +.. * $Id: developerDoc.rst 691 2012-05-31 08:49:47Z jpages $ +.. * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/jrst-doc/src/si... $ +.. * %% +.. * Copyright (C) 2009 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + +======================= +Developer Documentation +======================= + +Default mode for the JRST generation uses Jython_ and DocUtils_ to produce the intermediate XML document. In this way, generation corresponds to the ReStructuredText specification_. This method is usefull when RST file are complex or if the other method with `our parser`_ doesn't work. + +.. contents:: + +Class diagram +============= + +.. image:: ../../schemas/diagrammeClassDocutils.png + :align: center + +**JRST** Class contents main() method, it's looking after options, files reading and writing. Initially, it calls Jython_ class **PythonInterpreter** which allows to execute DocUtils' Python script to generate an intermediate file. Then it only remains to apply several desired XSL (if needed) by using **JRSTGenerator** Class. + +This sequence diagram describes the parser's mechanism throughout the generation : + +.. image:: ../../schemas/diagrammeSequenceDocutils.png + :align: center + +Generation +========== + +.. image:: ../../schemas/diagrammeGenerationDocutils.png + :align: center + +Links : + + * dn2dbk.xsl (conversion from xml of docutils towards docbook) : http://membres.lycos.fr/ebellot/dn2dbk + * nwalsh xsl (conversion from docbook towards FO and xhtml) : http://nwalsh.com + * IText (conversion from HTML towards PDF) : http://itextpdf.com/ + +Use example +=========== + +We want to convert this following reStructuredText document (text.rst) to html (text.html) : + +:: + + ===== + Title + ===== + + :Author: Letellier Sylvain + + .. Attention:: this text must be interpreted independently + because it must be interpreted like a **paragraph** + + +So we use this following command:: + + JRST -t html -o text.html text.rst + +**JRSTGenerator** Class with the XSL file rst2xhtml.xsl, returns following html file:: + + <?xml version="1.0" encoding="UTF-8"?> + <html xmlns="http://www.w3.org/TR/xhtml1/strict"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <meta name="generator" content="JRST http://jrst.labs.libre-entreprise.org/"/> + <title>Title</title> + </head> + <body> + <h1>Title</h1> + <table class="docinfo" frame="void" rules="none"> + <col class="docinfo-name"/> + <col class="docinfo-content"/> + <tbody valign="top"> + <tr> + <th class="docpatterninfo-name">author :</th> + <td class="docinfo-content">Letellier Sylvain</td> + </tr> + </tbody> + </table> + <div class="attention"> + <p class="title">attention :</p> + <p class="body"> + <p>this text must be interpreted independently + because it must be interpreted like a <strong>paragraph</strong> + </p> + </p> + </div> + </body> + </html> + +What display the page (CSS [1]_ was added to layout) : + +.. topic:: Titre + + :Author: Letellier Sylvain + + .. Attention:: this text must be interpreted independently + because it must be interpreted like a **paragraph** + +.. [1] `Cascading Style Sheets`_ + +.. _here: presentationXSL.html +.. _`our parser`: developerDocJRSTParser.html +.. _specification: http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html +.. _RST: http://docutils.sourceforge.net/rst.html +.. _Cascading Style Sheets: http://en.wikipedia.org/wiki/Cascading_Style_Sheets +.. _DocUtils: http://docutils.sourceforge.net/docs/ref/doctree.html +.. _Jython: http://jython.org/index.html Added: branches/jrst-docutils-jython/jrst-doc/src/site/en/rst/devel/developerDocJRSTParser.rst =================================================================== --- branches/jrst-docutils-jython/jrst-doc/src/site/en/rst/devel/developerDocJRSTParser.rst (rev 0) +++ branches/jrst-docutils-jython/jrst-doc/src/site/en/rst/devel/developerDocJRSTParser.rst 2012-06-04 14:42:30 UTC (rev 694) @@ -0,0 +1,146 @@ +.. - +.. * #%L +.. * JRst :: Documentation +.. * +.. * $Id: developerDoc.rst 512 2010-11-22 14:47:17Z tchemit $ +.. * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/jrst-doc/src/si... $ +.. * %% +.. * Copyright (C) 2009 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + +======================= +Developer Documentation +======================= + +When you launch JRST, you can activate the simple generation mode to use our JRST parser. It allows to easily and quickly generate documents if they are not complex. +If a functionality is not available for your document, you can use the `other mode`_. + +.. contents:: + +Class diagram +============= + +.. image:: ../../schemas/diagrammeClassJRSTParser.png + :align: center + +AdvencedReader Class is used to easily read RST_ file using specifics methods: + - String readLine() : return a line. + - String[] readLines(int nb) : return nb lines + - String[] readWhile(Pattern p) : return lines while they match to the pattern + - ... + +**JRSTLexer** Class uses **AdvencedReader** to build XML file, it browses all document to isolate the data types, parameters +and content, so assembling all usefuls informations to build the final XML. It will start by document's head (peekHeader(), +peekDocInfo()), and finally peeking on the body (peekBody()). + +**JRSTReader** Class uses **JRSTLexer**, it interprets the returned XML to build the final XML. This one is conform to the Docutils_ +DTD. This Class sometimes needs to be called itself when a document part must be interpreted independently of rest. For exemple, +if a table contains a list, we extract the cell's informations for being interpreted. Admonition's content must be considered like an +independant document. When generation is finished, Class **JRSTReader** build summary (composeContent()) and parse all the inline +specificities (inline()), like, italic or bold words, links, footnotes... All that can appear inside a line. + +**JRST** Class contents main() method, it's looking after options, files reading and writing. It reads document, parses +it with **JRSTReader** Class and transforms with the wish XSL (if needed) by using **JRSTGenerator** Class. + +Generation +========== + +.. image:: ../../schemas/diagrammeGenerationJRSTParser.png + :align: center + +Links : + + * dn2dbk.xsl (conversion from xml of docutils towards docbook) : http://membres.lycos.fr/ebellot/dn2dbk + * nwalsh xsl (conversion from docbook towards FO and xhtml) : http://nwalsh.com + * IText (conversion from HTML towards PDF) : http://itextpdf.com/ + +Use exemple +=========== + +We want to convert this following reStructuredText document (text.rst) to html (text.html) : + +:: + + ===== + Title + ===== + + :Author: Letellier Sylvain + + .. Attention:: this text must be interpreted independently + because it must be interpreted like a **paragraph** + + +So we use this following command:: + + JRST -t html -o text.html text.rst + +This sequence diagramme describes the parser's mechanism throughout the generation : + +.. image:: ../../schemas/diagrammeSequenceJRSTParser.png + :align: center + +**JRSTGenerator** Class with the XSL file rst2xhtml.xsl, returns following html file:: + + <?xml version="1.0" encoding="UTF-8"?> + <html xmlns="http://www.w3.org/TR/xhtml1/strict"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <meta name="generator" content="JRST http://jrst.labs.libre-entreprise.org/"/> + <title>Title</title> + </head> + <body> + <h1>Title</h1> + <table class="docinfo" frame="void" rules="none"> + <col class="docinfo-name"/> + <col class="docinfo-content"/> + <tbody valign="top"> + <tr> + <th class="docpatterninfo-name">author :</th> + <td class="docinfo-content">Letellier Sylvain</td> + </tr> + </tbody> + </table> + <div class="attention"> + <p class="title">attention :</p> + <p class="body"> + <p>this text must be interpreted independently + because it must be interpreted like a <strong>paragraph</strong> + </p> + </p> + </div> + </body> + </html> + +What display the page (CSS [1]_ was added to layout) : + +.. topic:: Titre + + :Author: Letellier Sylvain + + .. Attention:: this text must be interpreted independently + because it must be interpreted like a **paragraph** + +.. [1] `Cascading Style Sheets`_ + +.. _here: ./presentationXSL.html +.. _`other mode`: developerDocDocutils.html +.. _functionality: ../user/functionality.html +.. _RST: http://docutils.sourceforge.net/rst.html +.. _Cascading Style Sheets: http://en.wikipedia.org/wiki/Cascading_Style_Sheets +.. _DocUtils: http://docutils.sourceforge.net/docs/ref/doctree.html Modified: branches/jrst-docutils-jython/jrst-doc/src/site/en/rst/index.rst =================================================================== --- branches/jrst-docutils-jython/jrst-doc/src/site/en/rst/index.rst 2012-06-01 15:05:38 UTC (rev 693) +++ branches/jrst-docutils-jython/jrst-doc/src/site/en/rst/index.rst 2012-06-04 14:42:30 UTC (rev 694) @@ -42,18 +42,20 @@ documents, becomes useless when it is used to quickly creating a simple document. RST has a so simple syntax that it becomes almost invisible. -JRST uses Jython_ to execute DocUtils_ scripts to transform RST_ files to DocUtils XML to create a tree representation -document. It becomes easy to generate document representation towards different -formats. +Two methods of generation are possible : + - The first one uses Jython_ to execute DocUtils_ scripts to transform RST_ into XML. All the functionalities of ReStructuredText are available but the generation is longer than with our parser because it uses Docutils external scripts. + - The second uses our own JRST parser to generate XML, which allows to obtain good performance but some functionalities_ are not available. +With the XML document, we can transform it to other formats like HTML or PDF. + How to use it ------------- JRST takes a reStructuredText_ file and generates XML file. Which could be used to produce various files formats with generation XSL_ files. The available output formats are HTML, xhtml, -rst, pdf, docbook or odt(Open-Office) [1]_. +rst, pdf, docbook_ or XML [1]_. -If JRST is launched without arguments, a graphical user interface is displayed for the user. Thus, we can choose easily files, output type or external XSL stylesheets to apply. +If JRST is launched without arguments, a graphical user interface is displayed for the user. Thus, we can choose easily files, output type, external XSL stylesheets to apply or the generation mode (simple or not). :: @@ -66,12 +68,14 @@ -t format, --outType format To specify exit format, so using generation XSL_ file(s). Several formats are available xhtml, docbook, xml, HTML, xdoc, pdf. -x xslFile, --xslFile xslFile To specify generation XSL_ file at using. --force To overwrite, if file exists, it will be replaced by the new one. +--simple To use our own parser JRST to generate XML. All the functionalities are not available but generation is faster. --help To display available options : :: Usage: [options] FILE [--force] : overwrite existing out file + [--simple] : use our own parser to generate the file [--help] : display this help and exit [--outFile -o value] : Output file [--outType -t /xhtml|docbook|xml|html|xdoc|rst/] : Output type @@ -103,3 +107,4 @@ .. _LaTex: http://www.latex-project.org/ .. _DocUtils: http://docutils.sourceforge.net/docs/ref/doctree.html .. _Jython: http://jython.org/index.html +.. _functionalities: ./user/functionality.html Added: branches/jrst-docutils-jython/jrst-doc/src/site/en/rst/user/functionality.rst =================================================================== --- branches/jrst-docutils-jython/jrst-doc/src/site/en/rst/user/functionality.rst (rev 0) +++ branches/jrst-docutils-jython/jrst-doc/src/site/en/rst/user/functionality.rst 2012-06-04 14:42:30 UTC (rev 694) @@ -0,0 +1,276 @@ +.. - +.. * #%L +.. * JRst :: Documentation +.. * +.. * $Id: functionality.rst 512 2010-11-22 14:47:17Z tchemit $ +.. * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/jrst-doc/src/si... $ +.. * %% +.. * Copyright (C) 2009 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + +========================= +Functionalities suggested +========================= + +This is a list of functionalities available for our JRST parser. + +Docutils DTD : http://docutils.sourceforge.net/docs/ref/doctree.html + +.. contents:: Summary + +Functionalities established +=========================== + +Root element +------------ + +- document_ + +Title elements +-------------- + +- subtitle_ +- title_ + +Bibliographic elements +---------------------- + +- docinfo_ +- author_ +- authors_ +- organization_ +- address_ +- contact_ +- version_ +- revision_ +- status_ +- date_ +- copyright_ + +Decoration elements +------------------- + +- decoration_ +- footer_ +- header_ + +Structural elements +------------------- + +- section_ +- topic_ +- sidebar_ +- transition_ + +Body elements +------------- + +- admonition_ +- attention_ +- block_quote_ +- bullet_list_ +- caution_ +- classifier_ +- danger_ +- definition_ +- definition_list_ +- definition_list_item_ +- description_ +- doctest_block_ +- enumerated_list_ +- error_ +- field_ +- field_body_ +- field_list_ +- field_name_ +- footnote_ +- hint_ +- image_ +- important_ +- line_ +- line_block_ +- list_item_ +- literal_block_ +- note_ +- option_ +- option_argument_ +- option_group_ +- option_list_ +- option_list_item_ +- option_string_ +- paragraph_ +- term_ +- tip_ +- warning_ + +Table elements +-------------- + +- table_ +- tbody_ +- entry_ +- row_ +- colspec_ +- thead_ +- tgroup_ + +Inline elements +--------------- + +- emphasis_ +- strong_ +- literal_ +- reference_ +- footnote_reference_ + + +Unimplemented functionalities +============================= + +- abbreviation_ +- acronym_ +- attribution_ +- caption_ +- citation_ +- citation_reference_ +- comment_ +- compound_ +- container_ +- figure_ +- generated_ +- inline_ +- label_ +- legend_ +- pending_ +- problematic_ +- raw_ +- rubric_ +- subscript_ +- substitution_definition_ +- substitution_reference_ +- superscript_ +- system_message_ +- target_ +- title_reference_ + +.. _abbreviation: http://docutils.sourceforge.net/docs/ref/doctree.html#abbreviation +.. _acronym: http://docutils.sourceforge.net/docs/ref/doctree.html#acronym +.. _address: http://docutils.sourceforge.net/docs/ref/doctree.html#address +.. _admonition: http://docutils.sourceforge.net/docs/ref/doctree.html#admonition +.. _attention: http://docutils.sourceforge.net/docs/ref/doctree.html#attention + +.. _attribution: http://docutils.sourceforge.net/docs/ref/doctree.html#attribution +.. _author: http://docutils.sourceforge.net/docs/ref/doctree.html#author +.. _authors: http://docutils.sourceforge.net/docs/ref/doctree.html#authors +.. _block_quote: http://docutils.sourceforge.net/docs/ref/doctree.html#block-quote +.. _bullet_list: http://docutils.sourceforge.net/docs/ref/doctree.html#bullet-list +.. _caption: http://docutils.sourceforge.net/docs/ref/doctree.html#caption +.. _caution: http://docutils.sourceforge.net/docs/ref/doctree.html#caution +.. _citation: http://docutils.sourceforge.net/docs/ref/doctree.html#citation +.. _citation_reference: http://docutils.sourceforge.net/docs/ref/doctree.html#citation-reference + +.. _classifier: http://docutils.sourceforge.net/docs/ref/doctree.html#classifier +.. _colspec: http://docutils.sourceforge.net/docs/ref/doctree.html#colspec +.. _comment: http://docutils.sourceforge.net/docs/ref/doctree.html#comment +.. _compound: http://docutils.sourceforge.net/docs/ref/doctree.html#compound +.. _contact: http://docutils.sourceforge.net/docs/ref/doctree.html#contact +.. _container: http://docutils.sourceforge.net/docs/ref/doctree.html#container +.. _copyright: http://docutils.sourceforge.net/docs/ref/doctree.html#copyright +.. _danger: http://docutils.sourceforge.net/docs/ref/doctree.html#danger +.. _date: http://docutils.sourceforge.net/docs/ref/doctree.html#date + +.. _decoration: http://docutils.sourceforge.net/docs/ref/doctree.html#decoration +.. _definition: http://docutils.sourceforge.net/docs/ref/doctree.html#definition +.. _definition_list: http://docutils.sourceforge.net/docs/ref/doctree.html#definition-list +.. _definition_list_item: http://docutils.sourceforge.net/docs/ref/doctree.html#definition-list-item +.. _description: http://docutils.sourceforge.net/docs/ref/doctree.html#description +.. _docinfo: http://docutils.sourceforge.net/docs/ref/doctree.html#docinfo +.. _doctest_block: http://docutils.sourceforge.net/docs/ref/doctree.html#doctest-block +.. _document: http://docutils.sourceforge.net/docs/ref/doctree.html#document +.. _emphasis: http://docutils.sourceforge.net/docs/ref/doctree.html#emphasis + +.. _entry: http://docutils.sourceforge.net/docs/ref/doctree.html#entry +.. _enumerated_list: http://docutils.sourceforge.net/docs/ref/doctree.html#enumerated-list +.. _error: http://docutils.sourceforge.net/docs/ref/doctree.html#error +.. _field: http://docutils.sourceforge.net/docs/ref/doctree.html#field +.. _field_body: http://docutils.sourceforge.net/docs/ref/doctree.html#field-body +.. _field_list: http://docutils.sourceforge.net/docs/ref/doctree.html#field-list +.. _field_name: http://docutils.sourceforge.net/docs/ref/doctree.html#field-name +.. _figure: http://docutils.sourceforge.net/docs/ref/doctree.html#figure +.. _footer: http://docutils.sourceforge.net/docs/ref/doctree.html#footer + +.. _footnote: http://docutils.sourceforge.net/docs/ref/doctree.html#footnote +.. _footnote_reference: http://docutils.sourceforge.net/docs/ref/doctree.html#footnote-reference +.. _generated: http://docutils.sourceforge.net/docs/ref/doctree.html#generated +.. _header: http://docutils.sourceforge.net/docs/ref/doctree.html#header +.. _hint: http://docutils.sourceforge.net/docs/ref/doctree.html#hint +.. _image: http://docutils.sourceforge.net/docs/ref/doctree.html#image +.. _important: http://docutils.sourceforge.net/docs/ref/doctree.html#important +.. _inline: http://docutils.sourceforge.net/docs/ref/doctree.html#inline +.. _label: http://docutils.sourceforge.net/docs/ref/doctree.html#label + +.. _legend: http://docutils.sourceforge.net/docs/ref/doctree.html#legend +.. _line: http://docutils.sourceforge.net/docs/ref/doctree.html#line +.. _line_block: http://docutils.sourceforge.net/docs/ref/doctree.html#line-block +.. _list_item: http://docutils.sourceforge.net/docs/ref/doctree.html#list-item +.. _literal: http://docutils.sourceforge.net/docs/ref/doctree.html#literal +.. _literal_block: http://docutils.sourceforge.net/docs/ref/doctree.html#literal-block +.. _note: http://docutils.sourceforge.net/docs/ref/doctree.html#note +.. _option: http://docutils.sourceforge.net/docs/ref/doctree.html#option +.. _option_argument: http://docutils.sourceforge.net/docs/ref/doctree.html#option-argument + +.. _option_group: http://docutils.sourceforge.net/docs/ref/doctree.html#option-group +.. _option_list: http://docutils.sourceforge.net/docs/ref/doctree.html#option-list +.. _option_list_item: http://docutils.sourceforge.net/docs/ref/doctree.html#option-list-item +.. _option_string: http://docutils.sourceforge.net/docs/ref/doctree.html#option-string +.. _organization: http://docutils.sourceforge.net/docs/ref/doctree.html#organization +.. _paragraph: http://docutils.sourceforge.net/docs/ref/doctree.html#paragraph +.. _pending: http://docutils.sourceforge.net/docs/ref/doctree.html#pending +.. _problematic: http://docutils.sourceforge.net/docs/ref/doctree.html#problematic +.. _raw: http://docutils.sourceforge.net/docs/ref/doctree.html#raw + +.. _reference: http://docutils.sourceforge.net/docs/ref/doctree.html#reference +.. _revision: http://docutils.sourceforge.net/docs/ref/doctree.html#revision +.. _row: http://docutils.sourceforge.net/docs/ref/doctree.html#row +.. _rubric: http://docutils.sourceforge.net/docs/ref/doctree.html#rubric +.. _section: http://docutils.sourceforge.net/docs/ref/doctree.html#section +.. _sidebar: http://docutils.sourceforge.net/docs/ref/doctree.html#sidebar +.. _status: http://docutils.sourceforge.net/docs/ref/doctree.html#status +.. _strong: http://docutils.sourceforge.net/docs/ref/doctree.html#strong +.. _subscript: http://docutils.sourceforge.net/docs/ref/doctree.html#subscript + +.. _substitution_definition: http://docutils.sourceforge.net/docs/ref/doctree.html#substitution-definitio... +.. _substitution_reference: http://docutils.sourceforge.net/docs/ref/doctree.html#substitution-reference +.. _subtitle: http://docutils.sourceforge.net/docs/ref/doctree.html#subtitle +.. _superscript: http://docutils.sourceforge.net/docs/ref/doctree.html#superscript +.. _system_message: http://docutils.sourceforge.net/docs/ref/doctree.html#system-message +.. _table: http://docutils.sourceforge.net/docs/ref/doctree.html#table +.. _target: http://docutils.sourceforge.net/docs/ref/doctree.html#target +.. _tbody: http://docutils.sourceforge.net/docs/ref/doctree.html#tbody +.. _term: http://docutils.sourceforge.net/docs/ref/doctree.html#term + +.. _tgroup: http://docutils.sourceforge.net/docs/ref/doctree.html#tgroup +.. _thead: http://docutils.sourceforge.net/docs/ref/doctree.html#thead +.. _tip: http://docutils.sourceforge.net/docs/ref/doctree.html#tip +.. _title: http://docutils.sourceforge.net/docs/ref/doctree.html#title +.. _title_reference: http://docutils.sourceforge.net/docs/ref/doctree.html#title-reference +.. _topic: http://docutils.sourceforge.net/docs/ref/doctree.html#topic +.. _transition: http://docutils.sourceforge.net/docs/ref/doctree.html#transition +.. _version: http://docutils.sourceforge.net/docs/ref/doctree.html#version +.. _warning: http://docutils.sourceforge.net/docs/ref/doctree.html#warning + Deleted: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/class-diagram.dia =================================================================== (Binary files differ) Deleted: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeClass.png =================================================================== (Binary files differ) Added: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeClassDocutils.dia =================================================================== (Binary files differ) Property changes on: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeClassDocutils.dia ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeClassDocutils.png =================================================================== (Binary files differ) Property changes on: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeClassDocutils.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeClassJRSTParser.png =================================================================== (Binary files differ) Property changes on: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeClassJRSTParser.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeGeneration.dia =================================================================== (Binary files differ) Deleted: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeGeneration.png =================================================================== (Binary files differ) Added: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeGenerationDocutils.dia =================================================================== (Binary files differ) Property changes on: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeGenerationDocutils.dia ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeGenerationDocutils.png =================================================================== (Binary files differ) Property changes on: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeGenerationDocutils.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeGenerationJRSTParser.dia =================================================================== (Binary files differ) Property changes on: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeGenerationJRSTParser.dia ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeGenerationJRSTParser.png =================================================================== (Binary files differ) Property changes on: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeGenerationJRSTParser.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeSequence.dia =================================================================== (Binary files differ) Deleted: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeSequence.png =================================================================== (Binary files differ) Added: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeSequenceDocutils.dia =================================================================== (Binary files differ) Property changes on: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeSequenceDocutils.dia ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeSequenceDocutils.png =================================================================== (Binary files differ) Property changes on: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeSequenceDocutils.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeSequenceJRSTParser.png =================================================================== (Binary files differ) Property changes on: branches/jrst-docutils-jython/jrst-doc/src/site/resources/schemas/diagrammeSequenceJRSTParser.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: branches/jrst-docutils-jython/jrst-doc/src/site/rst/devel/docDevDocutils.rst =================================================================== --- branches/jrst-docutils-jython/jrst-doc/src/site/rst/devel/docDevDocutils.rst (rev 0) +++ branches/jrst-docutils-jython/jrst-doc/src/site/rst/devel/docDevDocutils.rst 2012-06-04 14:42:30 UTC (rev 694) @@ -0,0 +1,131 @@ +.. - +.. * #%L +.. * JRst :: Documentation +.. * +.. * $Id: docDeveloppeur.rst 691 2012-05-31 08:49:47Z jpages $ +.. * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/jrst-doc/src/si... $ +.. * %% +.. * Copyright (C) 2009 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + +========================= +Documentation développeur +========================= + +Le mode par défaut de génération de JRST utilise Jython_ et DocUtils_ pour produire le document XML intermédiaire. De cette manière, la génération est parfaitement fidèle à la spécification_ de ReStructuredText. Cette méthode est adaptée lorsque les fichiers RST sont plus complexes ou lorsque les fonctionnalités ne sont pas encore implémentées dans `notre parseur`_. + +.. contents:: Sommaire + +Le diagramme de Class +===================== + +.. image:: ../schemas/diagrammeClassDocutils.png + :alt: Diagramme de classes + :align: center + +La classe **JRST** contient la méthode main(), elle gère les options, la lecture et l'écriture des fichiers. Elle appelle dans un premier temps la classe **PythonInterpreter** de Jython_ permettant d'exécuter les scripts en Python de DocUtils_ pour générer un fichier XML intermédiaire. Ensuite, il ne reste qu'à appliquer le ou les XSL désiré(s) (si besoin) grâce à la classe **JRSTGenerator**. + +Ce diagramme de séquence décrit le fonctionnement du parseur tout au long de la génération : + +.. image:: ../schemas/diagrammeSequenceDocutils.png + :alt: Diagramme de séquence d'une génération + :align: center + +La génération +============= + +.. image:: ../schemas/diagrammeGenerationDocutils.png + :alt: Arbre des différentes générations possibles + :align: center + +Références : + + * dn2dbk.xsl (conversion de xml de docutils vers docbook) : http://membres.lycos.fr/ebellot/dn2dbk + * les xsl de nwalsh (conversion de docbook vers FO et xhtml) : http://nwalsh.com + * IText (conversion de HTML vers PDF) : http://itextpdf.com/ + + +Exemple d'utilisation +===================== + + +L'on souhaite convertir le document rst (text.rst) suivant en html (text.html) : + +:: + + ===== + Titre + ===== + + :Author: Letellier Sylvain + + .. Attention:: texte à être réinterprété comme un fichier rst indépendant + ceci est considéré comme un **paragraphe** + +On utilise donc la commande suivante:: + + JRST -t html -o text.html text.rst + +La Classe **JRSTGenerator**, grâce au fichier XSL rst2xhtml.xsl, renvoie le fichier html suivant:: + + <?xml version="1.0" encoding="UTF-8"?> + <html xmlns="http://www.w3.org/TR/xhtml1/strict"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <meta name="generator" content="JRST http://jrst.labs.libre-entreprise.org/"/> + <title>Titre</title> + </head> + <body> + <h1>Titre</h1> + <table class="docinfo" frame="void" rules="none"> + <col class="docinfo-name"/> + <col class="docinfo-content"/> + <tbody valign="top"> + <tr> + <th class="docpatterninfo-name">author :</th> + <td class="docinfo-content">Letellier Sylvain</td> + </tr> + </tbody> + </table> + <div class="attention"> + <p class="title">attention :</p> + <p class="body"> + <p>texte à être réinterprété comme un fichier rst indépendant + ceci est considéré comme un <strong>paragraphe</strong></p> + </p> + </div> + </body> + </html> + +Qui affiche la page (un CSS [1]_ à été ajouté pour la mise en forme) : + +.. topic:: Titre + + :Author: Letellier Sylvain + + .. Attention:: texte à être réinterprété comme un fichier rst indépendant + ceci est considéré comme un **paragraphe** + +.. [1] `Cascading Style Sheets`_ + +.. _Cascading Style Sheets: http://fr.wikipedia.org/wiki/Feuilles_de_style_en_cascade +.. _RST: http://docutils.sourceforge.net/rst.html +.. _DocUtils: http://docutils.sourceforge.net/docs/ref/doctree.html +.. _Jython: http://jython.org/index.html +.. _spécification: http://jython.org/index.html +.. _`notre parseur`: docDevJRSTParser.html Added: branches/jrst-docutils-jython/jrst-doc/src/site/rst/devel/docDevJRSTParser.rst =================================================================== --- branches/jrst-docutils-jython/jrst-doc/src/site/rst/devel/docDevJRSTParser.rst (rev 0) +++ branches/jrst-docutils-jython/jrst-doc/src/site/rst/devel/docDevJRSTParser.rst 2012-06-04 14:42:30 UTC (rev 694) @@ -0,0 +1,143 @@ +.. - +.. * #%L +.. * JRst :: Documentation +.. * +.. * $Id: docDeveloppeur.rst 512 2010-11-22 14:47:17Z tchemit $ +.. * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/jrst-doc/src/si... $ +.. * %% +.. * Copyright (C) 2009 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + +======================================================= +Documentation développeur - Génération avec JRST Parser +======================================================= + +Parmi les options de lancement de JRST, il est possible d'activer un mode de génération simple qui utilise notre propre parseur JRST. L'avantage est de permettre une génération simplifiée et rapide qui convient parfaitement aux documents classiques. +Si jamais une fonctionnalité_ n'est pas disponible pour votre document, il est toujours possible d'utiliser l'`autre mode`_. + +.. contents:: Sommaire + +Le diagramme de Class +===================== + +.. image:: ../schemas/diagrammeClassJRSTParser.png + :alt: Diagramme de classes + :align: center + +La Class **AdvancedReader** à pour fonction de faciliter la lecture du fichier RST_ grâce à différentes méthodes : + - String readLine() : renvoie une ligne + - String[] readLines(int nombresLigne) : renvoie un certain nombre de lignes + - Stringn[] readWhile(Pattern p) : renvoie les lignes tant qu'elles correspondent au pattern + - ... + +La Class **JRSTLexer** utilise **AdvancedReader** pour construire un fichier XML, il parcours l'ensemble du document pour isoler les types de données, leurs paramètres et leurs contenus, donc rassembler toutes les informations utiles à la mise en forme du XML final. Il va commencer par l'entête du document (peekHeader(), peekDocInfo()) pour ensuite s'intéresser au corps (peekBody()). + +La Class **JRSTReader** utilise **JRSTLexer**, il interprète le XML qui lui est renvoyé pour construire le XML final. Celui-ci est conforme à la DTD définie par DocUtils_. Cette Class à parfois besoin de s'appeler elle même lorsque une partie du document doit être interprétée indépendamment du reste. Par exemple, s'il y a une liste dans une case d'un tableau, l'on extrait les informations de la case et on les interprètes, le contenu d'une admoniton (une note) doit lui aussi être considéré comme un document indépendant. Lorsque la génération est terminée, la Class compose le sommaire (composeContent()) puis s'occupe de toutes les spécificités « inline » (inline()), comme par exemple les mots en italique ou gras, les références, les footnotes... Tout ce qui peut apparaître à l'intérieur d'une ligne. + +La Class **reStructuredText** référence toutes les variables nécessaires à la génération du XML final. + +La Class **JRST** contient la méthode main(), elle gère les options, la lecture et l'écriture des fichiers. Elle lit le document, le parse grâce à la class **JRSTReader** puis applique le XSL désiré (si besoin) grâce à la class **JRSTGenerator**. + +La génération +============= + +.. image:: ../schemas/diagrammeGenerationJRSTParser.png + :alt: Arbre des différentes générations possibles + :align: center + +Références : + + * dn2dbk.xsl (conversion de xml de docutils vers docbook) : http://membres.lycos.fr/ebellot/dn2dbk + * les xsl de nwalsh (conversion de docbook vers FO et xhtml) : http://nwalsh.com + * IText (conversion de HTML vers PDF) : http://itextpdf.com/ + + +Exemple d'utilisation +===================== + + +L'on souhaite convertir le document rst (text.rst) suivant en html (text.html) : + +:: + + ===== + Titre + ===== + + :Author: Letellier Sylvain + + .. Attention:: texte à être réinterprété comme un fichier rst indépendant + ceci est considéré comme un **paragraphe** + +On utilise donc la commande suivante:: + + JRST --simple -t html -o text.html text.rst + +Ce diagramme de séquence décrit le fonctionnement du parseur tout au long de la génération : + +.. image:: ../schemas/diagrammeSequenceJRSTParser.png + :alt: Diagramme de séquence d'une génération + :align: center + +La Classe **JRSTGenerator**, grâce au fichier XSL rst2xhtml.xsl, renvoie le fichier html suivant:: + + <?xml version="1.0" encoding="UTF-8"?> + <html xmlns="http://www.w3.org/TR/xhtml1/strict"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <meta name="generator" content="JRST http://jrst.labs.libre-entreprise.org/"/> + <title>Titre</title> + </head> + <body> + <h1>Titre</h1> + <table class="docinfo" frame="void" rules="none"> + <col class="docinfo-name"/> + <col class="docinfo-content"/> + <tbody valign="top"> + <tr> + <th class="docpatterninfo-name">author :</th> + <td class="docinfo-content">Letellier Sylvain</td> + </tr> + </tbody> + </table> + <div class="attention"> + <p class="title">attention :</p> + <p class="body"> + <p>texte à être réinterprété comme un fichier rst indépendant + ceci est considéré comme un <strong>paragraphe</strong></p> + </p> + </div> + </body> + </html> + +Qui affiche la page (un CSS [1]_ à été ajouté pour la mise en forme) : + +.. topic:: Titre + + :Author: Letellier Sylvain + + .. Attention:: texte à être réinterprété comme un fichier rst indépendant + ceci est considéré comme un **paragraphe** + +.. [1] `Cascading Style Sheets`_ + +.. _Cascading Style Sheets: http://fr.wikipedia.org/wiki/Feuilles_de_style_en_cascade +.. _RST: http://docutils.sourceforge.net/rst.html +.. _DocUtils: http://docutils.sourceforge.net/docs/ref/doctree.html +.. _fonctionnalité: ../user/fonctionnalites.html +.. _`autre mode`: docDevDocutils.html Modified: branches/jrst-docutils-jython/jrst-doc/src/site/rst/devel/docDeveloppeur.rst =================================================================== --- branches/jrst-docutils-jython/jrst-doc/src/site/rst/devel/docDeveloppeur.rst 2012-06-01 15:05:38 UTC (rev 693) +++ branches/jrst-docutils-jython/jrst-doc/src/site/rst/devel/docDeveloppeur.rst 2012-06-04 14:42:30 UTC (rev 694) @@ -27,102 +27,33 @@ Documentation développeur ========================= -.. contents:: Sommaire +Les différentes générations +=========================== -Le diagramme de Class -===================== +Dans cette version de JRST, deux types de génération sont proposées à l'utilisateur : -.. image:: ../schemas/diagrammeClass.png - :alt: Diagramme de classes - :align: center +Utilisation de Jython_ et DocUtils_ +----------------------------------- -La classe **JRST** contient la méthode main(), elle gère les options, la lecture et l'écriture des fichiers. Elle appelle dans un premier temps la classe **PythonInterpreter** de Jython_ permettant d'exécuter les scripts en Python de DocUtils_ pour générer un fichier XML intermédiaire. Ensuite, il ne reste qu'à appliquer le ou les XSL désiré(s) (si besoin) grâce à la classe **JRSTGenerator**. +La première méthode utilise DocUtils_ pour générer le document XML intermédiaire. Cependant, les scripts étant écrits en Python, il nous faut passer par Jython_ pour les lancer dans la machine virtuelle java. +Cette méthode est la plus adaptée pour la génération de documents complexes et très structurés. -Ce diagramme de séquence décrit le fonctionnement du parseur tout au long de la génération : +Pour plus d'informations, vous pouvez visiter cette page_. -.. image:: ../schemas/diagrammeSequence.png - :alt: Diagramme de séquence d'une génération - :align: center -La génération -============= +Utilisation de notre propre parseur +----------------------------------- -.. image:: ../schemas/diagrammeGeneration.png - :alt: Arbre des différentes générations possibles - :align: center +La seconde méthode propose une génération plus simple et plus rapide mais celle-ci a l'inconvénient de proposer une implémentation incomplète de la spécification de ReStructuredText_. +Elle peut être utilisée dans le cadre de documents simples. -Référence : +Vous pouvez accéder à `cette page`_ pour des compléments d'information. - * dn2dbk.xsl (conversion de xml de docutils vers docbook) : http://membres.lycos.fr/ebellot/dn2dbk - * les xsl de nwalsh (conversion de docbook vers FO et xhtml) : http://nwalsh.com - * IText (conversion de HTML vers PDF) : http://itextpdf.com/ - -Exemple d'utilisation -===================== - - -L'on souhaite convertir le document rst (text.rst) suivant en html (text.html) : - -:: - - ===== - Titre - ===== - - :Author: Letellier Sylvain - - .. Attention:: texte à être réinterprété comme un fichier rst indépendant - ceci est considéré comme un **paragraphe** - -On utilise donc la commande suivante:: - - JRST -t html -o text.html text.rst - -La Classe **JRSTGenerator**, grâce au fichier XSL rst2xhtml.xsl, renvoie le fichier html suivant:: - - <?xml version="1.0" encoding="UTF-8"?> - <html xmlns="http://www.w3.org/TR/xhtml1/strict"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> - <meta name="generator" content="JRST http://jrst.labs.libre-entreprise.org/"/> - <title>Titre</title> - </head> - <body> - <h1>Titre</h1> - <table class="docinfo" frame="void" rules="none"> - <col class="docinfo-name"/> - <col class="docinfo-content"/> - <tbody valign="top"> - <tr> - <th class="docpatterninfo-name">author :</th> - <td class="docinfo-content">Letellier Sylvain</td> - </tr> - </tbody> - </table> - <div class="attention"> - <p class="title">attention :</p> - <p class="body"> - <p>texte à être réinterprété comme un fichier rst indépendant - ceci est considéré comme un <strong>paragraphe</strong></p> - </p> - </div> - </body> - </html> - -Qui affiche la page (un CSS [1]_ à été ajouté pour la mise en forme) : - -.. topic:: Titre - - :Author: Letellier Sylvain - - .. Attention:: texte à être réinterprété comme un fichier rst indépendant - ceci est considéré comme un **paragraphe** - Utilisation de XSL externe ========================== -JRST propose de transformer le XML de docutils_ avec des fichiers XSL [2]_ externe. +JRST propose de transformer le XML de docutils_ avec des fichiers XSL [1]_ externe. Pour cela, il faut utiliser la commande:: JRST -x fichierXSL, fichierXSL2 fichierRST @@ -132,14 +63,14 @@ JRST --xslFile fichierXSL, fichierXSL2 fichierRST JRST traitera le fichierRST, le XML de DocUtils_ qui est retourné sera transformé par la Class JRSTgenerator -en commençant par "fichierXSL" puis par "fichierXSL2". +en commençant par le fichierXSL puis par le fichierXSL2... -.. [1] `Cascading Style Sheets`_ -.. [2] Une documentation sur le XSL est diponible ici_. -.. _ici: ./presentationXSL.html -.. _Cascading Style Sheets: http://fr.wikipedia.org/wiki/Feuilles_de_style_en_cascade -.. _RST: http://docutils.sourceforge.net/rst.html +.. [1] Une documentation sur le XSL est diponible ici_. + +.. _page: docDevDocutils.html +.. _`cette page`: docDevJRSTParser.html +.. _ici: presentationXSL.html .. _DocUtils: http://docutils.sourceforge.net/docs/ref/doctree.html .. _Jython: http://jython.org/index.html - +.. _ReStructuredText: http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html Modified: branches/jrst-docutils-jython/jrst-doc/src/site/rst/index.rst =================================================================== --- branches/jrst-docutils-jython/jrst-doc/src/site/rst/index.rst 2012-06-01 15:05:38 UTC (rev 693) +++ branches/jrst-docutils-jython/jrst-doc/src/site/rst/index.rst 2012-06-04 14:42:30 UTC (rev 694) @@ -43,8 +43,11 @@ de créer rapidement un document pas trop complexe. RST_ dispose quant à lui d'une syntaxe tellement simple qu'elle en devient presque invisible. -JRST utilise Jython_ pour lancer des scripts de DocUtils_ afin de transformer le RST_ en XML de DocUtils permettant de créer une représentation en arbre d'un document. Il devient alors facile de générer une représentation du document vers différents formats. +Deux méthodes de génération sont proposées : + - La première utilise Jython_ pour lancer des scripts de DocUtils_ afin de transformer le RST_ en XML. Toutes les fonctionnalités proposées par ReStructuredText sont prises en comptes mais la génération est un peu plus longue puisque celle-ci est basée sur les scripts externes de DocUtils. + - La seconde utilise notre propre parseur JRST pour générer ce XML, ce qui permet d'obtenir de très bonne performances mais certaines fonctionnalités_ ne sont pas encore implémentées. +A partir du document XML, nous permettons la transformation en divers formats comme HTML ou PDF. Usage ----- @@ -52,9 +55,9 @@ JRST prend un fichier reStructuredText_ en entrée et génère un fichier XML qui pourra ensuite servir à produire divers formats de fichiers grâce à des fichiers XSL de générations. Les formats de sortie disponibles sont le html, le xhtml, le rst, -le pdf, le docbook_ ou de l'odt (Open-Office) [1]_. +le pdf, le docbook_ ou du XML [1]_. -Lorsque JRST est lancé sans argument, une interface graphique est proposée à l'utilisateur. Ainsi, on peut choisir plus aisément les fichiers, le type de sortie ou bien les feuilles de style XSL externes à appliquer. +Lorsque JRST est lancé sans argument, une interface graphique est proposée à l'utilisateur. Ainsi, on peut choisir plus aisément les fichiers, le type de sortie, les feuilles de style XSL externes à appliquer ou bien la génération simplifiée ou non. :: @@ -67,6 +70,7 @@ -t format, --outType format Pour préciser un format de sortie, donc utiliser un ou des fichiers XSL_ de génération. Plusieurs formats sont disponibles xhtml, docbook, xml, html, xdoc, pdf. -x xslFile, --xslFile xslFile Sert à préciser le fichier xsl de génération à utiliser. --force Forcer l'écriture d'un fichier, si le fichier de sortie existe, il sera remplacé. +--simple Utiliser notre propre parseur JRST pour générer le XML intermédiaire. Toutes les fonctionnalités ne sont pas implémentées mais la génération est plus rapide. --help Pour afficher les options disponibles : @@ -74,6 +78,7 @@ Usage: [options] FILE [--force] : overwrite existing out file + [--simple] : use our own parser to generate the file [--help] : display this help and exit [--outFile -o value] : Output file [--outType -t /xhtml|docbook|xml|html|xdoc|rst/] : Output type @@ -107,3 +112,4 @@ .. _LaTex: http://www.latex-project.org/ .. _DocUtils: http://docutils.sourceforge.net/docs/ref/doctree.html .. _Jython: http://jython.org/index.html +.. _fonctionnalités: ./user/fonctionnalites.html Added: branches/jrst-docutils-jython/jrst-doc/src/site/rst/user/fonctionnalites.rst =================================================================== --- branches/jrst-docutils-jython/jrst-doc/src/site/rst/user/fonctionnalites.rst (rev 0) +++ branches/jrst-docutils-jython/jrst-doc/src/site/rst/user/fonctionnalites.rst 2012-06-04 14:42:30 UTC (rev 694) @@ -0,0 +1,274 @@ +.. - +.. * #%L +.. * JRst :: Documentation +.. * +.. * $Id: fonctionnalites.rst 512 2010-11-22 14:47:17Z tchemit $ +.. * $HeadURL: http://svn.nuiton.org/svn/jrst/branches/jrst-docutils-jython/jrst-doc/src/si... $ +.. * %% +.. * Copyright (C) 2009 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + +========================= +Fonctionnalités proposées +========================= + +Sur cette page, nous listons les fonctionnalités proposées par notre parseur JRST. + +La DTD de Docutils est disponible ici : http://docutils.sourceforge.net/docs/ref/doctree.html + +.. contents:: Sommaire + +Fonctionnalités implantées +========================== + +Element racine +-------------- + +- document_ + +Elements titre +-------------- + +- subtitle_ +- title_ + +Elements bibliographiques +------------------------- + +- docinfo_ +- author_ +- authors_ +- organization_ +- address_ +- contact_ +- version_ +- revision_ +- status_ +- date_ +- copyright_ + +Elements de décoration +---------------------- + +- decoration_ +- footer_ +- header_ + +Elements structurels +-------------------- + +- section_ +- topic_ +- sidebar_ +- transition_ + +Elements du corps +----------------- + +- admonition_ +- attention_ +- block_quote_ +- bullet_list_ +- caution_ +- classifier_ +- danger_ +- definition_ +- definition_list_ +- definition_list_item_ +- description_ +- doctest_block_ +- enumerated_list_ +- error_ +- field_ +- field_body_ +- field_list_ +- field_name_ +- footnote_ +- hint_ +- image_ +- important_ +- line_ +- line_block_ +- list_item_ +- literal_block_ +- note_ +- option_ +- option_argument_ +- option_group_ +- option_list_ +- option_list_item_ +- option_string_ +- paragraph_ +- term_ +- tip_ +- warning_ + +Elements des tableaux +--------------------- + +- table_ +- tbody_ +- entry_ +- row_ +- colspec_ +- thead_ +- tgroup_ + +Elements de la ligne +-------------------- + +- emphasis_ +- strong_ +- literal_ +- reference_ +- footnote_reference_ + +Fonctionnalités non-implantées +============================== + +- abbreviation_ +- acronym_ +- attribution_ +- caption_ +- citation_ +- citation_reference_ +- comment_ +- compound_ +- container_ +- figure_ +- generated_ +- inline_ +- label_ +- legend_ +- pending_ +- problematic_ +- raw_ +- rubric_ +- subscript_ +- substitution_definition_ +- substitution_reference_ +- superscript_ +- system_message_ +- target_ +- title_reference_ + +.. _abbreviation: http://docutils.sourceforge.net/docs/ref/doctree.html#abbreviation +.. _acronym: http://docutils.sourceforge.net/docs/ref/doctree.html#acronym +.. _address: http://docutils.sourceforge.net/docs/ref/doctree.html#address +.. _admonition: http://docutils.sourceforge.net/docs/ref/doctree.html#admonition +.. _attention: http://docutils.sourceforge.net/docs/ref/doctree.html#attention + +.. _attribution: http://docutils.sourceforge.net/docs/ref/doctree.html#attribution +.. _author: http://docutils.sourceforge.net/docs/ref/doctree.html#author +.. _authors: http://docutils.sourceforge.net/docs/ref/doctree.html#authors +.. _block_quote: http://docutils.sourceforge.net/docs/ref/doctree.html#block-quote +.. _bullet_list: http://docutils.sourceforge.net/docs/ref/doctree.html#bullet-list +.. _caption: http://docutils.sourceforge.net/docs/ref/doctree.html#caption +.. _caution: http://docutils.sourceforge.net/docs/ref/doctree.html#caution +.. _citation: http://docutils.sourceforge.net/docs/ref/doctree.html#citation +.. _citation_reference: http://docutils.sourceforge.net/docs/ref/doctree.html#citation-reference + +.. _classifier: http://docutils.sourceforge.net/docs/ref/doctree.html#classifier +.. _colspec: http://docutils.sourceforge.net/docs/ref/doctree.html#colspec +.. _comment: http://docutils.sourceforge.net/docs/ref/doctree.html#comment +.. _compound: http://docutils.sourceforge.net/docs/ref/doctree.html#compound +.. _contact: http://docutils.sourceforge.net/docs/ref/doctree.html#contact +.. _container: http://docutils.sourceforge.net/docs/ref/doctree.html#container +.. _copyright: http://docutils.sourceforge.net/docs/ref/doctree.html#copyright +.. _danger: http://docutils.sourceforge.net/docs/ref/doctree.html#danger +.. _date: http://docutils.sourceforge.net/docs/ref/doctree.html#date + +.. _decoration: http://docutils.sourceforge.net/docs/ref/doctree.html#decoration +.. _definition: http://docutils.sourceforge.net/docs/ref/doctree.html#definition +.. _definition_list: http://docutils.sourceforge.net/docs/ref/doctree.html#definition-list +.. _definition_list_item: http://docutils.sourceforge.net/docs/ref/doctree.html#definition-list-item +.. _description: http://docutils.sourceforge.net/docs/ref/doctree.html#description +.. _docinfo: http://docutils.sourceforge.net/docs/ref/doctree.html#docinfo +.. _doctest_block: http://docutils.sourceforge.net/docs/ref/doctree.html#doctest-block +.. _document: http://docutils.sourceforge.net/docs/ref/doctree.html#document +.. _emphasis: http://docutils.sourceforge.net/docs/ref/doctree.html#emphasis + +.. _entry: http://docutils.sourceforge.net/docs/ref/doctree.html#entry +.. _enumerated_list: http://docutils.sourceforge.net/docs/ref/doctree.html#enumerated-list +.. _error: http://docutils.sourceforge.net/docs/ref/doctree.html#error +.. _field: http://docutils.sourceforge.net/docs/ref/doctree.html#field +.. _field_body: http://docutils.sourceforge.net/docs/ref/doctree.html#field-body +.. _field_list: http://docutils.sourceforge.net/docs/ref/doctree.html#field-list +.. _field_name: http://docutils.sourceforge.net/docs/ref/doctree.html#field-name +.. _figure: http://docutils.sourceforge.net/docs/ref/doctree.html#figure +.. _footer: http://docutils.sourceforge.net/docs/ref/doctree.html#footer + +.. _footnote: http://docutils.sourceforge.net/docs/ref/doctree.html#footnote +.. _footnote_reference: http://docutils.sourceforge.net/docs/ref/doctree.html#footnote-reference +.. _generated: http://docutils.sourceforge.net/docs/ref/doctree.html#generated +.. _header: http://docutils.sourceforge.net/docs/ref/doctree.html#header +.. _hint: http://docutils.sourceforge.net/docs/ref/doctree.html#hint +.. _image: http://docutils.sourceforge.net/docs/ref/doctree.html#image +.. _important: http://docutils.sourceforge.net/docs/ref/doctree.html#important +.. _inline: http://docutils.sourceforge.net/docs/ref/doctree.html#inline +.. _label: http://docutils.sourceforge.net/docs/ref/doctree.html#label + +.. _legend: http://docutils.sourceforge.net/docs/ref/doctree.html#legend +.. _line: http://docutils.sourceforge.net/docs/ref/doctree.html#line +.. _line_block: http://docutils.sourceforge.net/docs/ref/doctree.html#line-block +.. _list_item: http://docutils.sourceforge.net/docs/ref/doctree.html#list-item +.. _literal: http://docutils.sourceforge.net/docs/ref/doctree.html#literal +.. _literal_block: http://docutils.sourceforge.net/docs/ref/doctree.html#literal-block +.. _note: http://docutils.sourceforge.net/docs/ref/doctree.html#note +.. _option: http://docutils.sourceforge.net/docs/ref/doctree.html#option +.. _option_argument: http://docutils.sourceforge.net/docs/ref/doctree.html#option-argument + +.. _option_group: http://docutils.sourceforge.net/docs/ref/doctree.html#option-group +.. _option_list: http://docutils.sourceforge.net/docs/ref/doctree.html#option-list +.. _option_list_item: http://docutils.sourceforge.net/docs/ref/doctree.html#option-list-item +.. _option_string: http://docutils.sourceforge.net/docs/ref/doctree.html#option-string +.. _organization: http://docutils.sourceforge.net/docs/ref/doctree.html#organization +.. _paragraph: http://docutils.sourceforge.net/docs/ref/doctree.html#paragraph +.. _pending: http://docutils.sourceforge.net/docs/ref/doctree.html#pending +.. _problematic: http://docutils.sourceforge.net/docs/ref/doctree.html#problematic +.. _raw: http://docutils.sourceforge.net/docs/ref/doctree.html#raw + +.. _reference: http://docutils.sourceforge.net/docs/ref/doctree.html#reference +.. _revision: http://docutils.sourceforge.net/docs/ref/doctree.html#revision +.. _row: http://docutils.sourceforge.net/docs/ref/doctree.html#row +.. _rubric: http://docutils.sourceforge.net/docs/ref/doctree.html#rubric +.. _section: http://docutils.sourceforge.net/docs/ref/doctree.html#section +.. _sidebar: http://docutils.sourceforge.net/docs/ref/doctree.html#sidebar +.. _status: http://docutils.sourceforge.net/docs/ref/doctree.html#status +.. _strong: http://docutils.sourceforge.net/docs/ref/doctree.html#strong +.. _subscript: http://docutils.sourceforge.net/docs/ref/doctree.html#subscript + +.. _substitution_definition: http://docutils.sourceforge.net/docs/ref/doctree.html#substitution-definitio... +.. _substitution_reference: http://docutils.sourceforge.net/docs/ref/doctree.html#substitution-reference +.. _subtitle: http://docutils.sourceforge.net/docs/ref/doctree.html#subtitle +.. _superscript: http://docutils.sourceforge.net/docs/ref/doctree.html#superscript +.. _system_message: http://docutils.sourceforge.net/docs/ref/doctree.html#system-message +.. _table: http://docutils.sourceforge.net/docs/ref/doctree.html#table +.. _target: http://docutils.sourceforge.net/docs/ref/doctree.html#target +.. _tbody: http://docutils.sourceforge.net/docs/ref/doctree.html#tbody +.. _term: http://docutils.sourceforge.net/docs/ref/doctree.html#term + +.. _tgroup: http://docutils.sourceforge.net/docs/ref/doctree.html#tgroup +.. _thead: http://docutils.sourceforge.net/docs/ref/doctree.html#thead +.. _tip: http://docutils.sourceforge.net/docs/ref/doctree.html#tip +.. _title: http://docutils.sourceforge.net/docs/ref/doctree.html#title +.. _title_reference: http://docutils.sourceforge.net/docs/ref/doctree.html#title-reference +.. _topic: http://docutils.sourceforge.net/docs/ref/doctree.html#topic +.. _transition: http://docutils.sourceforge.net/docs/ref/doctree.html#transition +.. _version: http://docutils.sourceforge.net/docs/ref/doctree.html#version +.. _warning: http://docutils.sourceforge.net/docs/ref/doctree.html#warning Modified: branches/jrst-docutils-jython/jrst-doc/src/site/rst/user/index.rst =================================================================== --- branches/jrst-docutils-jython/jrst-doc/src/site/rst/user/index.rst 2012-06-01 15:05:38 UTC (rev 693) +++ branches/jrst-docutils-jython/jrst-doc/src/site/rst/user/index.rst 2012-06-04 14:42:30 UTC (rev 694) @@ -43,18 +43,22 @@ de créer rapidement un document pas trop complexe. RST_ dispose quant à lui d'une syntaxe tellement simple qu'elle en devient presque invisible. -JRST utilise Jython_ pour lancer des scripts de DocUtils_ afin de transformer le RST_ en XML de DocUtils permettant de créer une représentation en arbre d'un document. Il devient alors facile de générer une représentation du document vers différents formats. +Deux méthodes de génération sont proposées : + - La première utilise Jython_ pour lancer des scripts de DocUtils_ afin de transformer le RST_ en XML. Puisque celle-ci est basée sur les scripts externes de DocUtils, toutes les fonctionnalités proposées par ReStructuredText sont prises en comptes mais la génération est un peu plus longue. + - La seconde utilise notre propre parseur JRST pour générer ce XML, ce qui permet d'obtenir de très bonne performances mais certaines fonctionnalités_ ne sont pas encore implémentées. +A partir du document XML, nous permettons la transformation en divers formats comme HTML ou PDF. + Usage ----- JRST prend un fichier reStructuredText_ en entrée et génère un fichier XML qui pourra ensuite servir à produire divers formats de fichiers grâce à des fichiers XSL de générations. Les formats de sortie disponibles sont le html, le xhtml, le rst, -le pdf, le docbook_ ou de l'odt (Open-Office) [1]_. +le pdf, le docbook_ ou du XML [1]_. -Lorsque JRST est lancé sans argument, une interface graphique est proposée à l'utilisateur. Ainsi, on peut choisir plus aisément les fichiers, le type de sortie ou bien les feuilles de style XSL externes à appliquer. +Lorsque JRST est lancé sans argument, une interface graphique est proposée à l'utilisateur. Ainsi, on peut choisir plus aisément les fichiers, le type de sortie, les feuilles de style XSL externes à appliquer ou bien la génération simplifiée ou non. :: @@ -63,17 +67,19 @@ Cette commande aura pour effet de convertir le fichier myfile.rst en XML qui sera affiché sur la sortie standard (console). Plusieurs options sont disponibles : --o file, --outFile=file Pour rediriger la sortie vers un fichier. --t format, --outType format Pour préciser un format de sortie, donc utiliser un ou des fichiers XSL_ de génération. Plusieurs formats sont disponibles xhtml, docbook, xml, html, xdoc, pdf. --x xslFile, --xslFile xslFile Sert à préciser le fichier xsl de génération à utiliser. ---force Forcer l'écriture d'un fichier, si le fichier de sortie existe, il sera remplacé. ---help Pour afficher les options disponibles : +-o file,--outFile=file pour rediriger la sortie vers un fichier. +-t format,--outType format pour préciser un format de sortie, donc utiliser un ou des fichiers XSL_ de génération. Plusieurs formats sont disponibles xhtml, docbook, xml, html, xdoc, rst, pdf, odt, rtf. +-x xslFile,--xslFile xslFile sert à préciser le fichier xsl de génération à utiliser. +--force forcer l'écriture d'un fichier, si le fichier de sortie existe, il sera remplacé. +--simple Utiliser notre propre parseur JRST pour générer le XML intermédiaire. Toutes les fonctionnalités ne sont pas implémentées mais la génération est plus rapide. +--help pour afficher les options disponibles : :: Usage: [options] FILE [--force] : overwrite existing out file + [--simple] : use our own parser to generate the file [--help] : display this help and exit [--outFile -o value] : Output file [--outType -t /xhtml|docbook|xml|html|xdoc|rst/] : Output type @@ -99,10 +105,11 @@ .. [1] Seul les formats html, xhtml, DocBook_, xdoc et pdf sont disponible pour le moment. -.. _reStructuredText: ./user/presentationRST.html -.. _RST: ./user/presentationRST.html +.. _reStructuredText: presentationRST.html +.. _RST: presentationRST.html +.. _fonctionnalités: fonctionnalites.html .. _Maven: http://maven.apache.org/ -.. _XSL: http://jrst.labs.libre-entreprise.org/fr/devel/presentationXSL.rst +.. _XSL: ../devel/presentationXSL.html .. _DocBook: http://www.docbook.org/ .. _LaTex: http://www.latex-project.org/ .. _DocUtils: http://docutils.sourceforge.net/docs/ref/doctree.html Modified: branches/jrst-docutils-jython/jrst-doc/src/site/site_en.xml =================================================================== --- branches/jrst-docutils-jython/jrst-doc/src/site/site_en.xml 2012-06-01 15:05:38 UTC (rev 693) +++ branches/jrst-docutils-jython/jrst-doc/src/site/site_en.xml 2012-06-04 14:42:30 UTC (rev 694) @@ -60,7 +60,10 @@ </menu> <menu name="Developer"> - <item name="Documentation" href="/devel/developerDoc.html"/> + <item name="Documentation" href="/devel/developerDoc.html"> + <item name="Generation with Jython and DocUtils" href="/devel/docDeveloppeurDocutils.html"/> + <item name="Generation with JRST Parser" href="/devel/docDeveloppeurJRSTParser.html"/> + </item> <item name="A XSL primer" href="/devel/XSLpresentation.html"/> <item name="Librairy used" href="/devel/library.html"/> <item name="External documentation" href="/devel/externalDoc.html"/> Modified: branches/jrst-docutils-jython/jrst-doc/src/site/site_fr.xml =================================================================== --- branches/jrst-docutils-jython/jrst-doc/src/site/site_fr.xml 2012-06-01 15:05:38 UTC (rev 693) +++ branches/jrst-docutils-jython/jrst-doc/src/site/site_fr.xml 2012-06-04 14:42:30 UTC (rev 694) @@ -60,7 +60,10 @@ </menu> <menu name="Developpeur"> - <item name="Fonctionnement" href="/devel/docDeveloppeur.html"/> + <item name="Fonctionnement" href="/devel/docDeveloppeur.html" collapse="true"> + <item name="Fonctionnement avec Jython et DocUtils" href="/devel/docDeveloppeurDocutils.html"/> + <item name="Fonctionnement avec JRST Parser" href="/devel/docDeveloppeurJRSTParser.html"/> + </item> <item name="Presentation du XSL" href="/devel/presentationXSL.html"/> <item name="Librairies utilisées" href="/devel/librairies.html"/> <item name="Documentation externe" href="/devel/docExterne.html"/>
participants (1)
-
jpages@users.nuiton.org