Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubl 2.4 csd01 docx first cut #24

Merged
merged 4 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ Pulling from the `review` branch must be done after every time the editor update
1. The maintainer makes the changes they wish to their local copy of the `other` branch. A local preview facility allows the maintainer to preview in a web browser their edits to the specification fully formatted as an OASIS specification.
When completed they commit their changes and push their changes to GitHub in their private branch.
1. Every push to GitHub triggers a GitHub Action that forwards a copy of the XML to the https://www.RealtaOnline.com API entry point specific to the desired outputs.
1. Réalta prepares the HTML and PDF outputs for the OASIS layout and the PDF output for the ISO Directives Part 2 layout.
1. Réalta returns to GitHub the published results in a ZIP file. The Action’s script unzips the results and packages them in a doubly-zipped ZIP file. The outer ZIP is used to wrap the Action’s artifacts results. The inner two ZIP files wrap for posting to the OASIS Kavi server, respectively, the work product inputs and intermediate files for archive purposes, and the set of work product files to be posted by TC Administration to the OASIS Docs server. These Action results are transient and not placed into the GitHub code repository. Eventually GitHub deletes old Action results, but participants are encouraged to delete the workflows and files as soon as possible. The maintainer downloads the GitHub Action’s artifacts ZIP file for their review and, if desired, local backup. If they wish to make changes, they return to step 2 and repeat the process.
1. Réalta prepares the HTML and PDF outputs for the OASIS layout and the PDF and DOCX outputs for the ISO Directives Part 2 layout. The OASIS outputs are included in the distribution ZIP. The ISO outputs are included in a dedicated ZIP.
1. Réalta returns to GitHub the published results in a ZIP file. The Action’s script unzips the results and packages them in a doubly-zipped ZIP file. The outer ZIP is used to wrap the Action’s artifacts results for download from GitHub. The inner three ZIP files for posting to the OASIS Kavi server are, respectively, the work product inputs and intermediate files for archive purposes, the ISO publishing outputs, and the set of distribution work product files to be posted by TC Administration to the OASIS Docs server. These Action results are transient and not placed into the GitHub code repository. Eventually GitHub deletes old Action results, but participants are encouraged to delete the workflows and files as soon as possible. The maintainer downloads the GitHub Action’s artifacts ZIP file for their review and, if desired, local backup. If they wish to make changes, they return to step 2 and repeat the process.
1. When the maintainer is satisfied with their work to be reviewed by the editor and other team members, they send a pull request to the editor describing their changes that they have committed to their `other` branch.
1. The editor reviews the pull request and, if satisfied with the contribution, they pull the server’s copy of the `other` branch into their local environment and merge it into their local `UBL-{version}-{stage}` branch or directly into their local `review` branch.
Typically the editor will continue to make any changes they wish in their local `UBL-{version}-{stage}` branch, pushing their intermediate work to review their progress.
1. When the editor has incorporated changes from all of the contributing maintainers and is prepared to make the review document available, they merge their local `UBL-{version}-{stage}` branch into their local `review` branch and push their `review` branch to GitHub.
This push automatically triggers the GitHub Action running the complete publishing process that returns the work product ready for the editor to download from GitHub to review. The GitHub Action results are posted to Kavi for the committee and public to download the published results and review. The artifacts ZIP is manually unpacked revealing the two inner ZIPs that are then uploaded to the OASIS Kavi server for posterity and to fulfill the obligation to the public that intermediate work products be easily available. Following the OASIS TC Process the committee can qualify a snapshot on the OASIS Kavi server to be uploaded by OASIS TC Administration to the OASIS Docs server. If maintainers wish to make changes they return to step 1 (not step 2) and repeat the process.
This push automatically triggers the GitHub Action running the complete publishing process that returns the work product ready for the editor to download from GitHub to review. The GitHub Action results are posted to Kavi for the committee and public to download the published results and review. The artifacts ZIP is manually unpacked revealing the three inner ZIPs that are then uploaded to the OASIS Kavi server for posterity and to fulfill the obligation to the public that intermediate work products be easily available. Following the OASIS TC Process the committee can qualify a snapshot on the OASIS Kavi server to be uploaded by OASIS TC Administration to the OASIS Docs server. If maintainers wish to make changes they return to step 1 (not step 2) and repeat the process.
1. When the editor has accommodated all of the feedback from committee members regarding the review and wishes to archive a snapshot for public use, they merge their local `review` branch into their local `main` branch.
1. The editor pushes their local `main` branch to GitHub. While this push will produce a set of artefacts, those artefacts are ignored and deleted by the editor because they may have different timestamps than the files approved by committee and uploaded to Kavi. But anyone wanting a snapshot of the source material (modulo remotely changed files such as spreadsheets) can find the last approved set from the `main` branch.

