quantum-espresso/dev-tools
kokalj 14816d87e3 adding a neb.x awareness
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@7669 c92efa57-630b-4861-b058-cf58834340f0
2011-04-06 10:38:06 +00:00
..
helpdoc.d adding one exception to def vs module file comparison for automatic 2008-12-02 12:13:47 +00:00
Makefile small adaptation needed by toplevel "make doc" 2009-07-17 08:42:54 +00:00
README.helpdoc added instructions for package installation on Redhat based distributions 2008-06-13 11:06:57 +00:00
callhtml.pl Directory dev-tools/, containing various scripts, added - for the time 2008-02-18 21:45:41 +00:00
calltree.pl Directory dev-tools/, containing various scripts, added - for the time 2008-02-18 21:45:41 +00:00
check_gui adding a neb.x awareness 2011-04-06 10:38:06 +00:00
guihelp.xsl Commiting the "check_gui" utility: a long-wished script that checks for the syncronization of the PWgui, which is now possible due to migration to INPUT_*.def makrup-ed files. 2008-05-08 18:26:26 +00:00
helpdoc cleanup 2008-05-08 18:21:23 +00:00
helpdoc.schema moving helpdoc.schema README.helpdoc to dev-tools/ 2008-05-08 18:20:21 +00:00
release.sh Packaging script updated 2011-04-01 07:39:33 +00:00
src-normal dev-tools/src-normal: simple python script to normalize Fortran 90 source code (N. Nemec) 2010-05-14 14:56:29 +00:00
src-normal.py dev-tools/src-normal: simple python script to normalize Fortran 90 source code (N. Nemec) 2010-05-14 14:56:29 +00:00
update_gui_help some minor but helpful updates of semi-automatic procedure for updating pwgui 2010-05-04 10:23:10 +00:00

README.helpdoc

          ---------------------------------
          *** README file for HELPDOC  ***
          ---------------------------------


1. HELPDOC PURPOSE

   Short: transform INPUT_*.def into INPUT_*.xml|html|txt 

   HELPDOC is a small utility (located in ../dev-tools/) that
   transforms INPUT_*.def files into INPUT_*.txt and INPUT_*.xml
   files, and the latter are accordingly transformed into HTML format.

   The idea is to enhance/replace the plain ascii descriptions of
   input file syntax (i.e. INPUT_* files) with more structured and
   descriptive format yielding an enhanced documentation + better
   input syntax definition.



--
2. SOFTWARE REQUIREMENTS

   Helpdoc depends on tclsh, tcllib, and xsltproc. For example, to
   install these packages in GNU/Linux Debian-based distributions,
   execute as root (or sudo):
   
	apt-get install tcl tcllib xsltproc

   or, on RedHat-based distributions, the analogous command 

        yum install tcl tcllib xsltproc

--   
3. SYNTAX OF *.def FILES

   Perhaps the first choice for a markup would be XML, yet its markup
   is not very practical from typing point of view. Therefore *.def
   files use a markup that involves less typing (i.e. like wiki's use
   more practical markup than HTML).

   Consider an XML example:

     <var name="etot_conv_thr" type="REAL">
     	<default> 1.0D-4 </default>
     	<info>
     	   convergence threshold on total energy (a.u) for ionic ...
     	</info>
     </var>

   The DEF markup (*.def) is more compact---involves less syntactic
   sugar---but is otherwise equally well-defined:

     var etot_conv_thr -type REAL {
         default { 1.0D-4 }
         info {
       	    convergence threshold on total energy (a.u) for ionic ...
         }	    
     }

   Full correspondence between XML and DEF markup is:

      XML:  <element attribute="value"> ... </element> 
      DEF:  element -attribute value { ... }

   Technically, DEF files are Tcl-scripts (hence they use the Tcl
   syntax).


   3.1  Differences between DEF and XML:

   * some elements must have a name attribute (e.g. variable and
     namelist must always have a name). For such elements the markup
     is simplified from "element -name ident ..." to "element ident
     ..." (i.e. -name is skipped).


   * attributes must be specified on a single line:

       # this is OK
       elem1 -attr1 value1 -attr2 value2 { ... }     
       
       # this is BAD
       elem1 -attr1 value1 
             -attr2 value2  { ... }                         
       
       # but this is OK (because of line-continuation character "\")
       elem1 -attr1 value1 \
                -attr2 value2 { ... }                                  


   * separator between elements is either newline character or
     semicolon (;). E.g.:
	 
       # this is OK
       element1 -attribute1 value1 { ... }; element2 -attribute2 value2 { ... }
       
       # this is BAD
       element1 -attribute1 value1 { ... } element2 -attribute2 value2 { ... }
       
       # this is OK
       element1 -attribute1 value1 { ... }
       element2 -attribute2 value2 { ....}


   The DEF markup (elements and attributes) is defined in file
   ./helpdoc.schema (which uses its own schema language that was
   inspired by RELAX NG schema language).

   Making use of an element and/or attribute in *.def files which is
   not defined in helpdoc.schema file, will produce an error during
   def-->xml conversion (otherwise the helpdoc is not a full
   validator).


--
4. HOW IT ALL WORKS

   To transform INPUT_*.def file to INPUT_*.xml and INPUT_*.html
   file, execute

   either:
    	 ../dev-tools/helpdoc INPUT_whatever.def

   or simply: 
      	 make INPUT_whatever.html

   To convert all *.def to *.html files, use: make helpdoc

   During execution, the helpdoc transforms the *.def file into *.xml
   file and calls the xsltproc program that transforms the latter into
   *.html file. The instructions for doing that are provided by an XSL
   stylesheet (file: ./input_xx.xsl).


5. TO DO ...

   Put here more descriptions on the markup ...