Generate HTML source code documentation
Hi community!
Is it possible generate HTML documentation to my project ObjectScript classes (.cls)?
In Java we use Javadoc to do it. Javadoc get class comments and java metadata information and when I execute javadoc -d doc src\*, I get whole html documentation to my classes. Has IRIS something like javadoc? Is it documatic? If yes, how can I use it?
Hi @Yuri Marx ,
I don't know.
If nothing exists:
Perhaps we can write a script to call CSP.Documatic.PrintClass.cls and dump the html response into file.
ex : /csp/documatic/%25CSP.Documatic.PrintClass.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=%25Library.Integer
A %Net.HttpRequest is not required. I guess we can create a %request object, redirect the IO and calling OnPage method.
hi @Yuri Marx ;
.png)
.png)
In IRIS you (typically) have documatic included http://<server>:52773/csp/documatic/%25CSP.Documatic.cls
from Windows-Cube you have ClassReference
in Studio you see
I have no idea in VSCode.
And you get:
or in a new window:
which is straight HTML
.png)
Great. But these solutions depends IRIS server online, because links are related to the documatic server. In javadoc the documentation can be read offline
Your local instance has its own local version of documatic. So, it's available offline.
It's useless on your local dev, but depending your goal :
You can try to dump
There exits more elegant way to redirect the output (check the community).
Hi @Yuri Marx!
I did a quick and dirty try during lunch in terminal:
The result still holds references to /csp/...images and data types
.png)
<image id=Im1 src=/csp/sys/images/ExpandedMarker.jpg height=. . .
<a href="%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=USER&CLASSNAME=%25String">%String</a>
that you might want to resolve as they are quite generic or you just ignore it .
My browser is very friendly :-)
And that's the result:
Some polishing might be required
Creating Class Documentation
PS: Once upon a time (when was Caché) there was a wonderful DOCBOOK database that had the methods you needed.
Here's my old (2012 sic!) article on this topic: Extending the built-in documentationRU->EN
Here you can read a little more:
Imagine you create an app to generate your project documentation using https://docusaurus.io/? Fantastic no? Better than Java!
If I try navigate the docs with iris down, Is it works?
IRIS HTML documentation is a dynamic site, depends on documatic server and source code installed into an IRIS instance. Has it static website generation, with an option to navigate without classes compiled into an IRIS instance?
Today people wants see documentation without to have install servers, inside github or local browser. Is it possible if docs is html static, but documatic is a server app.
Official online documentation for IRIS, available only online or offline as PDF only.
Class Reference Documatic, working only when the server is up and running.
No static HTML documentation at all.
I encounter this issue fairly often, but I need not a complete documentaiton but rather Interoperability production documentation.
As all the class info is also available as a %Dictionary package I just query it and generate XLSX.
Here are some queries to get started (but they usually need to be adjusted on per-project basis). Also queries should be rewritten to use SubclassOf proc instead of the current matching. Also I'm not sure why I don't pass filestream directly. That also needs to be fixed.
Social networks
InterSystems resources
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue