HOME COMMUNITY BLOG
Skip to end of metadata
Go to start of metadata

Command line utility for generate documentation from Origam schema. 

Runtime

 

Create source xml :

dotnet Origam.DocGenerator.dll xml -s D:\Projects\ProjectName -p 0fe05b88-11e4-4f28-81bc-7762afa76dc8 -o D:\aprace\export\ -m index.xml -l de-DE


Usage : dotnet Origam.DocGenerator.dll xml

-m, --xmlfilename                               Xml File for export source tree.
-s, --schema                  Required.      Input Origam project directory.
-p, --packageid              Required.      Guidid of package.
-o, --output                    Required.      Output directory
-l, --language                 Required       Localization(ie. cs-CZ).

 

Create file(s) with xslt template:

dotnet Origam.DocGenerator.dll -s D:\Projects\ProjectName -p 0fe05b88-11e4-4f28-81bc-4762afa76dc8 -o D:\Project\export\ -x null -m index.xml -l de-DE


Usage : dotnet Origam.DocGenerator.dll xslt

-x, --xslt                     Required.       Xslt template
-r, --rootfilename       Required.       Root File
-s, --schema              Required.       Input Origam project directory.
-p, --packageid          Required.       Guidid of package.
-o, --output                Required.       Output directory
-l, --language            Required.       Localization(ie. cs-CZ).

 


 


Example  Xml

<?xml version="1.0" encoding="utf-8"?>
<!--This file is generated by the program.(12.11.2018 00:53:21)-->
<Menu>
<Menuitem DisplayName="Adresář" Id="b2a2194c-c2a4-4236-837a-08c1b720fc96" Type="FormReferenceMenuItem">
<Section DisplayName="Adresář" Id="197a6d71-c154-4c1c-a963-b68b7647469c" Type="ControlItem">
<entity>
<entityid>4f2505a4-8312-420c-bfb8-6af3d4ad8bf0</entityid>
<entityname>BEBusinessPartner</entityname>
</entity>
<Field DisplayName="Příjmení" Id="7d1ec946-017e-4d38-9d92-d4d6b9fabffc" Type="ControlItem" />
<Field DisplayName="Jméno" Id="7d1ec946-017e-4d38-9d92-d4d6b9fabffc" Type="ControlItem" />
<Field DisplayName="Účetní typ kontaktu" Id="aebc5761-339d-4787-9289-704f7ed7ecbe" Type="ControlItem" />
<Field DisplayName="Typ kontaktu" Id="aebc5761-339d-4787-9289-704f7ed7ecbe" Type="ControlItem" />
<Field DisplayName="Tituly" Id="7d1ec946-017e-4d38-9d92-d4d6b9fabffc" Type="ControlItem" />
<Field DisplayName="Firma" Id="7d1ec946-017e-4d38-9d92-d4d6b9fabffc" Type="ControlItem" />
<Field DisplayName="Ulice" Id="7d1ec946-017e-4d38-9d92-d4d6b9fabffc" Type="ControlItem" />
<Field DisplayName="Číslo pop./or." Id="7d1ec946-017e-4d38-9d92-d4d6b9fabffc" Type="ControlItem" />
<Field DisplayName="Číslo orientační" Id="7d1ec946-017e-4d38-9d92-d4d6b9fabffc" Type="ControlItem" />
<Field DisplayName="Město" Id="7d1ec946-017e-4d38-9d92-d4d6b9fabffc" Type="ControlItem" />
<Field DisplayName="PSČ" Id="7d1ec946-017e-4d38-9d92-d4d6b9fabffc" Type="ControlItem" />
<Field DisplayName="Kraj" Id="7d1ec946-017e-4d38-9d92-d4d6b9fabffc" Type="ControlItem" />
<Field DisplayName="Stát" Id="7d1ec946-017e-4d38-9d92-d4d6b9fabffc" Type="ControlItem" />
<Field DisplayName="Telefon Mobilní" Id="7d1ec946-017e-4d38-9d92-d4d6b9fabffc" Type="ControlItem" />
<Field DisplayName="Telefon Další" Id="7d1ec946-017e-4d38-9d92-d4d6b9fabffc" Type="ControlItem" />
<Field DisplayName="Email Hlavní" Id="7d1ec946-017e-4d38-9d92-d4d6b9fabffc" Type="ControlItem" />
<Field DisplayName="Email Další" Id="7d1ec946-017e-4d38-9d92-d4d6b9fabffc" Type="ControlItem" />
<Field DisplayName="Jazyk komunikace" Id="aebc5761-339d-4787-9289-704f7ed7ecbe" Type="ControlItem" />
<Field DisplayName="IČO" Id="7d1ec946-017e-4d38-9d92-d4d6b9fabffc" Type="ControlItem" />
<Field DisplayName="DIČ" Id="7d1ec946-017e-4d38-9d92-d4d6b9fabffc" Type="ControlItem" />
<Field DisplayName="Plátce DPH" Id="48dc8d6a-21c1-4e12-96de-c3a5eb67434d" Type="ControlItem" />
<Field DisplayName="Datová schránka" Id="7d1ec946-017e-4d38-9d92-d4d6b9fabffc" Type="ControlItem" />
<Field DisplayName="Obchodní rejstřík" Id="7d1ec946-017e-4d38-9d92-d4d6b9fabffc" Type="ControlItem" />
<Field DisplayName="WWW stránky" Id="7d1ec946-017e-4d38-9d92-d4d6b9fabffc" Type="ControlItem" />
<Field DisplayName="Preferovaný způsob komunikace" Id="aebc5761-339d-4787-9289-704f7ed7ecbe" Type="ControlItem" />
<Field DisplayName="Zasílané informace" Id="91f24905-44d2-46e9-b040-80e3f64eefea" Type="ControlItem" />
</Section>
</Menuitem>
<Menu>


