Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making a bitbucket source wiki from javadocs

Hi i am working on pretty big internal SDK that we use for our apps. I have outfitted with extensive Javadocs. Now my goal is to somehow generate .MD files from these javadocs so that i can directly put these .md files into my bitbucket wiki.

Is there a way to this or to generate any other file format that bitbucket wiki can work with?

like image 917
sn0ep Avatar asked Mar 24 '14 16:03

sn0ep


1 Answers

Doxygen appears to support Javadoc-style comments and can output LaTeX. LaTeX can be consumed by Pandoc, which supports Markdown output. This is somewhat roundabout, but it's the only realistic option that I can see.

Something like the following (untested)

# Generate a Doxygen configuration file, which
# should enable LaTeX output by default
doxygen -g

# Generate LaTeX documentation in the latex/ directory
doxygen

# Generate one Markdown file for each LaTeX file
find latex/ -name '*.tex' -exec mkdir -p markdown/`dirname {}` && \
    pandoc -o markdown/`basename {} .pdf`.md {} \;

should get you close.

The alternative might be to take Javadoc-generated HTML and ingest that with Pandoc, outputting Markdown.

like image 172
Chris Avatar answered Sep 21 '22 01:09

Chris