Search code examples
javaintellij-ideadocumentationjavadoc

Are there any tools to export/parse javadocs in simple way?


Are there any tools to generate text files or csv tables from javadocs?

The only tool I found was IDEA standard .html docs builder. However, it is hard to parse it's output. I also found com.sun.javadoc library, but it is deprecated, complicated and more about static code analysis and I just want to copy all docs from the project

I'm trying to create program documentation in MS Word for my Java application (IDEA project). I decided to export all the javadocs as .csv, .txt or any other way, and then generate word document with table via docx4j. But I got stuck on the first issue of the plan


Solution

  • Finally, I decided to do it in a half-manual way...

    1. Generate HTML documentation via IDEA > tools > Generate JavaDocs > for whole project
    2. Then, for each file in each package directory (doc_root\<package name>\<class name>.html) covert it using pandoc to docs: pandoc <class name>.html -f html -t docx -s -o table.docx (UPD. Online pandoc word generator https://www.onlineconverter.com/html-to-docx)
    3. Open each file in MS Word, remove odd data, fix table columns margins and padding and add borders. Copy tables in one large document

    Finally, got standard formatted Word documentation!