SUBMITTING_DOCS 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. NOTE: Please improve this list!
  2. Dear (new) GRASS developer,
  3. when submitting documentation to GRASS SVN repository, please take
  4. care of following rules:
  5. [ see SUBMITTING for C hints ]
  6. [ see SUBMITTING_PYTHON for Python code hints ]
  7. 0. Introduction
  8. There are two types of documentation
  9. - Libraries programmers docs: we use doxygen and document the functions
  10. directly in the source code. See lib/gis/*.c and lib/gis/gislib.dox for examples
  11. - User manual: we write it in simple HTML, storing the manual in a
  12. file '<module>.html' within the subdirectory of the module.
  13. The file contains no header nor footer. The complete HTML file is
  14. autogenerated during the compilation process (indeed, it is generated
  15. in a virtual session directly after compilation of the module).
  16. In this virtual session the module is called internally with
  17. --html-description which generates the parameters/flags list in
  18. HTML format, along with '<module>.html', HTML header and footer
  19. the final HTML manual page is created and stored in the target
  20. binaries directory. In a separate process the MAN format is
  21. generated from the complete HTML files.
  22. 1. Editing of HTML pages
  23. To avoid insertion of too complicated HTML tags (see also below),
  24. we strongly suggest to use a plain text editor rather than a
  25. HTML editor for editing.
  26. 2. Module manual page:
  27. Place the documentation in HTML format into '<module>.html', where
  28. <module> is the name of the module. E.g. if the module is named
  29. r.example, the documentation file should be named r.example.html.
  30. The easiest way to do this is to study an existing HTML page
  31. (to get the page style, e.g. vector/v.to.db/v.to.db.html).
  32. With a few exceptions, header and footer are NOT allowed.
  33. You can add figures (PNG format); the figure name prefix should be the
  34. module name. See raster/r.terraflow/r.terraflow.html for an example.
  35. A number of major sections should be present in each help page.
  36. * = Required
  37. ! = Suggested
  38. . = Optional
  39. In recommended order
  40. --------------------
  41. * <h2>DESCRIPTION</h2>
  42. ! <h2>NOTE</H2>, <h2>NOTES</h2>
  43. ! <h2>EXAMPLE</h2>, <h2>EXAMPLES</h2>
  44. . <h2>TODO</h2>
  45. . <h2>BUGS</h2>
  46. . <h2>REFERENCE</h2>, <h2>REFERENCES</h2>
  47. * <h2>SEE ALSO</h2>
  48. * <h2>AUTHOR</h2>, <h2>AUTHORS</h2>
  49. Note that the parameter information is auto-generated upon
  50. compilation. This is done by running the module in a virtual session
  51. after compilation (see the output of 'make'). To subsequently
  52. verify the final HTML page, check the resulting HTML pages which
  53. will be stored with the name of the module.
  54. Examples (please add some) should be coded like this:
  55. <div class="code"><pre>
  56. v.to.db map=soils type=area option=area column=area_size unit=h
  57. </pre></div>
  58. The online WWW man pages is updated every Saturday (from SVN
  59. repository).
  60. 3. Usage of limited HTML tags
  61. Since the MAN conversion of g.html2man is limited, please use
  62. no other HTML tags than:
  63. <a> <b> <blink> <body> <br> <code> <dd> <dl> <dt> <em>
  64. <h2> <h3> <h4> <head> <header> <hr> <i> <img> <li> <ol> <p>
  65. <pre> <sup> <table> <td> <th> <title> <tr> <ul>
  66. 4. Suggested HTML markup protocol:
  67. Module names (i.e., v.category) should be emphsized with <em>,
  68. and boldface <b> for flags and parameter names. Shell commands,
  69. names, values, etc. should use <tt>. Empahsized phrases should use
  70. italics <i>. The SEE ALSO section of each page should also be
  71. alphabetized.
  72. 5. When submitting new files to the repository set SVN properties,
  73. e.g. for HTML file
  74. svn:mime-type : text/html
  75. svn:keywords : Author Date Id
  76. svn:eol-style : native
  77. See
  78. http://svnbook.red-bean.com/en/1.4/svn.advanced.props.html
  79. 6. See also
  80. http://grass.osgeo.org/wiki/Updating_GRASS_Documentation
  81. ...
  82. [please add further hints if required]
  83. "Your attention to detail is appreciated."