Output 


i.e : for MarkDown    filename = doc_Adresář.md

 

 

## Adresář
####

|Adresář||
|-------|--------|
| Jméno | |
| Příjmení | |
| Účetní typ kontaktu | |
| Typ kontaktu | |
| Tituly | |
| Firma | |
| Ulice | |
| Číslo pop./or. | |
| Číslo orientační | |
| Město | |
| PSČ | |
| Kraj | |
| Stát | |
| Telefon Mobilní | |
| Telefon Další | |
| Email Hlavní | |
| Email Další | |
| Jazyk komunikace | |
| IČ | |
| DIČ | |
| Plátce DPH | |
| Datová schránka | |
| Obchodní rejstřík | |
| WWW stránky | |
| Poznámky | |
| Preferovaný způsob komunikace | |
| Zasílané informace | |



Xslt

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl= "http://exslt.org/common"
version="1.0">
<xsl:output method="text" />
<xsl:template match="/">
<xsl:for-each select="/Menu/Menuitem">
<exsl:document href="doc_{@DisplayName}.md">
## <xsl:value-of select="@DisplayName"/>

<xsl:if test="description != ''" >
- *<xsl:value-of select="description"/>*
</xsl:if>
#### <xsl:for-each select="Section">

|<xsl:value-of select="@DisplayName"/>|<xsl:if test="description != ''" ><xsl:value-of select="description"/></xsl:if>|
|-------|--------|
<xsl:for-each select="Field">| <xsl:value-of select="@DisplayName"/> | <xsl:if test="description != ''" ><xsl:value-of select="description"/> </xsl:if> |
</xsl:for-each>
</xsl:for-each>
</exsl:document>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

 



Environment:

Linux

Install dotnet here:https://docs.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x

 

Then install dotnet-sdk-2.1

 

sudo apt-get install dotnet-sdk-2.1


After install on console run

 

dotnet --list-sdks

 

Show:

2.1.X [/usr/share/dotnet/sdk]

 

 

if not exists in program directory Origam.DocGenerator.runtimeconfig.json then create it.

and insert this:

{
"runtimeOptions": {
"framework": {
"name": "Microsoft.NETCore.App",
"version": "2.1.0"
}
}
}

Save and close.

 

 

Windows

install dotnet here: https://www.microsoft.com/net/download?initial-os=windows

Install .NET Core Runtime and .NET Framework Runtime.

if not exists in program directory Origam.DocGenerator.runtimeconfig.json then create it.

and insert this:

{
"runtimeOptions": {
"framework": {
"name": "Microsoft.NETCore.App",
"version": "2.1.0"
}
}
}

Save and close.

  • No labels