2021:Import or Export Grooper Objects

From Grooper Wiki

This article is about an older version of Grooper.

Information may be out of date and UI elements may have changed.

202520222021

How can you share Grooper objects, like Content Models, Batch Processes, Batches and more, with other Grooper users?

About

Grooper allows you to export Grooper objects from a Grooper Repository as a zip archive file. You can then bring in those objects into a Grooper Repository (such as one you are not connected to) by importing the zip file.

The process is straightforward, but there are a few things to watch out for.

How To

Export Grooper Objects to a Zip File

Exporting a Single Object

For this example, we have an IP Profile batch named "Sample IP Profile - Layout Data" that we want to export from this Grooper repository and import it into another.

  1. To export a single object, all you need to do is right click the object in the Node Tree you want to export.
    • Here, we have right clicked the IP Profile named "Sample IP Profile - Layout Data"
  2. Select "Share..." and "Export to Zip Archive..."
  3. The following window will pop up to configure your export.
  4. Use the Filename property to name the zip file and choose the folder location where you want to save it.
    • The filename will default to the name of the object you are exporting.

The following window will appear.

  1. Choose the folder location you want to save your zip file.
  2. Name the file whatever you would like.
    • The filename will default to the name of the object you are exporting.
    • It's generally a good idea to at least include the major version of Grooper you are using in the filename (i.e. 2.80 or 2.90). You cannot import an exported Grooper zip of differing major versions.
  3. Press the "Save" button.

You will then return to the previous window.

  1. Press the "Execute" button to export the file to the zip archive.
  2. The following window will appear, indicating the export was successful. Press "Ok".

You can find the zip file wherever you chose to save it.

Exporting Multiple Objects

You can also easily export multiple objects to a single zip archive.

For example, what if we wanted to export the "Sample IP Profile - Layout Data" IP Profile as well as this Batch named "Sample Batch"?

The starting point is much like an export of a single object.

  1. Right click one of the objects you want to export.
    • Here, we are right clicking the IP Profile.
  2. Select "Share" and "Export to Zip Archive..."
  3. Select the Items to Export property.
  4. Press the ellipsis button at the end

This will bring up a window allowing you to select multiple objects in your Node Tree.

  1. Expand out the Node Tree to find the location of the object you want to export.
    • Here, we have a Test Batch located in the following location
    • Batch Processing > Batches > Test
  2. Check the box next to the object you want to export.
    • Here, we checked the box next to the Batch named "Sample Batch".
    • You may select as many objects as you wish to export. Simply repeat the process of finding them in the Node Tree and checking the box next to the object.
  3. Press the "Ok" button when finished.

  1. Use the Filename property to name the zip file and choose the location where you want to save it.
  2. Press the "Execute" button to export the objects to the zip file in the location you chose.

Exporting Objects with References

Grooper makes use of references in a variety of different ways. Data Fields often reference Data Type extractors to populate fields in a Data Model. A Recognize step in a Batch Process will reference an OCR Profile. References are a fantastic way to get reusability out of the objects you create and configure.

When you export an object referencing an external object (one that is in a different location in the Node Tree) by default, Grooper will also include that object in zip file export. However, depending on your situation, you may want to export the referenced object or you may not.

  1. For this example, we will export the Content Model named "Sample Content Model - Cow App".

Note, the "Docket Number" Data Field uses a Read Zone extractor in order to populate the field. The Read Zone extractor allows you to (among other things) anchor a rectangular zone from a text label on the document. Any text falling within that zone will be extracted as the Data Field's result. The Read Zone extractor also allows you to optionally re-process the text's OCR result with the OCR Profile property.

  1. Here, the OCR Profile property references the OCR Profile named "Tesseract Cell OCR" in the OCR Profiles folder of the Global Resources folder.

  1. We're starting this export by right clicking the "Sample Content Model - Cow App" Content Model.
    • One of its child objects (the "Docket Number" Data Field) contains a reference to an external object (the "Tesseract Cell OCR" OCR Profile)
  2. Select "Share" and "Export to Zip Archive..."
  3. Note the Items to Export property lists Sample Content Model - Cow App + 1 reference. This indicates that external OCR Profile is already included in this export!
  4. You can verify or change this by pressing the ellipsis button at the end of the property.

