Skip to main content

DDS Document Generator

Project description

OmniCon DDS Document Generator - API

Project description

OmniCon Document Generator (DocGen) generates an ICD/documentation from standard DDS type files. The DocGen is utilized via a simple Python API or via a dedicated GUI (see Omnicon DDS DocGen GUI)

Installation

API Usage Example

The following example generates an PDF & Docx ICD from a provided DDS "ShapeType.xml" and a topics mapping, "TopicNamesToTypesDefMap.xml".

from Omnicon_DDSDocGen.Omnicon_DDSDocGen import DDSDocGen

doc_gen = DDSDocGen()
doc_gen.generate_document(
    dds_types_files=["ShapeType.xml"],
    dds_topics_types_mapping="TopicNamesToTypesDefMap.xml",
    version="v1.0",
    title="Demo ICD",
    order_alphabetically=True,
    output_file_name="DemoICD",
    output_folder="",
    output_formats=['pdf', 'docx'])

ShapeType.xml (based on http://www.omg.org/spec/DDS-XML)

<?xml version="1.0" encoding="UTF-8"?>
<types xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <enum name="ShapeFillKind">
    <enumerator name="SOLID_FILL"/>
    <enumerator name="TRANSPARENT_FILL"/>
    <enumerator name="HORIZONTAL_HATCH_FILL"/>
    <enumerator name="VERTICAL_HATCH_FILL"/>
  </enum>
  <struct name= "ShapeType">
    <member name="color" stringMaxLength="128" type="string" key="true"/>
    <member name="x" type="int32"/>
    <member name="y" type="int32"/>
    <member name="shapesize" type="int32"/>
  </struct>
  <struct name= "ShapeTypeExtended" baseType="ShapeType">
    <member name="fillKind" type="nonBasic"  nonBasicTypeName= "ShapeFillKind"/>
    <member name="angle" type="float32"/>
  </struct>
</types>

TopicNamesToTypesDefMap.xml (based on http://www.omg.org/spec/DDS-XML)

<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <domain_library name="Domain_Lib">
    <domain name="Domain">
      <!--Types Definition-->
      <register_type name="ShapeTypeExtended" type_ref="ShapeTypeExtended" />

      <!--Topics Definition-->
      <topic name="Square" register_type_ref="ShapeTypeExtended"/>
    </domain>
  </domain_library>
</dds>

API Arguments

Argument Type Description Optional Default value
dds_types_files list[str] A list of file or folders names, in an order specified by the user according to files dependencies.
dds_topics_types_mapping string An XML file that contains a DDS topic to type mapping. Sending an empty string ("") will switch ICD from topic-based to type-based document * (creates type based document)
output_file_name string The user's file name of choice * "ICD"
title string The title/heading of the document. This string will be added to the first page of the document. * "ICD"
version string The document's version number - This string will be added to the top page of the ICD. * "1.0"
order_alphabetically bool Select the order of generated document topics/types: alphabetically or according to the loaded files order * True (alphabetically)
output_folder string The user's output folder of choice * current working directory
output_formats list[str] A list of desired output formats as strings (list must contain at least one option)
update_progress_bar_function function A 'pointer' to the function that updates the progress bar. * None

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Omnicon_DDSDocGen-2.0.1-0-cp37-cp37m-win_amd64.whl (53.6 kB view details)

Uploaded CPython 3.7mWindows x86-64

File details

Details for the file Omnicon_DDSDocGen-2.0.1-0-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for Omnicon_DDSDocGen-2.0.1-0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 f3d70fd113fea8444c9dd91aba042ca586454ba4cc1a958038a4034e3e7fe2f3
MD5 3d81d1e5529db1d6d51194e6bfec38fa
BLAKE2b-256 d7c8ea953ec98885ec4e3bb541d6ed1570983f52bd6b2b94e1085363693611fe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page