Skip to content

Commit

Permalink
Merge pull request #716 from dgarijo/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
dgarijo committed Jun 30, 2024
2 parents e6a9f23 + abe5a7d commit 18ca050
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push
uses: docker/build-push-action@v5.3.0
uses: docker/build-push-action@v6.1.0
with:
push: ${{ github.event_name != 'pull_request' && github.actor != 'dependabot[bot]' }}
tags: ${{ steps.meta.outputs.tags }}
Expand Down
26 changes: 22 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Just add the dependency and repository to your `pom.xml` file as follows. See th
<dependency>
<groupId>com.github.dgarijo</groupId>
<artifactId>Widoco</artifactId>
<version>v1.4.23</version>
<version>v1.4.24</version>
</dependency>
</dependencies>

Expand Down Expand Up @@ -107,19 +107,35 @@ java -jar widoco-VERSION-jar-with-dependencies.jar [OPTIONS]
```

### Docker execution
If you don't want to use the JAR directly, you may run the project using a [Docker container](https://www.docker.com/). First you will need to download or build the image, and then run it.

First build the image using the `Dockerfile` in project folder:
#### Reusing a pre-existing image
We build containers in the [GitHub image registry](https://github.com/dgarijo/Widoco/pkgs/container/widoco) for all latest releases. In order to import one, just run the following command, stating the version of Widoco you prefer (e.g., for v1.4.23):

```
docker pull ghcr.io/dgarijo/widoco:v1.4.23
```

To browse all available images, see the [GitHub image registry](https://github.com/dgarijo/Widoco/pkgs/container/widoco).

#### Building the image yourself

Build the image using the `Dockerfile` in project folder:

```bash
docker build -t dgarijo/widoco .
```

#### Running WIDOCO's image

You can now execute WIDOCO through the command line. Usage:

```bash
docker run -ti --rm dgarijo/widoco [OPTIONS]
```

**Note:** If you downloaded the image from the GitHub registry, you will have to change `dgarijo/widoco` with the name of the image you downloaded. For example `ghcr.io/dgarijo/widoco:v1.4.23`.

If you want to share data between the Docker Container and your Host, for instance to load a local ontology file (from PATH), you will need to mount the container
with host directories. For instance:

Expand All @@ -130,7 +146,7 @@ docker run -ti --rm \
dgarijo/widoco -ontFile in/bne.ttl -outFolder out -rewriteAll
```

### Options
### Execution options

`-analytics CODE`: Add a code snippet for Google analytics to track your HTML documentation. You need to add your CODE next to the flag. For example: UA-1234

Expand All @@ -144,6 +160,8 @@ docker run -ti --rm \

`-excludeIntroduction`: Skip the introduction section in the documentation.

`-excludeProvenance`: Do not add the link "Provenance of this page" in the metadata header section

`-getOntologyMetadata`: Extract ontology metadata from the given ontology

`--help`: Shows a help message and exits.
Expand Down Expand Up @@ -183,7 +201,7 @@ docker run -ti --rm \

`-useCustomStyle`: Export the documentation using alternate css files (by Daniel Vila).

`--version`: Shows the version of WIDOCO.
`--version`: Shows the current version of WIDOCO.

