A docker image that allows you to convert a InterSystems Studio export (.xml) into UDL format used by the InterSystems ObjectScript extension for VS Code and the atelier API (without using the IRIS Studio).
Make sure you have Git and Docker Desktop installed. Windows users should use the PowerShell for executing the following docker commands (e.g. ${pwd} only works in the PowerShell).
The tool was created based on our own project requirements and will be developed further as needed. Among other things, it creates a folder hierarchy based on the class name. So the class "App.TCPTestServiceRoutingRule" mentioned in the export is created as follows "src/App/TCPTestServiceRoutingRule.cls".
This results in a problem with a folder name "CON" because no folder with this name can be created on Windows machines. If this occurs, the tool ensures that the folder is renamed to "C0N". Please consider this behavior if your Studio export contains the path "CON" at any point.
Pull the image.
docker pull ghcr.io/hbtgmbh/xml-to-udl/converter:latest
Add a Studio export file (.xml) in any arbitary directory and add a folder named "src".
Replace <YOUR_STUDIO_EXPORT> with the filename of your export file and execute the following command in this directory.
docker run -v "${pwd}/<YOUR_STUDIO_EXPORT>.xml:/irisrun/export.xml" -v "${pwd}/src:/irisrun/udl-export" --rm ghcr.io/hbtgmbh/xml-to-udl/converter
After the conversion is finished you should now see the generated sources under "src".
You can find a sample studio export in this repository.
This export contains samples of the most common file types (for example ".cls", ".lut", ".hl7", ".inc", ".gbl").
It's a good practice to use this tool in combination with the ObjectScript Docker template. This template already provides a "src" directory. So you just need to clone/forke this template for your project, add the studio export to the root directory and execute:
docker run --rm -v "${pwd}/studio-export.xml:/irisrun/export.xml" -v "${pwd}/src:/irisrun/udl-export" xml-to-udl:latest
After generating the source files it's quite easy to use version control with Git and keep track of your changes during the project.
A short video that demonstrates this example is published in the xml-to-udl GitHub repository.