You will need the maven
build tool and make
.
Convert specified single XML into the Metanorma AsciiDoc format and save it in the source XML folder:
java -Xss5m -jar target/stepmod2mn-1.61.jar <XML-FileName>
e.g.
java -Xss5m -jar target/stepmod2mn-1.61.jar data/resource_docs/draughting_elements/resource.xml
Note
|
resulted AsciiDoc found in data/resource_docs/draughting_elements/document.adoc |
Convert specified single XML into the Metanorma AsciiDoc format and save it to the specified file/folder:
java -Xss5m -jar target/stepmod2mn-1.61.jar <XML-FileName> [--output <AsciiDoc-FileName>]
e.g.
java -Xss5m -jar target/stepmod2mn-1.61.jar data/resource_docs/draughting_elements/resource.xml --output result_dir/draughting_elements/document.adoc
Convert all resource.xml and module.xml in the specified folder and sub-folders into the Metanorma AsciiDoc format:
java -Xss5m -jar target/stepmod2mn-1.61.jar <Input-folder>
e.g.
java -Xss5m -jar target/stepmod2mn-1.61.jar data/
Note
|
the result AsciiDocs will be saved in the folder with the source resource.xml and module.xml files. |
Convert all resource.xml and module.xml in the specified folder and sub-folders into the Metanorma AsciiDoc format and save them into the output folder:
java -Xss5m -jar target/stepmod2mn-1.61.jar <Input-folder> [--output <Output-folder>]
e.g.
java -Xss5m -jar target/stepmod2mn-1.61.jar data/ --output documents/
Convert all resource.xml and module.xml in the specified folder and sub-folders into the Metanorma AsciiDoc format, except specified documents:
java -Xss5m -jar target/stepmod2mn-1.61.jar <Input-folder> [--exclude <documents or part numbers list>]
e.g.
java -Xss5m -jar target/stepmod2mn-1.61.jar data/ --exclude "machining_features 104"
Convert only specified documents resource.xml and module.xml in the specified folder and sub-folders into the Metanorma AsciiDoc format:
java -Xss5m -jar target/stepmod2mn-1.61.jar <Input-folder> [--include-only <documents list>]
e.g.
java -Xss5m -jar target/stepmod2mn-1.61.jar data/ --include-only "fundamentals_of_product_description_and_support kinematics"
Generate Metanorma collection files (metanorma.yml and collection.yml) for the documents specified in the publication index xml file in the tags 'resource_docs' and 'modules':
java -Xss5m -jar target/stepmod2mn-1.61.jar <Publication-Index-XML-FileName>
e.g.
java -Xss5m -jar target/stepmod2mn-1.61.jar publication/part1000/CR_PMI_5/publication_index.xml
Note
|
the Metanorma collection files .yml will be saved in the 3 level up folder (usually, source repository’s root folder). |
Generate Metanorma collection files (metanorma.yml and collection.yml) for the documents specified in the publication index xml file in the tags 'resource_docs' and 'modules',
and save them into the output folder:
java -Xss5m -jar target/stepmod2mn-1.61.jar <Publication-Index-XML-FileName> [--output <Output-folder>]
e.g.
java -Xss5m -jar target/stepmod2mn-1.61.jar iso-10303-srl/iso-10303-stepmod-wg12/publication/part1000/CR_PMI_5/publication_index.xml --output iso-10303-srl/
Note
|
the output folder should contains the folder with the generated .adoc (usually, 'documents'). You can specify this folder obviously by the parameter '--input-documents': |
e.g.
java -Xss5m -jar target/stepmod2mn-1.61.jar iso-10303-srl/iso-10303-stepmod-wg12/publication/part1000/CR_PMI_5/publication_index.xml --output iso-10303-srl/CR_PMI_5 --input-documents iso-10303-srl/documents
Note
|
the Metanorma collection files (.yml) will be saved in the folder 'iso-10303-srl/CR_PMI_5' and the references point to the documents in the folder iso-10303-srl/documents. |
Generate Metanorma collection files (metanorma.yml and collection.yml) for the specified type of the document (resource_docs or modules) in the publication index xml file:
java -Xss5m -jar target/stepmod2mn-1.61.jar <Publication-Index-XML-FileName> [--type <resource_docs or modules>]
e.g.
java -Xss5m -jar target/stepmod2mn-1.61.jar publication/part1000/CR_PMI_5/publication_index.xml --type resource_docs
Note
|
the Metanorma collection file 'metanorma.yml' will be saved in the 3 level up folder (usually, source repository’s root folder). |
java -jar target/stepmod2mn-1.61.jar <start folder to process xml maps files> --svg
e.g.
java -jar target/stepmod2mn-1.61.jar data/resources --svg
Generate SVG images for the XML in the specified folder and sub-folders, and save them in the output folder:
java -jar target/stepmod2mn-1.61.jar <start folder to process xml maps files> --svg [--output <Output-folder>]
e.g.
java -jar target/stepmod2mn-1.61.jar data/resources --svg --output schemas/
java -jar stepmod2mn-1.61.jar --xml <Express Imagemap XML file path> --image <Image file name> [--svg <resulted SVG map file or folder>]
e.g.
java -jar stepmod2mn-1.61.jar --xml data\resource_docs\fundamentals_of_product_description_and_support\schema_diagexpg1.xml --image schema_diagexpg1.gif --svg schema_diagexpg1.svg
Update version in pom.xml
, e.g.:
<groupId>org.metanorma</groupId>
<artifactId>stepmod2mn</artifactId>
<version>1.61</version>
<name>STEPmod XML to Metanorma AsciiDoc converter</name>
Build the package using instructions above, the package will be created at:
target/stepmod2mn-{version}.jar
Tag the same version in Git:
git tag v1.61
git push origin v1.61
Then the corresponding GitHub release will be automatically created at: https://github.com/metanorma/stepmod2mn/releases