From 08036123933559b54b877de30572bf89ebf50b22 Mon Sep 17 00:00:00 2001 From: Alexander Dyuzhev Date: Tue, 14 May 2024 19:48:34 +0300 Subject: [PATCH] SOURCE parsing added, #181 --- README.adoc | 56 +++++++++---------- pom.xml | 2 +- src/main/resources/stepmod2mn.adoc.xsl | 76 ++++++++++++++++++++++---- 3 files changed, 95 insertions(+), 39 deletions(-) diff --git a/README.adoc b/README.adoc index 5f63164..f90333c 100644 --- a/README.adoc +++ b/README.adoc @@ -17,14 +17,14 @@ You will need the `maven` build tool and `make`. [source,sh] ---- -java -Xss5m -jar target/stepmod2mn-1.58.jar +java -Xss5m -jar target/stepmod2mn-1.59.jar ---- e.g. [source,sh] ---- -java -Xss5m -jar target/stepmod2mn-1.58.jar data/resource_docs/draughting_elements/resource.xml +java -Xss5m -jar target/stepmod2mn-1.59.jar data/resource_docs/draughting_elements/resource.xml ---- NOTE: resulted AsciiDoc found in data/resource_docs/draughting_elements/document.adoc @@ -34,28 +34,28 @@ NOTE: resulted AsciiDoc found in data/resource_docs/draughting_elements/document [source,sh] ---- -java -Xss5m -jar target/stepmod2mn-1.58.jar [--output ] +java -Xss5m -jar target/stepmod2mn-1.59.jar [--output ] ---- e.g. [source,sh] ---- -java -Xss5m -jar target/stepmod2mn-1.58.jar data/resource_docs/draughting_elements/resource.xml --output result_dir/draughting_elements/document.adoc +java -Xss5m -jar target/stepmod2mn-1.59.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: [source,sh] ---- -java -Xss5m -jar target/stepmod2mn-1.58.jar +java -Xss5m -jar target/stepmod2mn-1.59.jar ---- e.g. [source,sh] ---- -java -Xss5m -jar target/stepmod2mn-1.58.jar data/ +java -Xss5m -jar target/stepmod2mn-1.59.jar data/ ---- NOTE: the result AsciiDocs will be saved in the folder with the source resource.xml and module.xml files. @@ -65,14 +65,14 @@ NOTE: the result AsciiDocs will be saved in the folder with the source resource. [source,sh] ---- -java -Xss5m -jar target/stepmod2mn-1.58.jar [--output ] +java -Xss5m -jar target/stepmod2mn-1.59.jar [--output ] ---- e.g. [source,sh] ---- -java -Xss5m -jar target/stepmod2mn-1.58.jar data/ --output documents/ +java -Xss5m -jar target/stepmod2mn-1.59.jar data/ --output documents/ ---- @@ -80,42 +80,42 @@ java -Xss5m -jar target/stepmod2mn-1.58.jar data/ --output documents/ [source,sh] ---- -java -Xss5m -jar target/stepmod2mn-1.58.jar [--exclude ] +java -Xss5m -jar target/stepmod2mn-1.59.jar [--exclude ] ---- e.g. [source,sh] ---- -java -Xss5m -jar target/stepmod2mn-1.58.jar data/ --exclude "machining_features 104" +java -Xss5m -jar target/stepmod2mn-1.59.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: [source,sh] ---- -java -Xss5m -jar target/stepmod2mn-1.58.jar [--include-only ] +java -Xss5m -jar target/stepmod2mn-1.59.jar [--include-only ] ---- e.g. [source,sh] ---- -java -Xss5m -jar target/stepmod2mn-1.58.jar data/ --include-only "fundamentals_of_product_description_and_support kinematics" +java -Xss5m -jar target/stepmod2mn-1.59.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': [source,sh] ---- -java -Xss5m -jar target/stepmod2mn-1.58.jar +java -Xss5m -jar target/stepmod2mn-1.59.jar ---- e.g. [source,sh] ---- -java -Xss5m -jar target/stepmod2mn-1.58.jar publication/part1000/CR_PMI_5/publication_index.xml +java -Xss5m -jar target/stepmod2mn-1.59.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). @@ -125,14 +125,14 @@ and save them into the output folder: [source,sh] ---- -java -Xss5m -jar target/stepmod2mn-1.58.jar [--output ] +java -Xss5m -jar target/stepmod2mn-1.59.jar [--output ] ---- e.g. [source,sh] ---- -java -Xss5m -jar target/stepmod2mn-1.58.jar iso-10303-srl/iso-10303-stepmod-wg12/publication/part1000/CR_PMI_5/publication_index.xml --output iso-10303-srl/ +java -Xss5m -jar target/stepmod2mn-1.59.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': @@ -141,7 +141,7 @@ e.g. [source,sh] ---- -java -Xss5m -jar target/stepmod2mn-1.58.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 +java -Xss5m -jar target/stepmod2mn-1.59.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. @@ -151,14 +151,14 @@ NOTE: the Metanorma collection files (.yml) will be saved in the folder 'iso-103 [source,sh] ---- -java -Xss5m -jar target/stepmod2mn-1.58.jar [--type ] +java -Xss5m -jar target/stepmod2mn-1.59.jar [--type ] ---- e.g. [source,sh] ---- -java -Xss5m -jar target/stepmod2mn-1.58.jar publication/part1000/CR_PMI_5/publication_index.xml --type resource_docs +java -Xss5m -jar target/stepmod2mn-1.59.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). @@ -168,42 +168,42 @@ NOTE: the Metanorma collection file 'metanorma.yml' will be saved in the 3 level [source,sh] ---- -java -jar target/stepmod2mn-1.58.jar --svg +java -jar target/stepmod2mn-1.59.jar --svg ---- e.g. [source,sh] ---- -java -jar target/stepmod2mn-1.58.jar data/resources --svg +java -jar target/stepmod2mn-1.59.jar data/resources --svg ---- === Generate SVG images for the XML in the specified folder and sub-folders, and save them in the output folder: [source,sh] ---- -java -jar target/stepmod2mn-1.58.jar --svg [--output ] +java -jar target/stepmod2mn-1.59.jar --svg [--output ] ---- e.g. [source,sh] ---- -java -jar target/stepmod2mn-1.58.jar data/resources --svg --output schemas/ +java -jar target/stepmod2mn-1.59.jar data/resources --svg --output schemas/ ---- === Generate SVG image for Express Imagemap XML and Image: [source,sh] ---- -java -jar stepmod2mn-1.58.jar --xml --image [--svg ] +java -jar stepmod2mn-1.59.jar --xml --image [--svg ] ---- e.g. [source,sh] ---- -java -jar stepmod2mn-1.58.jar --xml data\resource_docs\fundamentals_of_product_description_and_support\schema_diagexpg1.xml --image schema_diagexpg1.gif --svg schema_diagexpg1.svg +java -jar stepmod2mn-1.59.jar --xml data\resource_docs\fundamentals_of_product_description_and_support\schema_diagexpg1.xml --image schema_diagexpg1.gif --svg schema_diagexpg1.svg ---- @@ -223,7 +223,7 @@ Update version in `pom.xml`, e.g.: ---- org.metanorma stepmod2mn -1.58 +1.59 STEPmod XML to Metanorma AsciiDoc converter ---- @@ -234,8 +234,8 @@ Tag the same version in Git: [source,xml] ---- -git tag v1.58 -git push origin v1.58 +git tag v1.59 +git push origin v1.59 ---- Then the corresponding GitHub release will be automatically created at: diff --git a/pom.xml b/pom.xml index c98e87f..5241baf 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.metanorma stepmod2mn - 1.58 + 1.59 STEPmod XML to Metanorma AsciiDoc converter jar https://www.metanorma.org diff --git a/src/main/resources/stepmod2mn.adoc.xsl b/src/main/resources/stepmod2mn.adoc.xsl index 79c216e..66d2a6c 100644 --- a/src/main/resources/stepmod2mn.adoc.xsl +++ b/src/main/resources/stepmod2mn.adoc.xsl @@ -409,8 +409,20 @@ - - + + + + + + + + + + + + +++[+++ + + @@ -1015,14 +1027,58 @@ - - - - +++[+++ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [.source] +
+ << + + + + + , section + >> + , +