Diversity Collection

Documentation

Tools for the database documentation

These are the tools to describe the parts of the database and create documentations of the structure. To use these tools, choose Administation - Database - Documentation… from the menu. A window will open as shown below.

Click on the List objects button to list the objects of the database. With the  button resp. button you can select resp. deselect the types in the type selection and the object in the list.

Select the objects that should be listed all button resp. none button you can select resp. deselect the types in the type selection and the object in the list.

Select the objects that should be included in the documentation:

  • Tables
    • Trigger
  • Views
  • Roles
  • Functions and procedures
  • Context

… and exclude the objects that should not be included in the documentation:

  • Logging tables
  • Enumeration tables
  • Old versions of objects
  • System objects
  • Deprecated objects

 

The button Set default seletion will select all items in the list without:

  • System objects
  • Older version of an object indicated by the number at the last position
  • Logging tables
  • Enumeration tables
  • Objects with a description starting with e.g. outdated, deprecated, obsolete etc.
  • HTML options:
    • include index for objects
    • include NULL / NOT NULL
    • include relations and dependencies
    • include Description
    • exclude standard trigger
    • exclude definition
    • include permissions for *_Enum etc.
    • exclude obsolete columns
    • exclude columns starting or ending with the given strings
    • include list of tables that are depending on a table

The buttons Add to seletion and  Remove from seletion  will use the given strings with * as wildcard to add resp. remove items from the selection.

With the Context  option you can show or hide the context area for the html and media wiki tab as shown above.

HTML, MediaWiki, JSP-Wiki

To create a documentation choose among the provided options and click on the button Create ... documentation to create the documentation in one of the available formats (HTML, MediaWiki, JSP-Wiki). 

Oct 19, 2024

Subsections of Documentation

Diversity Collection

Documentation

chm

With the chm tab you can generate index and keyword html files as well as markdown files for a website generated out of the hhc and hhk files of the HTML Help Workshop for the creation of chm manual as described in the video .

The button Generate keywords for HUGO creates a text file keywords.txt containing the keywords needed for the HUGO manual in a simple format. A pre- or postfix is set for every module to avoid conflicts. Use the Open button to open the file in a text editor.

Oct 19, 2024

Diversity Collection

Documentation

Github

ssh-key

To change the authentication mechanism to SSH keys in Visual Studio Code and GitHub, you need to follow these steps:

  • Open the command line and change in your homedirectory if not already done cd %USERPROFILE%
  • Generate an SSH key pair on your local machine using the command ssh-keygen -a3 -t ed25519 -C "your_email@example.com" -f .ssh/id_github.
    • In case you omit the -f option nameing the file where the key should be stored, you will be asked th enter the name of the file where the key should be stored e.g. id_github. Make shure not to overwrite existing keys.
  • Next enter a passphrase (twice)
    • When you generate an SSH key pair, you have the option to add a passphrase to the private key. A passphrase is an extra layer of security that helps protect your private key from unauthorized access. If someone gains access to your private key, they can use it to authenticate as you and perform actions on your behalf. By adding a passphrase, you make it more difficult for someone to use your private key without your permission.
    • When you use an SSH key with a passphrase, you will be prompted to enter the passphrase every time you use the key. This can be inconvenient, but it ensures that only you can use the key to authenticate with remote servers. You can also use an SSH agent to store your passphrase so that you don’t have to enter it every time you use your key .
    • The location of your keys will be shown (e.g. id_github for the private key and id_github.pub for the public key) next to a fingerprint and a randomart image like
+--[ED25519 256]--+
|     ..   .+=.o  |
|      .+ . o+*   |
|    . +.. ooo.o  |
|     +.B.+= =.o  |
|      =+S=o* = o |
|     . oo*= o o  |
|      .  .       |
|        . . o E  |
|           o .   |
+----[SHA256]-----+
  • Add the public key to your GitHub account by navigating to your account settings, selecting “SSH and GPG keys”, and clicking “New SSH key”.
  • Copy the contents of the public key file (usually ~/.ssh/id_rsa.pub) and paste it into the “Key” field on the GitHub website.
  • In Visual Studio Code, open the Command Palette (press Ctrl+Shift+P on Windows) and search for Remote-SSH: Open Configuration File.
  • Select the configuration file you want to edit and add the following lines:
    Host github.com
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_rsa
  • Save the file and close it.
  • Open the Command Palette again and search for Remote-SSH: Connect to Host.
  • Select the configuration file you just edited and wait for the connection to be established.
  • You should now be able to use Git with SSH authentication in Visual Studio Code.