Expand Down Expand Up @@ -371,7 +371,7 @@ Opening the XML in Mac OSX:

If you are working from the GitHub web interface, every time you commit a change you will trigger a `git push`. If you are working from the command line you can do multiple commits before you push them to the repository.

Every `git push` to the repository triggers the GitHub Action execution of the build process on the files found in the repository after the push. The action takes about 25 minutes of processing on GitHub to create all of the 550Mb of artefacts. The resulting ZIP is about 160Mb and when unzipped provides the two archive and distribution ZIP files with the results.
Every `git push` to the repository triggers the GitHub Action execution of the build process on the files found in the repository after the push. The action takes about 25 minutes of processing on GitHub to create all of the 550Mb of artefacts. The resulting ZIP is about 160Mb and when unzipped provides the three archive, ISO, and distribution ZIP files with the results.

The results that are to be made public are posted as-is to Kavi. Please do not make reference to the GitHub artefacts in committee mail list posts as those artefacts evaporate after 90 days.

Expand Down Expand Up @@ -414,6 +414,7 @@ The build result (after about 30 minutes on the [GitHub Actions tab](https://git

The embedded ZIP files found in the download package:
- `UBL-2.x-{stage}-{timestamp}.zip` - distribution artefacts
- `UBL-2.x-{stage}-{timestamp}-iso-iec-19845.zip` - publishing artefacts for ISO/IEC
- `UBL-2.x-{stage}-{timestamp}-archive-only.zip` - archive artefacts

To determine if the files are ready for sending to the project editors, look in the results in the `archive-only` ZIP for these files summarizing any problems with the submission:
Expand Down
3 changes: 3 additions & 0 deletions build-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ touch $targetdir/$package-$UBLstage-$label-archive-only/bu
pushd $targetdir
if [ -f $package-$UBLstage-$label-archive-only.zip ]; then rm $package-$UBLstage-$label-archive-only.zip ; fi
7z a $package-$UBLstage-$label-archive-only.zip $package-$UBLstage-$label-archive-only
if [ -f $package-$UBLstage-$label-iso-iec-19845.zip ]; then rm $package-$UBLstage-$label-iso-iec-19845.zip ; fi
7z a $package-$UBLstage-$label-iso-iec-19845.zip $package-$UBLstage-$label-iso-iec-19845
if [ -f $package-$UBLstage-$label.zip ]; then rm $package-$UBLstage-$label.zip ; fi
7z a $package-$UBLstage-$label.zip $package-$UBLstage-$label
popd
Expand All @@ -37,6 +39,7 @@ then
find . -not -name target -not -name .github -maxdepth 1 -exec rm -r -f {} \;

mv $targetdir/$package-$UBLstage-$label-archive-only.zip .
mv $targetdir/$package-$UBLstage-$label-iso-iec-19845.zip .
mv $targetdir/$package-$UBLstage-$label.zip .
rm -r -f $targetdir

Expand Down
87 changes: 63 additions & 24 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,6 @@ file="${dir}/artefacts-${package}-${UBLstage}-${label}/intermediate-support-file
<include name="UBL-${UBLversion}-preview.html"/>
<include name="UBL-${UBLversion}.html"/>
<include name="UBL-${UBLversion}.pdf"/>
<include name="iso-iec-19845-draft.pdf"/>
</fileset>
</copy>
</sequential>
Expand Down Expand Up @@ -1371,7 +1370,6 @@ file="${dir}/artefacts-${package}-${UBLstage}-${label}/intermediate-support-file
<delete file="${dir}/UBL-${UBLversion}-preview.html"/>
<delete file="${dir}/UBL-${UBLversion}.html"/>
<delete file="${dir}/UBL-${UBLversion}.pdf"/>
<delete file="${dir}/iso-iec-19845-draft.pdf"/>
<delete file="${dir}/UBL-${UBLversion}-pub.zip"/>
<echo file="${dir}/missing---UBL-${UBLversion}-html---missing.txt"/>
<echo file="${dir}/missing---UBL-${UBLversion}-pdf---missing.txt"/>
Expand All @@ -1397,8 +1395,20 @@ file="${dir}/artefacts-${package}-${UBLstage}-${label}/intermediate-support-file
<include name="UBL-${UBLversion}.xml"/>
</srcfiles>
</uptodate>
<uptodate targetfile="${dir}/iso-iec-19845-draft.docx"
property= "docs-UBL-iso-docx-okay">
<srcfiles dir="${dir}">
<include name="UBL-${UBLversion}.xml"/>
</srcfiles>
</uptodate>
<uptodate targetfile="${dir}/iso-iec-19845-draft.pdf"
property= "docs-UBL-iso-okay">
property= "docs-UBL-iso-pdf-okay">
<srcfiles dir="${dir}">
<include name="UBL-${UBLversion}.xml"/>
</srcfiles>
</uptodate>
<uptodate targetfile="${dir}/iso-iec-19845-draft.niso.zip"
property= "docs-UBL-iso-xml-okay">
<srcfiles dir="${dir}">
<include name="UBL-${UBLversion}.xml"/>
</srcfiles>
Expand All @@ -1408,7 +1418,9 @@ file="${dir}/artefacts-${package}-${UBLstage}-${label}/intermediate-support-file
<istrue value="${docs-UBL-xml-okay}"/>
<istrue value="${docs-UBL-html-okay}"/>
<istrue value="${docs-UBL-pdf-okay}"/>
<istrue value="${docs-UBL-iso-okay}"/>
<istrue value="${docs-UBL-iso-docx-okay}"/>
<istrue value="${docs-UBL-iso-pdf-okay}"/>
<istrue value="${docs-UBL-iso-xml-okay}"/>
</and>
</condition>
</target>
Expand All @@ -1418,7 +1430,9 @@ file="${dir}/artefacts-${package}-${UBLstage}-${label}/intermediate-support-file
<delete file="${dir}/UBL-${UBLversion}-preview.html"/>
<delete file="${dir}/UBL-${UBLversion}.html"/>
<delete file="${dir}/UBL-${UBLversion}.pdf"/>
<delete file="${dir}/iso-iec-19845-draft.docx"/>
<delete file="${dir}/iso-iec-19845-draft.pdf"/>
<delete file="${dir}/iso-iec-19845-draft.niso.zip"/>
<delete file="${dir}/UBL-${UBLversion}-pub.zip"/>
<!--package inputs to the publishing process-->
<zip destfile="${dir}/UBL-${UBLversion}-pub.zip">
Expand All @@ -1444,23 +1458,35 @@ file="${dir}/artefacts-${package}-${UBLstage}-${label}/intermediate-support-file
<available property="ready-pdf" file="${dir}/UBL-${UBLversion}.oasis.pdf"/>
<echo unless:set="ready-pdf" message="PDF not created"/>
<echo if:set="ready-pdf" message="PDF created"/>
<available property="ready-iso" file="${dir}/UBL-${UBLversion}.iso.pdf"/>
<echo unless:set="ready-iso" message="ISO PDF not created"/>
<echo if:set="ready-iso" message="ISO PDF created"/>
<available property="ready-html" file="${dir}/UBL-${UBLversion}.oasis.html"/>
<echo unless:set="ready-html" message="HTML not created"/>
<echo if:set="ready-html" message="HTML created"/>
<available property="ready-iso-docx" file="${dir}/UBL-${UBLversion}.iso.docx"/>
<echo unless:set="ready-iso-docx" message="ISO DOCX not created"/>
<echo if:set="ready-iso-docx" message="ISO DOCX created"/>
<available property="ready-iso-pdf" file="${dir}/UBL-${UBLversion}.iso.pdf"/>
<echo unless:set="ready-iso-pdf" message="ISO PDF not created"/>
<echo if:set="ready-iso-pdf" message="ISO PDF created"/>
<available property="ready-iso-xml" file="${dir}/UBL-${UBLversion}.niso.zip"/>
<echo unless:set="ready-iso-xml" message="NISO XML not created"/>
<echo if:set="ready-iso-xml" message="NISO XML created"/>
<!--these touches are necessary because unzip doesn't preserve time of day-->
<touch file="${dir}/UBL-${UBLversion}.oasis.pdf"/>
<touch file="${dir}/UBL-${UBLversion}.iso.pdf"/>
<touch file="${dir}/UBL-${UBLversion}.oasis.html"/>
<touch if:set="ready-pdf" file="${dir}/UBL-${UBLversion}.oasis.pdf"/>
<touch if:set="ready-html" file="${dir}/UBL-${UBLversion}.oasis.html"/>
<touch if:set="ready-iso-docx" file="${dir}/UBL-${UBLversion}.iso.docx"/>
<touch if:set="ready-iso-pdf" file="${dir}/UBL-${UBLversion}.iso.pdf"/>
<touch if:set="ready-iso-xml" file="${dir}/UBL-${UBLversion}.niso.zip"/>
<!--the names needed are not the names created-->
<move preservelastmodified="true" file="${dir}/UBL-${UBLversion}.oasis.pdf"
tofile="${dir}/UBL-${UBLversion}.pdf"/>
tofile="${dir}/UBL-${UBLversion}.pdf" if:set="ready-pdf"/>
<move preservelastmodified="true" file="${dir}/UBL-${UBLversion}.oasis.html"
tofile="${dir}/UBL-${UBLversion}.html"/>
tofile="${dir}/UBL-${UBLversion}.html" if:set="ready-html"/>
<move preservelastmodified="true" file="${dir}/UBL-${UBLversion}.iso.docx"
tofile="${dir}/iso-iec-19845-draft.docx" if:set="ready-iso-docx"/>
<move preservelastmodified="true" file="${dir}/UBL-${UBLversion}.iso.pdf"
tofile="${dir}/iso-iec-19845-draft.pdf"/>
tofile="${dir}/iso-iec-19845-draft.pdf" if:set="ready-iso-pdf"/>
<move preservelastmodified="true" file="${dir}/UBL-${UBLversion}.niso.zip"
tofile="${dir}/iso-iec-19845-draft.niso.zip" if:set="ready-iso-xml"/>
<!--intermediate file no longer needed-->
<delete file="${dir}/UBL-${UBLversion}-pub.zip"/>

Expand All @@ -1487,7 +1513,9 @@ file="${dir}/artefacts-${package}-${UBLstage}-${label}/intermediate-support-file
<available property="xml-made" file="${dir}/UBL-${UBLversion}.xml"/>
<available property="html-made" file="${dir}/UBL-${UBLversion}.html"/>
<available property="pdf-made" file="${dir}/UBL-${UBLversion}.pdf"/>
<available property="iso-made" file="${dir}/iso-iec-19845-draft.pdf"/>
<available property="iso-docx-made" file="${dir}/iso-iec-19845-draft.docx"/>
<available property="iso-pdf-made" file="${dir}/iso-iec-19845-draft.pdf"/>
<available property="iso-xml-made" file="${dir}/iso-iec-19845-draft.niso.zip"/>
<available property="odt-made" file="${dir}/UBL-${UBLversion}-${label}.odt"/>
<condition property="docs-not-made">
<not>
Expand All @@ -1498,7 +1526,9 @@ file="${dir}/artefacts-${package}-${UBLstage}-${label}/intermediate-support-file
<and>
<istrue value="${html-made}"/>
<istrue value="${pdf-made}"/>
<!--<istrue value="${iso-made}"/>-->
<istrue value="${iso-docx-made}"/>
<istrue value="${iso-pdf-made}"/>
<istrue value="${iso-xml-made}"/>
<istrue value="${odt-made}"/>
</and>
</or>
Expand All @@ -1509,7 +1539,9 @@ file="${dir}/artefacts-${package}-${UBLstage}-${label}/intermediate-support-file
<property name="xml-made" value="false"/>
<property name="html-made" value="false"/>
<property name="pdf-made" value="false"/>
<property name="iso-made" value="false"/>
<property name="iso-docx-made" value="false"/>
<property name="iso-pdf-made" value="false"/>
<property name="iso-xml-made" value="false"/>
<property name="odt-made" value="false"/>
<property name="not-attempting-to-produce-necessary-results" value="false"/>
<!--<echo message="Diagnostics:${xml-made}, HTML:${html-made}, PDF:${pdf-made}, ISO:${iso-made}, SKIP:${not-attempting-to-produce-necessary-results} validatedInputs:${validatedInputs}"/>-->
Expand All @@ -1521,7 +1553,9 @@ file="${dir}/artefacts-${package}-${UBLstage}-${label}/intermediate-support-file
<include name="UBL-${UBLversion}-preview.html"/>
<include name="UBL-${UBLversion}.html"/>
<include name="UBL-${UBLversion}.pdf"/>
<include name="iso-iec-19845-draft.docx"/>
<include name="iso-iec-19845-draft.pdf"/>
<include name="iso-iec-19845-draft.niso.zip"/>
<include name="missing*missing.txt"/>
</fileset>
</copy>
Expand All @@ -1534,10 +1568,6 @@ file="${dir}/artefacts-${package}-${UBLstage}-${label}/intermediate-support-file
<mkdir dir="${dir}/hub-${package}-${UBLstage}-${label}/intermediate-support-files"/>
<move unless:true="includeISO" preservelastmodified="true"
todir="${dir}/hub-${package}-${UBLstage}-${label}/intermediate-support-files">
<!--the ISO file is in the docs directory only for drafts; move it to archive if not a draft-->
<fileset dir="${dir}/hub-${package}-${UBLstage}-${label}">
<include name="iso-iec-19845-draft.pdf"/>
</fileset>
<fileset dir="${dir}">
<include name="UBL-${UBLversion}*.txt"/>
</fileset>
Expand Down Expand Up @@ -1758,8 +1788,11 @@ file2="${dir}/hub-${package}-${UBLstage}-${label}/intermediate-support-files/new
<mkdir dir="${dir}/${package}-${UBLstage}-${label}"/>
<delete dir="${dir}/${package}-${UBLstage}-${label}-archive-only"/>
<mkdir dir="${dir}/${package}-${UBLstage}-${label}-archive-only"/>
<delete dir="${dir}/${package}-${UBLstage}-${label}-iso-iec-19845"/>
<mkdir dir="${dir}/${package}-${UBLstage}-${label}-iso-iec-19845"/>
<delete file="${dir}/${package}-${UBLstage}-${label}.zip"/>
<delete file="${dir}/${package}-${UBLstage}-${label}-archive-only.zip"/>
<delete file="${dir}/${package}-${UBLstage}-${label}-iso-iec-19845.zip"/>

<!--start the distribution directory with the contents of the artefacts
package and then the contents of the hub package-->
Expand Down Expand Up @@ -1809,18 +1842,24 @@ file2="${dir}/hub-${package}-${UBLstage}-${label}/intermediate-support-files/new
<move file="${dir}/${package}-${UBLstage}-${label}/iso-iec-19845-draft-sts"
todir="${dir}/${package}-${UBLstage}-${label}/archive-only"
failonerror="false"/>-->
<!--use "copy" to distribute ISO draft to all, "move" for only archive-->
<move unless:true="includeISO"
todir="${dir}/${package}-${UBLstage}-${label}-archive-only"
failonerror="false">
<fileset dir="${dir}/hub-${package}-${UBLstage}-${label}">
<include name="iso-iec-19845-draft.pdf"/>
</fileset>
<fileset dir="${dir}">
<include name="UBL-${UBLversion}*.txt"/>
<include name="UBL-${UBLversion}*.odt"/>
</fileset>
</move>

<move unless:true="includeISO"
todir="${dir}/${package}-${UBLstage}-${label}-iso-iec-19845"
failonerror="false">
<fileset dir="${dir}/${package}-${UBLstage}-${label}">
<include name="iso-iec-19845-draft.docx"/>
<include name="iso-iec-19845-draft.pdf"/>
<include name="iso-iec-19845-draft.niso.zip"/>
</fileset>
</move>

<!-- <touch datetime="${datetimelocal}" pattern="yyyyMMdd-HHmm">
<fileset dir="${dir}/${package}-${UBLstage}-${label}"/>
Expand Down
4 changes: 2 additions & 2 deletions realta-user-parameters.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<parameters>
<graphic-uri-prefix><ps:input-file-name
<graphic-uri-prefix originators="*"><ps:input-file-name
xmlns:ps="https://www.realtaonline.com/ns/parameter-substitution"
regex="^(.+?).xml$" replace="$1"/>.sts.graphics/</graphic-uri-prefix>
regex="^(.+?).xml$" replace="$1"/>.graphics/</graphic-uri-prefix>
<graphic-uri-suffix>.png</graphic-uri-suffix>
</parameters>