SUBMITTING_DOCS 4.2 KB

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