8

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?

sn0ep
  • 3,843
  • 8
  • 39
  • 63

1 Answers1

1

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.

albert
  • 8,285
  • 3
  • 19
  • 32
ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257