3

I'd like to integrate the documentation of a Java/Android project in a Trac instance. As Trac is written in Python I need a way to extract the JavaDoc comments from within Python.

Can anyone give me some hints how to accomplish this? I've thought of these two possibilities but I don't know if there are any libraries that can do this:

  • Parse the whole Java source.
  • Let JavaDoc do the job and somehow extract the docs from its output
Julian
  • 2,051
  • 2
  • 22
  • 30
  • For what purpose do you need what parts of the documentation? It might be easier to just use the generated JavaDoc as static files on your hosting server. – Lukas Knuth Mar 25 '12 at 11:11
  • I'd just like some tighter integration into Trac like for example browsing the docs or easily referencing it from the wiki/tickets etc. – Julian Mar 25 '12 at 11:41

2 Answers2

2

I came up with the following solution: I've found something called json-doclet which is kind of a Plugin for Javadoc that outputs a JSON which should be reasonably easy to work with.

Julian
  • 2,051
  • 2
  • 22
  • 30
0

Doxygen, which is written in C++, can parse Javadoc and output it as XML. You could call it from Python and then transform the XML into whatever format you like. (This will be more efficient if you do it in C++ using the doxmlparser, but you can also do it in Python.)

albert
  • 8,285
  • 3
  • 19
  • 32
Taymon
  • 24,950
  • 9
  • 62
  • 84
  • This would probably work but sadly Javadoc and Doxygen don't share exactly the same syntax. – Julian Mar 26 '12 at 12:27