SUBMITTING_DOCS 4.0 KB

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