dgarijo / Widoco

Wizard for documenting ontologies. WIDOCO is a step by step generator of HTML templates with the documentation of your ontology. It uses the LODE environment to create part of the template.
Apache License 2.0
284 stars 88 forks source link

How to supply custom texts (introduction/description) through command line? #612

Closed psiotwo closed 1 year ago

psiotwo commented 1 year ago

I would like to automate generation of WIDOCO documentation through command line and supply the texts using the language property files, e.g. en.properties, but I am not sure, how to supply this file to the CLI. I can see an option to put it on classpath into a /widoco/en.properties file using the key introPlaceHolder. But trying 'java -cp .:widoco.jar' does not seem to work (probably due to the ClassLoader that is used for loading the resource file). The only other (ugly) option would be to unpackage/modify/repackage the JAR file.

I hope I am missing some elegant solution - thanks for any hint.

dgarijo commented 1 year ago

@psiotwo sorry, this behavior is not supported at the moment. You may always inject your content in the generated html files, but it's not optimal. The way to implement this feature would be by extending the conf.properties file that Widoco uses, adding the paths to the sections in case of need.

dgarijo commented 1 year ago

Also, just for intro/description you may use the properties dc:abstract in the ontology (that text will go in the abstract) and rdfs:comment / dc:description. But for more elaborated sections you may want the above solution

psiotwo commented 1 year ago

Thanks for response @dgarijo . I would be more than happy to configure as much as possible from inside the OWL file. But I am not sure which props to use to populate the Introduction/Description sections, i.e. to have a text along side of the diagram. I am only able to populate the Abstract using dcterms:abstract.

dgarijo commented 1 year ago

I created https://github.com/dgarijo/Widoco/blob/master/doc/metadataGuide/guide.md to document all the metadata properties that are now recognized.

But I double checked and the abstract is the only property used right now for changing the place holders in the HTML. Probably description should be used for the description section (images are used if available).

As for introduction, I am not sure. Will have to check for alternatives (I don't know if there is something like extended abstract or similar). I plan to spend some time in the next couple of weeks to address pressing issues, so I will try to come up with a solution

psiotwo commented 1 year ago

Perfect, thanks a lot - my use case is to automatically use WIDOCO inside Gitlab pipelines, so IMHO having as much configuration as possible read directly from OWL vocabulary would be an excellent extension to WIDOCO for this sort of applications.

dgarijo commented 1 year ago

I have pushed a fix so you can address this from ontology annotations. I will do a release soon with the JAR