= STEPmod utilities image:https://img.shields.io/gem/v/metanorma.svg["Gem Version", link="https://rubygems.org/gems/metanorma"] image:https://github.com/metanorma/stepmod-utils/workflows/ubuntu/badge.svg["Ubuntu Build Status", link="https://github.com/metanorma/stepmod-utils/actions?query=workflow%3Aubuntu"] image:https://github.com/metanorma/stepmod-utils/workflows/macos/badge.svg["OSX Build Status", link="https://github.com/metanorma/stepmod-utils/actions?query=workflow%3Amacos"] image:https://github.com/metanorma/stepmod-utils/workflows/windows/badge.svg["Windows Build Status", link="https://github.com/metanorma/stepmod-utils/actions?query=workflow%3Awindows"] image:https://codeclimate.com/github/metanorma/stepmod-utils/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/stepmod-utils"] image:https://img.shields.io/github/issues-pr-raw/metanorma/stepmod-utils.svg["Pull Requests", link="https://github.com/metanorma/stepmod-utils/pulls"] image:https://img.shields.io/github/commits-since/metanorma/stepmod-utils/latest.svg["Commits since latest",link="https://github.com/metanorma/stepmod-utils/releases"] == Purpose The `stepmod-utils` Ruby gem provides a number of tools to work with the STEPmod repository. == Installation [source,ruby] ---- gem install stepmod-utils ---- Or include it in your gemspec. == Usage [source,sh] ---- # 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.adoc` all terms extracted * `991-generated-bibliography.adoc` all bibliographic sources where the terms come from == Conversion of STEPmod descriptions.xml into adoc [source,sh] ---- $ stepmod-convert-express-description /path/to/the/stepmod/descriptions.xml ---- Example output: [source,adoc] ----- (*"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: [source,xml] ---- The subject of the contract_schema is the description of contract agreements. Contract information may be attached to any aspect of a product data. ---- Command: [source,sh] ---- $ stepmod-convert-express-resource resource.xml ---- Will give output: [source,adoc] ---- == 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: [source,sh] ---- [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 ... ----