PageRenderTime 61ms CodeModel.GetById 31ms RepoModel.GetById 1ms app.codeStats 0ms

/epydoc-3.0.1/doc/relatedprojects.html

https://gitlab.com/gregas/QSTK
HTML | 319 lines | 262 code | 56 blank | 1 comment | 0 complexity | 4e3641de97fc5f1bd5fac10d21e47e83 MD5 | raw file
  1. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
  2. <html> <head>
  3. <title>Related Projects</title>
  4. <link rel="stylesheet" href="epydoc.css" type="text/css"/>
  5. </head>
  6. <!-- $Id: relatedprojects.html 1211 2006-04-10 19:38:37Z edloper $ -->
  7. <body>
  8. <div class="body">
  9. <h1> Related Projects</h1>
  10. <h2> 1. Doc-sig </h2>
  11. <p> <a href="http://www.python.org/sigs/doc-sig/">Doc-sig</a> is a
  12. Python special interest group dedicated to producing documentation and
  13. documentation tools for Python. Much of my work on epydoc was
  14. influenced by conversations on the <a
  15. href="http://mail.python.org/pipermail/doc-sig/">doc-sig mailing
  16. list</a>.
  17. <h2> 2. Python API Extraction Tools </h2>
  18. <p> Several tools have been created to extract API documentation from
  19. Python. This section describes the tools that I have looked at, and
  20. compares them to epydoc. If I left out any tools, please let me know.
  21. <h3> 2.1. Pydoc </h3>
  22. <p> <a href="http://web.lfw.org/python/pydoc.html">Pydoc</a> is the
  23. only widely accepted API documentation tool for Python. It became
  24. part of the standard library in Python 2.1. Pydoc defines three basic
  25. modes of operation: </p>
  26. <ul>
  27. <li> The a command line interface that creates output that is
  28. similar to the manual pages shown by the unix man command.
  29. It can also be used to search for keywords, like the unix
  30. apropos command. </li>
  31. <li> Pydoc can be used to create formatted HTML pages. For an
  32. example of the html output of pydoc, see the <a
  33. href="http://web.lfw.org/python/pydoc.html">pydoc homepage</a>,
  34. which was created using pydoc. </li>
  35. <li> Pydoc provides interactive help from the Python interpreter,
  36. via the <code>help</code> function:
  37. <div class="screen"><pre>
  38. <code class="prompt">&gt;&gt;&gt;</code> <code class="user"><code class="keyword">from</code> pydoc <code class="keyword">import</code> help</code>
  39. <code class="prompt">&gt;&gt;&gt;</code> <code class="user">help(x_intercept)</code>
  40. <code class="output">Help on function x_intercept in module __main__:
  41. <b>x_intercept</b>(m, b)
  42. Return the x intercept of the line y=m*x+b. The x intercept of a
  43. line is the point at which it crosses the x axis (y=0).</code>
  44. </pre></div>
  45. </li>
  46. </ul>
  47. <p> One limitation of pydoc (and perhaps one of the reasons that it
  48. was able to become widely accepted) is that it does make any
  49. assumptions about how docstrings are formatted; it simply displays
  50. them as they are, with a fixed-width font. As a result, no special
  51. formatting can be applied to the text; and there is no way to let
  52. pydoc know what parts of the docstring describe specific fields, like
  53. parameters or variables. On the other hand, this lack of assumptions
  54. about formatting guarantees that pydoc can be used with any Python
  55. code. </p>
  56. <p> Like epydoc, pydoc derives information about Python objects by
  57. using introspection. This allows pydoc to be used on both Python and
  58. builtin (C) modules; but it also means that pydoc does not have access
  59. to some types of information (such as where objects are imported
  60. from), and it means that pydoc can only document modules that can be
  61. safely imported. </p>
  62. <p> Pydoc fills a very useful niche, and I use it on a regular basis
  63. to check the documentation of Python objects. But for documenting my
  64. own projects, I prefer to use a tool that can make use of formatting
  65. conventions in the docstrings. </p>
  66. <h3> 2.2. HappyDoc </h3>
  67. <p> Aside from pydoc, <a
  68. href="http://happydoc.sourceforge.net/">HappyDoc</a> is probably the
  69. most widely used API documentation tool for Python. It is used by at
  70. least 5 major projects, including Numerical Python. For an example of
  71. the HTML output produced by happydoc, see the <a
  72. href="http://happydoc.sourceforge.net/">HappyDoc homepage</a>, which
  73. was created using HappyDoc. </p>
  74. <p> HappyDoc is the most flexible API documentation tool currently
  75. available. It supports several different docstring markup languages,
  76. including StructuredText; StructuredTextNG; plain text; raw text; and
  77. MML. It can produce a wide variety of output formats, including HTML,
  78. text files, DocBook, and Dia. </p>
  79. <p> Unlike epydoc, HappyDoc derives information about Python objects
  80. by parsing the Python source files. This means that HappyDoc can be
  81. used to document modules that cannot be safely imported, and that it
  82. has access to some types of information that are difficult to retrieve
  83. via introspection. This also allows HappyDoc objects to be documented
  84. using comments as well as docstrings. However, since HappyDoc gets
  85. information about Python objects by parsing Python source files, it
  86. cannot be used on builtin (C) modules. </p>
  87. <p> I considered integrating epydoc with HappyDoc (as a docstring
  88. converter for epytext and a formatter for epydoc's html output), but I
  89. decided that it would be too difficult. In particular, it would
  90. require signifigant work to port epydoc's html output code, because of
  91. the differences in how epydoc and HappyDoc derive and store
  92. information about Python objects. Also, HappyDoc does not appear to
  93. have a mechanism for associating descriptions with specific fields
  94. (such as paremeters of a function). However, I may decided at some
  95. point to implement a docstring converter for epytext, since that would
  96. at least allow me to use HappyDoc to generate DocBook and pdf versions
  97. of API documentation. </p>
  98. <h3> 2.3. Docutils </h3>
  99. <p> <a href="http://docutils.sourceforge.net/">Docutils</a> is a
  100. project to create a modular framework for Python API documentation
  101. generation. The project looks promising, but it is still under
  102. construction. Once it is completed, it may become the standard
  103. framework for Python API documentation tools. If it does, then I may
  104. decide to integrate epydoc with it. </p>
  105. <p> The markup language of choice for Docutils is reStructuredText.
  106. reStructuredText is a fairly powerful markup language, with some of
  107. the same goals as epytext. However, it is designed to be used for a
  108. wide variety of tasks, and some of its features may not be very useful
  109. for API documentation. The markup language itself is too complicated
  110. for my taste, using a wide variety of context-dependant rules to try
  111. to "guess" what you mean. In comparison, epytext is much simpler,
  112. with six simple block structure constructs, and one inline markup
  113. construct. If Docutils becomes the standard framework for API
  114. documentation generation, epytext might provide a simpler markup
  115. language for people who find reStructuredText too complex. </p>
  116. <p> Porting the epydoc HTML output system to Docutils may prove
  117. difficult, for some of the same reasons mentioned above for HappyDoc.
  118. However, if Docutils becomes the standard framework for API
  119. documentation tools, then I may try to port it. </p>
  120. <h3> 2.4. Pythondoc </h3>
  121. <p> <a
  122. href="http://starship.python.net/crew/danilo/pythondoc/">Pythondoc</a>
  123. is a Python API documentation tool that uses StructuredText for
  124. markup, and can produce HTML and XML output. It uses XML as an
  125. intermediate representation, to simplify the addition of new output
  126. formats. </a>
  127. <h3> 2.5. Crystal </h3>
  128. <p> <a
  129. href="http://www.btinternet.com/~tratt/comp/python/crystal/">Crystal</a>
  130. is a Python API documentation tool that produces output that is
  131. similar to Javadoc. Its homepage includes <a
  132. href="http://www.btinternet.com/~tratt/comp/python/crystal/sample/index.html">a
  133. sample of the output it generates</a>. </p>
  134. <h3> 2.6. Easydoc </h3>
  135. <p> <a href="http://htmltmpl.sourceforge.net/easydoc.html">Easydoc</a>
  136. is a Python API documentation tool based on <a
  137. href="http://htmltmpl.sourceforge.net/">htmltmpl</a>. It uses an
  138. HTML-like markup language, similar to the language used by Javadoc;
  139. and produces HTML output. </p>
  140. <h3> 2.7. Teud </h3>
  141. <p> <a
  142. href="http://twistedmatrix.com/users/jh.twistd/python/moin.cgi/TeudProject">Teud</a>
  143. is a Python API documentation tool that does not apply any formatting
  144. to docstrings (like pydoc). It produces XML output, which can then be
  145. transformed to HTML using an XSLT stylesheet. Its homepage includes
  146. <a
  147. href="http://twistedmatrix.com/users/jh/teud/Twisted/twisted.html">a
  148. sample of the output it generates</a>. </p>
  149. <h3> 2.8. XIST </h3>
  150. <p> <a href="http://www.livinglogic.de/Python/xist/index.html">XIST</a>
  151. is an XML based extensible HTML generator written in Python. It can
  152. be used to produce API documentation in HTML. </p>
  153. <h3> 2.9. HTMLgen </h3>
  154. <p> <a
  155. href="http://starship.python.net/crew/friedrich/HTMLgen/html/main.html">HTMLgen</a>
  156. is a Python library for generating HTML documents. It can be used to
  157. produce API documentation; for an example of its output, see the <a
  158. href="http://starship.python.net/crew/friedrich/HTMLgen/html/index.html">HTMLgen
  159. Manual</a> </p>
  160. <h3> 2.10. doc.py </h3>
  161. <a
  162. href="http://www.lemburg.com/files/python/SoftwareDescriptions.html#doc.py">doc.py</a>
  163. is a Python API documentation tool that is no longer under active
  164. development. It uses an unspecified markup langauge, and produces
  165. HTML output. For an example of its output, see its <a
  166. href="http://www.lemburg.com/files/python/PythonStuff.html">API
  167. documentation</a>. </p>
  168. <h2> 3. API Extraction Tools for Other Languages </h2>
  169. <h3> 3.1. Javadoc </h3>
  170. <p> <a href="http://java.sun.com/j2se/javadoc/">Javadoc</a> is the
  171. standard API documentation tool for Java. It uses special comments to
  172. document classes, interfaces, methods, and variables. Its markup
  173. language consists of HTML, extended with a few special constructs such
  174. as fields. The javadoc program extracts the API documentation, and
  175. converts it into a set of HTML pages. For an example of the HTML
  176. output produced by javadoc, see the <a
  177. href="http://java.sun.com/j2se/1.4/docs/api/index.html">j2se 1.4 API
  178. specification</a>. </p>
  179. <p> The use of HTML as a markup language for API documentation has two
  180. major disadvantages. First, HTML is quite verbose, which makes it
  181. inconvenient to write and read the documentation. Second, it means
  182. that the only supported output format is HTML; API documentation
  183. cannot be rendered in other formats, such as pdf. </p>
  184. <p> On the other hand, the use of HTML has some significant
  185. advantages. First, HTML is widely used and widely known, so most
  186. programmers don't need to learn a new markup language. Second, the
  187. use of HTML simplifies the construction of documentation formatting
  188. tools. And finally, HTML provides a great deal of freedom for
  189. including complex constructs in the API documentation, such as tables,
  190. charts, and images. </p>
  191. <p> Javadoc was the original inspiration for epydoc, and I adopted its
  192. use of fields. However, I decided that HTML was too verbose and
  193. complex of a markup language, and decided to create a simpler markup
  194. language instead. </p>
  195. <h3> 3.2. Doxygen </h3>
  196. <p> <a href="http://www.doxygen.org/">Doxygen</a> is an API
  197. documentation tool for for C++, C, Java, and IDL. It is the most
  198. commonly used API documentation tool for C and C++. It uses a fairly
  199. complex markup language, which can handle everything from lists to
  200. crossreferences to mathematical formulas. It can output the API
  201. documentation as HTML, LaTeX, Postscript, PDF, RTF, and Unix man
  202. pages. It also has a number of advanced features that are not
  203. supported by any other API documentation tools that I know of, such as
  204. producing call graphs using dot; and rendering LaTeX-style
  205. mathematical formulas. </p>
  206. <h3> 3.3. POD </h3>
  207. <p> <a
  208. href="http://www.perldoc.com/perl5.8.0/pod/perlpod.html">POD</a>
  209. (Plain Old Documentation) is the standard API documentation tool for
  210. Perl. POD defines a simple low-level markup language that integrates
  211. well with the Perl parser. Tools exist to convert POD documentation
  212. into a variety of formats, including HTML and man pages. For an
  213. example of the HTML output produced for POD, see the <a
  214. href="http://www.perldoc.com/perl5.6.1/pod.html">Perldoc POD Page</a>
  215. </p>
  216. <p> The inline markup construct (<code>x{...}</code>) used by epydoc
  217. was partially inspired by the POD inline markup construct
  218. (<code>x&lt;...&gt;</code>). However, I decided to use curly braces
  219. instead of angle braces, because it significantly reduces the need for
  220. escaping. A matching pair of curly braces is only interpreted as
  221. markup if the left brace is immediately preceeded by a capital letter;
  222. thus, you only need to use escaping if: </p>
  223. <ol>
  224. <li> You want to include a single (un-matched) curly brace.
  225. <li> You want to preceed a matched pair of curly braces with a
  226. capital letter. </li>
  227. </ol>
  228. <p> Note that there is no valid Python expression where a pair of
  229. matched curly braces is immediately preceeded by a capital letter
  230. (except within string literals); so case (2) is unlikely to cause any
  231. problems. </p>
  232. <h3> 3.4. Other Tools </h3>
  233. <p> The Doxygen page includes a fairly extensive list of <a
  234. href="http://www.stack.nl/~dimitri/doxygen/links.html">API
  235. documentation extraction tools</a>. </p>
  236. </div>
  237. <table width="100%" class="navbox" cellpadding="1" cellspacing="0">
  238. <tr>
  239. <a class="nav" href="index.html">
  240. <td align="center" width="20%" class="nav">
  241. <a class="nav" href="index.html">
  242. Home</a></td></a>
  243. <a class="nav" href="installing.html">
  244. <td align="center" width="20%" class="nav">
  245. <a class="nav" href="installing.html">
  246. Installing Epydoc</a></td></a>
  247. <a class="nav" href="using.html">
  248. <td align="center" width="20%" class="nav">
  249. <a class="nav" href="using.html">
  250. Using Epydoc</a></td></a>
  251. <a class="nav" href="epytext.html">
  252. <td align="center" width="20%" class="nav">
  253. <a class="nav" href="epytext.html">
  254. Epytext</a></td></a>
  255. <td align="center" width="20%" class="nav">
  256. <A href="http://sourceforge.net/projects/epydoc">
  257. <IMG src="sflogo.png"
  258. width="88" height="26" border="0" alt="SourceForge"
  259. align="top"/></A></td>
  260. </tr>
  261. </table>
  262. </body>
  263. </html>