`-webVowl`: Create a visualization based on WebVowl (http://vowl.visualdataweb.org/webvowl/index.html#) in the documentation.

Expand Down
2 changes: 1 addition & 1 deletion doc/adoption/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WIDOCO has been used to document **more than a hundred ontologies from different
* [Vocab](http://vocab.linkeddata.es): Project grouping many of the vocabularies developed or contributed to by the [Ontology Engineering Group](http://www.oeg-upm.net/). At the moment the site includes a total of 41 vocabularies, **30 of them directly documented with WIDOCO**. These vocabularies are associated to projects from different domains, such as:
* eScience ([Smart Protocols](http://purl.org/net/SMARTprotocol), [provenance in workflows](http://www.opmw.org/ontology/), etc.)
* [Licensing](http://purl.oclc.org/NET/ldr/ns)
* [Libraries](http://datos.bne.es/def/)
* [Libraries](https://web.archive.org/web/20170701004216/https://datos.bne.es/def/ontology.html)
* [Videogames](http://purl.org/net/vgo)
* [Environment modeling](https://w3id.org/def/saref4envi#)
* [Quality modeling](http://vocab.linkeddata.es/qmo/index.html)
Expand Down
6 changes: 3 additions & 3 deletions doc/bestPractices/sections/checklist-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h4 class="list" id="namespaceURI">Vocabulary namespace URI [<em class="rfc2119"
</p>

<ul class="hlist"><strong>Properties you may use</strong>:
<li><a target="_blank" href="http://purl.org/vocab/vann/preferredNamespaceUri">vann:preferredNamespaceUri</a> <strong>(PREFERRED)</strong></li>
<li><a target="_blank" href="http://purl.org/vocab/vann/preferredNamespaceUri">vann:preferredNamespaceUri</a> <strong>(PREFERRED)</strong> (see <a href="http://purl.org/vocab/vann/">this link</a> if the previous vocabulary link does not work)</li>
</ul>

<h5>Example:</h5>
Expand All @@ -30,7 +30,7 @@ <h4 class="list" id="prefix">Prefix [<em class="rfc2119" title="RECOMMENDED">REC
<p>Preferred prefix used to refer to the ontology. This is important to let potential reusers know how you expect your ontology to be abbreviated. You want everyone to refer to it in the same way. It's also recommended to register your prefix at the <a href="http://prefix.cc">http://prefix.cc</a> service, so other KG engineers are able to find the URI of your ontology.</p>

<ul class="hlist"><strong>Properties you may use</strong>:
<li><a target="_blank" href="http://purl.org/vocab/vann/preferredNamespacePrefix">vann:preferredNamespacePrefix</a> <strong>(PREFERRED)</strong></li>
<li><a target="_blank" href="http://purl.org/vocab/vann/preferredNamespacePrefix">vann:preferredNamespacePrefix</a> <strong>(PREFERRED)</strong> (see <a href="http://purl.org/vocab/vann/">this link</a> if the previous vocabulary link does not work)</li>
</ul>

<h5>Example:</h5>
Expand Down Expand Up @@ -711,7 +711,7 @@ <h5>Example:</h5>
@prefix owl: &lt;http://www.w3.org/2002/07/owl#&gt; .
@prefix : &lt;https://w3id.org/example#&gt; .
:Researcher rdf:type owl:Class ;
vann:example "Daniel Garijo"@en .
owl:deprecated "true"^^xsd:boolean .
</pre>

<h4 class="list" id="status1">Status [<em class="rfc2119" title="OPTIONAL">OPTIONAL</em>]</h4>
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorial/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ <h2 id="changelog">4.5 Generating an automated Changelog</h2>

<h2 id="style">4.6 Changing default documentation style</h2>
<p>
You can customize the style in which WIDOCO displays the documentation by editing the CSS included in the main folder. However, one of WIDOCO's users contributed a new stylem used in the <a href="http://datos.bne.es/def/ontology.html">BNE ontology</a>. If you like it, just select the "Custom" style option.
You can customize the style in which WIDOCO displays the documentation by editing the CSS included in the main folder. However, one of WIDOCO's users contributed a new style used in the <a href="https://web.archive.org/web/20170701004216/https://datos.bne.es/def/ontology.html">BNE ontology</a>. If you like it, just select the "Custom" style option.
</p>
<h2 id="analytics">4.7 Documentation Analytics</h2>
<p>
Expand Down
10 changes: 8 additions & 2 deletions src/main/java/widoco/gui/GuiController.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ public GuiController(String[] args) {
boolean isFromFile = false, oops = false, rewriteAll = false, getOntoMetadata = true, useW3Cstyle = true,
includeImportedOntologies = false, htAccess = false, webVowl = false, errors = false, licensius = false,
generateOnlyCrossRef = false, includeNamedIndividuals = true, includeAnnotationProperties = false,
displaySerializations = true, displayDirectImportsOnly = false, excludeIntroduction = false, uniteSections = false,
placeHolderText = true, localImports=false;
displaySerializations = true, displayDirectImportsOnly = false, excludeIntroduction = false, excludeProvenance = false,
uniteSections = false, placeHolderText = true, localImports=false;
String confPath = "";
String code = null;// for tracking analytics.
String[] languages = null;
Expand Down Expand Up @@ -203,6 +203,9 @@ public GuiController(String[] args) {
case "-noPlaceHolderText":
placeHolderText = false;
break;
case "-excludeProvenance":
excludeProvenance = true;
break;
case "--help":
System.out.println(Constants.HELP_TEXT);
return;
Expand Down Expand Up @@ -270,6 +273,9 @@ public GuiController(String[] args) {
this.config.setIncludeAbstract(false);
}
}
if (excludeProvenance) {
this.config.setPublishProvenance(false);
}
if (code != null) {
this.config.setGoogleAnalyticsCode(code);
}
Expand Down

0 comments on commit 18ca050

Please sign in to comment.