Specify Import Attachment Tool

Specify has a tool that you can use to mass import images. Please don't use this unless you've added metadata to the images first.

By clicking on the Attachments icon in the top tool bar, you can access the tab that lets you do mass uploads as well as other actions. We're going to focus on the Import Attachment Mapping File and the Import Attachments options.

First, you'll need to create a 'map' to tell Specify how to match up a file with a record. The option we normally use is the Collection Object/Catalog number option.

You'll need a dir.txt file showing all the images in the file you are working with. (see sidebar link for instructions)

 

The challenge in this next part is to create catalog numbers from these file names. Sounds easy, right? Except, some file names will have numbers that may or may not be a suffix, and sometimes taxa, lighting profile notes etc., are embedded in file names.

 


 

 Prepare the catalog numbers and file names
  • Upload the dir.txt to Refine. Make sure in the Options area you have the columns separated by commas, not tabs or underscores. We want a single column. Another thing to watch in the options section is to check the 'Ignore First' box, and un-select the 'Parse next 1" box. This way, column headers will be generic.

 

 

  • Hit 'Create Project' in the upper right of this page.




  • Create a new columns, one named "Catalog Number". Make sure the expression is a set double quotes.

 

 

  • Now, in the Column 1, go to Edit Column --> Split into several columns. Pay close attention to the screenshot- the 'After Splitting' options are critical.

 

 

 

 

 



  • You will now have a LOT more columns, named Column 1 1- Column 1 (final number). These are all the letters, numbers and words left over after removing the underscore character and putting all other data in separate columns.
  • Move the data from Column 1 1 (Which should only have Catalog Suffixes) into the Catalog Number Column using the following action:
    • in the Catalog number column, on the down arrow, choose Edit Cells–> Transform
    • use the expression:

                                                   cells["Column 1 1"].value

    • hit ok
  • Now the hard part. Facet columns 1 3 and beyond, and try and ferret out any thing that is NOT a suffix. You can usually delete the last column as soon as you verify all it has is the 'a3.jpg' type of data.The goal is to recombine the columns to a formatted Specify catalog number. This means determining the difference between image 2 and something from a catalog number 12345.2. Faceting helps get rid of the low hanging fruit pretty quickly. You'll have to problem-solve the rest.
    • some ideas: try using a text filter set to use regular expressions, and use the expression [ a-z]. Blank out any file extensions, image counts (ie, a3, b2 and so on).
    • Verify in the database any possible suffixes. Letter designations (UT 30041 a, b, and c) are not always real suffixes but in some cases they are. Verify before blanking out the cell!

  • Here are some refine recipes to help format the numbers (use in the Edit Cells --> Transform window):
    • "." +value+ "000"[0,3-value.length()]                         (for turning suffix into right format)

    • value+ "000"[0,3-value.length()]                                (for getting the Prefixes right, UT into UT0)
    • "00000000"[0,8-value.length()] + value                     (for getting catalog numbers into 8 digits)

  • Use the: value+ cells["Column 1 2"].value+ cells["Column 1 3"].value from the Catalog Number column to get the whole catalog number assembled.
  • Delete the columns that have fragments of the Catalog number in them. You should have 2 columns now. They MUST be in Collection Object/ Catalog Number order!
  • Export the columns as either a csv or tsv.


  • Open the file and delete the column headers. Save the file in the same folder as the images you plan to upload.

 

 


 

 Using the Mapping in the Attachment Tab

There are 2 steps to this process. First, open the Attachment tab. In the action bar on the left, you'll see an option for importing an attachment mapping file. Select this, then choose Collection Object/ Catalog Number option.