Notice in the "References to Include" window the referenced OCR Profile named "Teseract Cell OCR" is included in this list of items. This window will list all referenced objects of the object (or objects) you have selected for export.

By default the box next to these references is checked, indicating it will be included in the export. However, if you wish to exclude a referenced object from the export, simply uncheck the box next to the listed object.

Importing Grooper Objects from a Zip File

If you wish to follow along with this tutorial, you may import the zip archive file linked below into your Grooper Repository.

Importing All Objects from a Zip Zile

This tutorial will start us off with the most basic import. This import will bring all Grooper objects into your Grooper Repository, even if copies of those objects exist in your repository. We will look at how to deal with selectively importing objects and resolving duplicate object conflicts in the next tab of this tutorial.

  1. To import a Grooper zip, right click the root node of your Grooper Repository.
  2. Select "Import" and "Compressed Archive..."
  3. A file browser window will appear. Locate the location of the Grooper zip file you wish to import.
  4. Select the file, here named "Sample Grooper Export (2.90)".
  5. Press the "Open" button.

  1. Press the "Execute" button to import the objects into your Grooper Repository.
    • A word of caution, without configuring the import this will create a new object if it does not exist in your Grooper Repository. However, if it does exist (and the object has the same GUID), it will overwrite that object. We will go over selectively importing objects and resolving duplicates in the next tab.
  2. Upon successful import the following message box will appear. Press the "Ok" button to get back to Grooper.

All objects in that zip file will be copied to your Grooper Repository. The objects imported for our example are highlighted.

Their property information will be stored in this repository's database, and their files will be stored in the associated filestore.

Selectively Importing Objects and Resolving Duplicate Objects

As mentioned before, by default importing a Grooper zip will overwrite an object if it already exists in the Node Tree. If the two objects share the same GUID (globally unique identifier), the object's property configurations will be replaced with those of the object in the zip file.

FYI

Note, this means the two objects could have different names but the same GUID. Grooper really cares about GUID matching up, not the names. If the GUID matches, it will overwrite the object and rename it to whatever it's name is in the zip file.

The reverse is true as well. They could share the same name but different GUIDs. If the names are the same, but the GUIDs are different, the object in the zip will be imported with a unique name and the object in the Node Tree will remain unchanged. If the imported object is imported in the same node tree level (i.e. there is an IP Profile in the IP Profiles folder named "Layout Data" and the imported object is also an IP Profile with the same name going in the same folder) a number will be tacked on to the imported object's name to force a unique name (i.e. "Layout Data (1)").

This may be what you want to do, or this may not. Grooper gives you the capability to choose how you want to resolve these conflicts through the Import Options property.

  1. Upon importing a zip file, select the Import Options property.
  2. Press the ellipsis button at the end of the property.

The Condition column will let you know whether or not the object exists in the Grooper Repository.

It will list No Issue if the item in the list does not exist in the repository. It will list This item already exists. if it does.

  1. In this case, the IP Profile in the Grooper zip already exists in the Grooper Repository.
  2. How we choose to resolve this conflict is controlled by the options in the Resolution column.

Use the dropdown menu to choose how you want to resolve the duplicate file conflict. This can be one of three choices.

  1. Update the item - This will overwrite the existing object in the Node Tree.
  2. Create a copy of the item - This will keep the existing object intact and create copy of the object in the zip file (with a new GUID).
  3. Skip the item - This will bypass importing the object entirely.
FYI Even if the object does not exist in your Grooper Repository, indicated by a No Issue Condition, you can still choose to exclude the item from import by changing the the Resolution from The item will be imported. to Skip the item.

  1. Here, we chose Create a copy of the item.
  2. Press the "Ok" button when finished configuring your Import Options.

Rather than overwriting the object, a copy named "Sample IP Profile - Layout Data (1)" is created!