This script is based on the work of @calhist and their XML Splitter python script. It takes OpenRefine XML ouput and breaks it down into individual XML files for use in programs like Islandora. This specific version of the script updates to Python 3 and adds a Tkinter GUI and file browser to streamline the converstion process.
- Download the Executable (located in the dist folder of this repository)
- Once downloaded, double-click on convert_islandora.exe to launch it.
- Click the Open File button. Use the file browser choose your OpenRefine XML file.
- Once selected, click on the Convert button. Use the file browser to choose a folder in which to place the outputted files.
- After the output folder is selected, the program will automatically create individual XML files from the OpenRefine data. Status can be viewed in the executable terminal
-
Download the latest version of Python 3
-
Double-click to launch the installer. Make sure Add Python 3.10 to PATH is checked before clicking Install Now
-
After installation, open up a command prompt and install the lxml library by typing
pip install lxml
-
Next, either git clone or download this repository to your desktop
-
Test that the script runs wihtout errors by using the command prompt window to navigate to the directory where the python script is located and running
python convert_islandora.py
- Assuming there are no errors in running the python script, you can procede to make changes as necessary.
- Converting the script to an executable is made possible by PyInstaller
- To install Pyinstaller, open up a command prompt and run this command
pip install pyinstaller
- Within the command prompt window, navigate to the directory your python script is located in.
- Run this command to create a specifications file for the installer to use
pyi-makespec --onefile NAME_OF_SCRIPT.py
- This will create a .spec file with using the name of your script in the same folder as your script.
- Now you can run the command below (pointing to the newly created spec file) to create the executable.
pyinstaller NAME_OF_SCRIPT.spec