PLOC - Convert PL/SQL Code into Markdown Docs
Another way to document PL/SQL business logic Some months ago I had to write a README file with Markdown syntax for a PL/SQL open source project. I changed function and procedure parameters of the package often during the implementation. Therefore, maintaining the documentation was no fun in the beginning. Maybe you know this from your own (payed) projects ;-) Normally in the business world I see minimalistic comments in the code and a dedicated documentation independent of the code. As you can imagine, the latter is sometimes - let’s say “out of date”, if it exists at all … I don’t want to discuss the reasons for this here - you all know several ones. And I also do not have a general solution for code documentation. But I have some ideas what is important for me: There are already several open source projects available for PL/SQL code documentation generation: Only the last one is able to generate Markdown docs, but the input has to be in JavaDoc. All the others can produce HTML output and often some other formats like RTF, Word or PDF. Natural Docs has a Markdown like simple text syntax, but also no Markdown output. Some of the tools can automatically document a whole schema - that is not the focus of PLOC. Most comparable is the intention of PL/SQL to Markdown Documenter. So I had to do it by myself. I called it PLOC (PLDoc was already used, so I skipped the D…) and it is implemented in JavaScript as a npm package and currently used by me for the following two projects: PL/SQL Export Utilities and Oracle Table API Generator. It is very lightweight - the main code without the CLI has currently less characters as the Markdown source of this blog post. Maybe it is also useful for you. If not, have a look at the other mentioned projects. More infos about PLOC itself can be found on the project page. Happy coding and documenting :-) Ottmar