Purpose
The stepmod-utils Ruby gem provides a number of tools to work with the STEPmod
repository.
Installation
gem install stepmod-utils
Or include it in your gemspec.
Usage
# Extracts from specified stepmod/data/ directory
$ stepmod-extract-terms -p {stepmod-data-directory} -i {path-to-repository_index.xml}
Then these files will be created:
-
031-generated-terms.adocall terms extracted -
991-generated-bibliography.adocall bibliographic sources where the terms come from
Conversion of STEPmod descriptions.xml into adoc
$ stepmod-convert-express-description /path/to/the/stepmod/descriptions.xml
Example output:
(*"application_context_schema"
*)
(*"application_context_schema.exchange_identification_context_select"
The *exchange\_identification\_context\_select* type allows for the designation of the data types express_ref:[management_resources_schema:ir_express:management_resources_schema.identification_assignment] and express_ref:[person_organization_schema:ir_express:person_organization_schema.organization] .
*)
(*"application_context_schema.application_context"
An *application\_context*, as defined in ISO 10303-1, is a context in which product data is defined and has meaning. An *application\_context* represents various types of information that relate to product data and may affect the meaning and usage of that data.
*)
(*"application_context_schema.application_context.application"
the express_ref:[support_resource_schema:ir_express:support_resource_schema.label] by which the *application\_context* is known.
[NOTE]
--
The meaning of this attribute can be defined in the annotated EXPRESS schemas that use or specialize this entity, or in an agreement of common understanding between the partners sharing this information.
--
*)
Conversion of STEPmod resource.xml into adoc
Given resource.xml file contents:
<schema name="contract_schema" number="8369" version="3">
<introduction>
The subject of the <b>contract_schema</b> is the description of contract agreements.
</introduction>
<fund_cons>
Contract information may be attached to any aspect of a product data.
</fund_cons>
<express-g>
<imgfile file="contract_schemaexpg1.xml"/>
<imgfile file="contract_schemaexpg2.xml"/>
</express-g>
</schema>
Command:
$ stepmod-convert-express-resource resource.xml
Will give output:
== Introduction
The subject of the *contract_schema* is the description of contract agreements.
== Fundamental concerns
Contract information may be attached to any aspect of a product data.
expg_image:contract_schemaexpg1.xml[]
expg_image:contract_schemaexpg2.xml[]
Git repository
If the STEPmod repository is a Git repository, term extract will work.
Sample output:
[stepmod-utils] INFO: STEPmod directory set to ../iso-10303-stepmod.
[stepmod-utils] INFO: Detecting paths...
[stepmod-utils] INFO: Processing XML file data/application_protocols/boundary_representation_for_iso_14306_open_jt/application_protocol.xml
[stepmod-utils] INFO: skipped ISO/CD 10303-243 as it is not IS, DIS or TS
[stepmod-utils] INFO: Processing XML file data/application_protocols/configuration_control_3d_design_ed2/application_protocol.xml
[stepmod-utils] INFO: Completed processing XML file data/application_protocols/configuration_control_3d_design_ed2/application_protocol.xml
[stepmod-utils] INFO: Processing XML file data/application_protocols/electronic_assembly_interconnect_and_packaging_design/application_protocol.xml
[stepmod-utils] INFO: skipped ISO/CD 10303-210:2019 as it is not IS, DIS or TS
[stepmod-utils] INFO: Processing XML file data/application_protocols/functional_data_and_their_schematic_representation_for_process_plant/application_protocol.xml
[stepmod-utils] INFO: Completed processing XML file data/application_protocols/functional_data_and_their_schematic_representation_for_process_plant/application_protocol.xml
...