Terry's ORA Tips

Template Example – Filename

This page created 29 May 2020

Version note: Applies to ORA 1.00

This article describes one of my example Templates for Online Repository Assistant (ORA). The other example Templates can be found in the index of Example Templates. Other articles in my ORA Section cover various topics about using the software. The "How it Works" section below includes links to articles describing the ORA features used in this Template.

Description:

The Template described here creates a filename for downloaded images, using formats specific to a Collection. It produces text that can be copied and pasted into the File Save dialog that opens as you save a copy of the image.

Example Output:

D:\Genealogy\Sources\Census Images\1870\1870 TN Shelby - Gilmore, Carrie

Type:

Text – intended to be copied and pasted into File Save dialog

Use:

Before downloading an image, copy the filename produced by the Template to the clipboard by clicking the icon on the ORA Control Panel. Then save the image as usual, and when the File Save dialog opens, paste the filename into the filename field.

Limitations:
How it Works:

The first part of the filename produced is the path (route to desired folder) to where the file is to be stored. This is optional because you can select the desired folder manually, but if images from a given collection are always stored in the same folder it eliminates the need to do that.

A path statement includes the " \ " character, which is used in ORA as an escape character to enable one to enter other characters in literal text that would otherwise be interpreted as control characters by ORA. In order to enter the " \ " itself requires it be "escaped," that is, two are required: " \\ ". In the illustration below the escaped backslash characters are colored in pink.

D:\\Genealogy\\Sources\\Census Images\\1870\\

File Save dialogIn my system the path to the folder is "D:\Genealogy\Sources\Census Images\1870\" but yours is no doubt different so you would need to edit this part of the Template to suit your system. If you are not sure of how to write the path to your desired folder you can find the required string with this procedure:

Note that when you specify the path with the filename as described above there is no need to navigate to the desired folder before saving the file.

If this seems like too much trouble, just remove the path from the Template and let it write only the actual filename.

The rest of the Template creates the filename itself. I use this format for filenames of census images:

1870 TN Shelby - Gilmore, Carrie

The Template uses the :split Transformation to extract the name of the state and county, and also to separate the surname and given names of the person. The function of each of the segments of the Template is explained below:

  1. 1870
    Literal text to state the year. You could obtain the year from a field in the record, but the names of those fields differ for different census years, so it seems easier to just enter it as text rather than find the correct Variable name for each year.
  2. [Residence:split:,:-1:abbr:us_states]
    Extracts the last element from the place field, then uses the :abbr Transformation (shown in green here) to change the state name to the two-letter postal code. The Variable name [Residence] will probably have to be changed for different Collections, both here and in the following term. The "-1" parameter will need to be increased to "-2" if the country name is included in the place field.
  3. [Residence:split:,:-2]
    Extracts the name of the county from the place field by finding the next-to-last item in the field. The "-2" parameter will need to be increased to "-3" if the country name is included in the place field.
  4. [Name:split: :-1]
    Extracts the surname from the name field by finding the last element in the name field. The Variable name [Name] may have to be changed for different Collections, both here and in the following terms.
  5. <[Name:split: :-3]>
    Extracts the first name from the name field if there is a middle name by finding the third-from-last element in the name field. It is in Conditional brackets to avoid an extra space where there is only one given name present.
  6. [Name:split: :-2]
    Extracts the middle name, or the first name if there is no middle name, from the name field by finding the second-from-last element in the name field.

The Template will, of course, not always be successful in extracting the person's name as desired. Presence of suffixes or alternate names in the name field may produce unexpected results.

Template:

The following is the complete Template. It can be copied from the area below and pasted into either a Text Template or Auto Type Template in the OraSettings window.

D:\\Genealogy\\Sources\\Census Images\\1870\\1870 [Residence:split:,:-1:abbr:us_states] [Residence:split:,:-2] - [Name:split: :-1], <[Name:split: :-3]> [Name:split: :-2]

 

ReigelRidge Home Terry's Tips Home Contact Terry

 

The Second Edition of my sell-out book, A Primer for The Master Genealogist, is still available.

Details are can be seen here.

 

Copyright 2000- by Terry Reigel