gigafide / Islandora-xml-converter

A Python exe that will convert MODS files to Inslandora compatible XML files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenRefine XML Convert

A tool for converting OpenRefine XML to individual XML files for use in programs like Islandora

GUI Interface

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.

Usage Instructions

  1. Download the Executable (located in the dist folder of this repository)
  2. Once downloaded, double-click on convert_islandora.exe to launch it.

Image of Executable Icon

  1. Click the Open File button. Use the file browser choose your OpenRefine XML file.

Image of opening file

  1. Once selected, click on the Convert button. Use the file browser to choose a folder in which to place the outputted files.

Image of converting file

  1. 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

Image of final output

Editing/Modifying Instructions

Pre-requisits - Setting up the environment

  1. Download the latest version of Python 3

  2. Double-click to launch the installer. Make sure Add Python 3.10 to PATH is checked before clicking Install Now image

  3. After installation, open up a command prompt and install the lxml library by typing

pip install lxml
  1. Next, either git clone or download this repository to your desktop

  2. 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
  1. Assuming there are no errors in running the python script, you can procede to make changes as necessary.

Creating an executable from the python script

  1. Converting the script to an executable is made possible by PyInstaller
  2. To install Pyinstaller, open up a command prompt and run this command
pip install pyinstaller
  1. Within the command prompt window, navigate to the directory your python script is located in.
  2. Run this command to create a specifications file for the installer to use
pyi-makespec --onefile NAME_OF_SCRIPT.py
  1. This will create a .spec file with using the name of your script in the same folder as your script.
  2. Now you can run the command below (pointing to the newly created spec file) to create the executable.
pyinstaller NAME_OF_SCRIPT.spec

Top contributors:

  1. @gigafide

About

A Python exe that will convert MODS files to Inslandora compatible XML files

License:GNU General Public License v3.0


Languages

Language:Python 100.0%