Oct 19, 2024

Diversity Collection

Documentation

HUGO

In the HUGO / HTML tab you generate markdown files according to HUGO and the relearn theme.

The conversion and adaptions are explained in a short tutorial: Video starten

For enumeration tables the content can be exported as explained in a short tutorial: Video starten

In the tab you can fix links in markdown files according to HUGO shortcodes.

The fixes for broken links are explained in a short tutorial: Video starten

The adaptions for links for HUGO as related references are explained in a short tutorial: Video starten

To map the files in the original links to new files in the documentation follow the steps shown in a short tutorial: Video starten

Installation of HUGO

Update des Themes

um das Theme auf die letzte Version zu bringen kann man den Befehl git submodule update --remote --merge themes/relearn verwenden

Übersetzung des Bestands an html

  • Übersetzung der *.html Seiten mit pandoc in *.md
  • Aufbau einer Ordnerstruktur die dem Index der chm Datei entspricht
  • Das Basisdokument der Ordner wird in die Ordner verschoben und in _index.md umbenannt
    • Dort im Frontmatter steht der Titel der im Menü angezeigt wird, e.g.:
      --- 
      title: Installation 
      ---  

Überarbeitung der md Dateien

  • Korrektur der Bildverweise
    • Ordner mit den Bildern in den Ordner static kopieren
    • von e.g. ![](img/...) in ![](img/...)
    • ACHTUNG - Case sensitiv. Namen müssen stimmen
    • Icons gegebenenfalls freistellen für Darkmode
  • Entfernung aller störenden Formatierungsangaben
  • Entfernung der Kopfzeile (Überschrift wird von HUGO automatisch erzeugt)
  • Korrektur der internen Verweise
    • ändern von [![](img/VideoDE.svg?class=inlineimg)](http://media.snsb.info/Tutorials/dwb/Editing/OeffentlicheKontaktdaten.webm) zu [![Video starten](img/VideoDE.svg?class=inlineimg)](http://media.snsb.info/Tutorials/dwb/Editing/OeffentlicheKontaktdaten.webm)
      • ansonsten wird das Bild gezeigt statt das Video zu starten
    • ändern von
      [Contact](Contact.htm)
      zu e.g.
      [Contact](editingdata/contact)
    • Wenn als Basisadresse in hugo.toml etwas angegeben wurde, e.g. baseURL = "http://www.diversityworkbench.de" dann muss diese auch für Verweise innerhalb der Files verwendet werden.
      • e.g. Bildverweise ![](img/IcoFeedback.gif?class=inlineimg)
      • Dateiverweise [Anmelden](database)
      • HUGO relearn erzeugt für Überschriften Anker die man ansteuern kann, e.g. kann man ### Table **AgentResource** über die Adresse database/database/#table-agentresource erreichen. Ein Index Eintrag dafür wäre e.g. [AgentResource](database/database/#table-agentresource). ACHTUNG - Case sensitiv: ### Table **AgentResource** wird in #table-agentresource übersetzt
    • Kommentare starten mit # ohne folgendes Leerzeichen

Frontmatter

You can change the frontmatter to a default using the documentation tool

  • Steht am Anfang der Datei und ist bei yaml durch --- oben und unten abgegrenzt, e.g.
    ---
    title: Login administration
    linktitle: Logins
    weight: 5
    menuPre: img/Documentation.svg
    alwaysopen: false
    ---
  • Seiten die noch in Entwicklung sind kann man mit draft: true im Frontmatter markieren. Diese werden dann nicht in die Ausgabe übernommen
  • Der Titel wird mit title: Login administration angegeben. Dieser erscheint dann auch in der Seite als Überschrift
  • Der Text im Menü kann abweichend definiert werden mit linktitle: Logins. Ansonsten erscheit der Titel im Menü
  • Die Reihenfolge im Menü kann mit weight: 5 angegeben werden. Ansonsten wird alphabetisch sortiert
  • Ein Logo kann man mit `menuPre: img/LinkedServer.svg
  • Wenn das Untermenue erst beim Anwählen geöffnet werden soll: alwaysopen: false

Template files

Starting with a Dash: If the first line of your Markdown file starts with a dash (-), Hugo might misinterpret it as a YAML delimiter, leading to an error

Bilder

You can adapt the images to a default using the documentation tool

  • Icons die e.g. in den Text integriert werden sollen, müssen folgedermassen eingebaut werden:
    • ![](img/Database.svg?class=inlineimg)
  • Die Bilder am Anfang der Seite werde wie folgt eingebaut:
    • ![](img/LinkedServer.svg?class=headerimg)

mit px wird das Bild mitgezoomt, bei vw bleibt es gleich gross

  • noch nicht zu svg konvertierte Bilder die im Fliesstest erscheinen sollen werden wie folgt eingebunden:
    • ![](img/Delete.svg?class=inlineimg)
  • sonstige Bilder mit
    • ![](img/Delete.svg)

mit der Angabe ...lightbox=false wird verhindert, dass ein Bild beim Anklicken mit der Maus geöffnet wird. Dies sollte bei Bildern die nicht nach svg konvertiert wurden und nicht im Fliesstext erscheinen nicht verwendet werden, damit der User bei kleinen Bildern diese in Originalauflösung betrachten kann. Unten 2 Beispiele

![](img/Delete.svg?class=inlineimg)

![](img/Delete.svg?class=inlineimg)

Für Bilder die aus der Quelle fontawesome kommen kann man hier suchen: fontawesome. Es funktionieren nicht alle die dort bereitstehen. Daher bitte testen!

Für Links innerhalb des Manuals kann man shortcodes verwenden. Dafür entweder auf den Namen der Datei oder auf Links von Überschriften (ab ##) verwenden. Diese müssen innerhalb des Manuals eindeutig sein. Für Header als erstes Zeichen # dann Überschrift und alles lower case und Leerzeichen werden durch - ersetzt. Beispiel:

## Main form of diversityexsiccatae

wird zu sofern es sich in der gleichen Datei befindet: 2 x { und % relref "#main-form-of-diversityexsiccatae" % und 2 x }

Für Links ausserhalb der Datei werden Verweise unter Einschluss des Dateinamens verwendet:

Verweis auf ein Kapitel innerhalb einer Datei 2 x { und % relref "diversityexsiccatae#main-form-of-diversityexsiccatae" % und 2 x }

bzw. nur auf die Datei 2 x { und % relref "diversityexsiccatae" % und 2 x }

Leerzeichen zwischen 2 x { und % und % und 2 x } entfernen

Von ausserhalb kann e.g. eine Überschrift mit https://www.diversityworkbench.demodules/diversityexsiccatae/index.html#main-form-of-diversityexsiccatae aufgerufen werden. Diese können direkt aus dem Manual kopiert werden.

  • hierfür das Logo in den Ordner static kopieren
  • im Ordner layouts einen Ordner partials anlegen
  • dort eine Datei logo.html anlegen
    • in dieser auf das Logo verweisen e.g.:
      <h4><b>DiversityAgents</b></h4>
      <img src="/DA_4D.svg">
  • in static - layouts - partials die Datei menu-footer.html anlegen und anpassen

favicon

Im Ordner static den Ordner images anlegen Datei favicon.ico in der Ordner static/images kopieren

Einschliessen von Dateien

Das Verzeichnis templates enthält Dateien die in andere Dateien über eine shortcode eingeschlossen werden können, e.g.:  2 x { und % include file="templates/template_workbench.md" % und 2 x } Diese Dateien dürfen kein frontmatter enthalten. Shortcodes müssen überprüft werden, da diese in der Regel nicht ausgewertet werden.

ER-Diagramm

dieses kann als Mermaid eingebaut werden, e.g.

 
graph LR;
    A[Agent] --> B[AgentContact<br/>Kontaktdaten der Agents]
    A --> C[AgentReference]
    A --> D[AgentIdentifier]
    A --> E[AgentResource]
    A --> F[AgentExternalID]
    G[AgentExternalDatabase] --> F[AgentExternalID]

soll das Diagramm zoombar sein wird die Version 5.23 des Themes benoetigt. Ausserdem kann der Parameter nur für die Shortcode Version angegeben werden, nicht für die Codefences:

2 x { und % mermaid align="center" zoom="true" % und 2 x }
... 
(remove space between 2 x { und  and < resp > and  und 2 x } in header and footer for correct code)
...
2 x { und % /mermaid % und 2 x }

Anpassung des Themes

  • es werden 2 eigene Themes bereitgestellt

    • im Verzeichnes
      • themes
        • relearn
          • static
            • css:
            • theme-dwb-dark.css
            • theme-dwb.css

    diese an DWB Anforderungen anpassen

    • in \themes\relearn\static\css\theme.css
      #body img.inline {
          display: inline !important;
          margin: 0 !important;
          vertical-align: middle;
          /* vertical-align: bottom; */
      }
    • in \themes\relearn\static\css\theme-dwb.css
      /*--MENU-HEADER-BG-color: rgba( 28, 144, 243, 1 );*/ /* Background color of menu header */
      --MENU-HEADER-BG-color: rgba( 220, 220, 220, 1 ); /* Background color of menu header */
      --MENU-HEADER-BORDER-color: rgba( 51, 161, 255, 1 ); /*Color of menu header border */
      

      –MENU-SEARCH-color: rgba( 255, 255, 255, 1 ); /* Color of search field text / /–MENU-SEARCH-BG-color: rgba( 22, 122, 208, 1 );/ / Search field background color (by default borders + icons) / –MENU-SEARCH-BG-color: rgba( 90, 90, 90, 1 ); / Search field background color (by default borders + icons) / /–MENU-SEARCH-BORDER-color: rgba( 51, 161, 255, 1 );/ / Override search field border color / –MENU-SEARCH-BORDER-color: rgba( 0, 0, 0, 1 ); / Override search field border color */

Konfiguration - in hugo.toml:

```native
baseURL = "http://www.diversityworkbench.de"
languageCode = "en-us"
title = "DiversityAgents"
theme = "relearn"

[outputs] home = ["HTML", "RSS", "SEARCH", "SEARCHPAGE"] section = ["HTML", "RSS", "PRINT"] page = ["HTML", "RSS", "PRINT"]

[params] themeVariant = [ "auto", "dwb", "dwb-dark" ]

</code></pre>
<h2 id="start-des-testservers">Start des Testservers:</h2>
<ul>
<li>mit einem Terminal in das Verzeichnis des Projekts wechseln</li>
<li>dort <code>hugo server </code> eingeben.</li>
<li>bei Problem mit Sonderzeichen: den Inhalt der Datei config.toml in hugo.toml kopieren und config.toml löschen (beide sollten wenn vorhanden UTF8 sein - werden manchmal als UTF16 angelegt - dieses dann nach UTF8 ändern)
<ul>
<li>Error: &ldquo;&hellip;\diversityworkbench\hugo.toml:1:1&rdquo;: unmarshal failed: toml: invalid character at start of key: ÿ</li>
</ul>
</li>
<li>Im Browser an die angegebene Adresse navigieren, e.g. <code>localhost:1313</code></li>
<li>Wenn als Basisadresse in hugo.toml etwas angegeben wurde, e.g. <code>baseURL = &quot;http://www.diversityworkbench.de&quot;</code> dann muss die passende Adresse eingeben werden also e.g. <code>localhost:1313</code></li>
</ul>
Oct 19, 2024

Diversity Collection

Documentation

MediaWiki

With the MediaWiki tab you can generate markdown files according to MediaWiki.

Oct 19, 2024