A SQL Interface for the SCA Armorial

As powerful as the Morsulus O-and-A software is, it’s not particularly easy to install and get running on your own computer, and it’s a bit daunting to extend with new functionality.

I had an idea that it would be easier to work with the armorial data if it was loaded into a regular SQL database, and spent my weekend putting together a proof-of-concept implementation.

The results are available as Clerk-0.1.tar.gz, a pair of Perl scripts designed to work with a MySQL database.

The first, make.pl, will fetch the armorial data from the SCA’s web site, create database tables to hold it, import the data, and do a bit of cross-indexing to make searching easier.

$ ./make.pl
No changes made; you are up-to-date.

The second, search.pl, accepts command-line arguments that parallel the various options supported by the Morsulus O-and-A interface, and outputs the matching registration records.

$ ./search.pl --armory "PFESS:pl:argent:~and vert" --armory BEAST-BEAR:1:primary --armory BEAST-BEAR:gules:primary --armory "BEAST-BEAR:passant to dexter:primary" --armory "BEAST-BEAR:spa" --close
Found 2 results

Here is one matching item with an exact match:

Mathghamhain Ua Ruadháin
  This device was registered January of 2017 via the East.
  Per fess argent and vert, a bear passant gules.

Here is one matching item with one difference:

Halldor Rauthbjorn
  This badge was registered May of 2002 via the Middle.
  (Fieldless) A bear passant guardant gules maintaining on its back a castle argent.

Both include usage information you can view by running them with --help.

The search results generally match up to those from the original Morsulus search, although I don’t yet have all of the character-code support in place for broad-vs-narrow name searches, and I haven’t yet implemented date/kingdom search criteria.

I’ve also added a couple of features that aren’t available in the baseline tool.

One that would be easy to add to the Morsulus code is a --min-score parameter, including shortcuts for --exact, which only returns items that match all of the provided search terms, and --close, which includes items that have at most one difference; both of these just set the minimum score based on the maximum possible weight.

A new feature that would be more difficult to add to the Morsulus scripts is the ability to search for any of several headings at once, for example --armory "ROSE|FOIL-6", or even to search for any heading at all, such as looking for any sable tertiary with --armory "*:sable:tertiary".

The code is available under a permissive open-source license so feel free to use or modify it as you would like.

Interfaces to the Armorial Database

I’m working on some possible improvements to the web interface used to search the SCA’s heraldic database, known colloquially as the “O and A,” short for “Ordinary and Armorial.”

(Traditionally, an armorial is a printed listing of armory registrations with their blazons and the names of their holders; mundane armorials typically include all, or all of the notable, registrations within a certain heraldic jurisdiction. An armorial is typically organized alphabetically by the holder’s name; in contrast an ordinary is a specialized index used for looking up armory based on its blazon or appearance, grouping registrations under their primary charges.)

For decades the SCA’s armorial database has been maintained and distributed as a delimited text file, but searching it by hand in this format is inconvenient.

Periodically the database has been converted to a PDF file that could be printed for reference by heraldic consultation tables at events without internet access, but the alphabetical armorial and indexed ordinary both grew to over a thousand pages long, which makes it impractical to print up-to-date versions on a regular basis.

There is an e-book version in ePub format that is generated from the database every month by Jason Fesler; it includes both an alphabetical armorial and an indexed ordinary.

However, in practice, most searches of the database are done using the web interface at oanda.sca.org, which provides searches by name and blazon, as well as a clickable ordinary and a powerful “complex search” interface that allows for filtering registrations with multiple simultaneous criteria, which greatly speeds the process of searching for potential conflicts with new heraldic submissions.

The software that powers that web interface is available on GitHub as part of the Morsulus-Tools package, maintained by Master Herveus d’Ormonde of the East, who has served as Morsulus Herald since 1999. It’s written in Perl and includes numerous CGI scripts the power the various search features.

There are several mirror sites which run copies of the same Morsulus oanda software, although you’ll want to double-check that their copies of the database are up-to-date.

The HeraldStick project by Tanczos Istvan provides instructions for setting up a copy of the Morsulus oanda software, along with mirrors of some useful reference works, as a web server that runs inside a virtual machine that can be packaged on a USB memory stick and attached to a Windows computer. The setup process is not fully automated, so a fair amount of technical ability is required to get it running.

The HeraldsPoint hot spot project by Master William of Meridies is an effort to package the HeraldStick software as a pre-configured package running on a WiFi access point that can be made accessible to multiple heralds working at an event’s consultation table. These devices seem promising but are not yet available for purchase.

A few third-party applications have been created that allow browsing and searching the database.

• Aspilogia is a Windows 8/10 application built by Oddr Þiálfason of An Tir. This includes a complex search tool, along with a fuzzy search for names and blazons.

• There is a Windows desktop application built using dBASE by Hirsch von Henford of the West Kingdom.

• Stentorian.us has a Lotus Notes interface to the database, affiliated with the Meridies College of Heralds.

Armory Conflict-Checking Resources

One of the seemingly-black arts of Society heraldic practice is checking new device and badge designs for conflicts against registered armory.

I’ve been doing this for a couple of years now and still need to ask for help or get other heralds to double-check my work, so I thought it might be useful to post a few links to some of the resources I use to try and remind myself of how the process works.

The Rules

The rules for armory conflict are laid out in SENA section A5.

A succinct summary of those rules is provided in the SENA Submissions Checklist (which also includes a number of other useful guidelines for all types of submissions).

Visual Examples

Reading those rules can be a bit daunting for a newcomer.

A useful guide that includes numerous visible examples is Master Modar’s Basic Conflict Checking supplement to the Calontiri Herald’s Handbook.

Another presentation of the rules with good visual references is provided in Yehuda’s Armory 103 presentation and accompanying hour-long class video.

Using the Complex Search Form

Modern conflict checking is nearly always done using the armorial’s complex search form.

A good reference for using the complex search form is Marie de Blois’s Conflict Checking with the Complex Search Form. There’s an accompanying hour-long class video.

Use of the complex search form is also covered in Yehuda’s Armory 201 presentation and accompanying hour-long class video.