What site do you search for most often? If the search form is simple enough, you might be able to use an OpenSearch browser plugin!
The Problem
To be an effective cataloger, you don’t need to have all of the rules and tags and tables memorized, but you need to be able to access them quickly. Over the years I have gathered a small herd of bookmarks that live on my Firefox bookmark bar, including:
- Cataloger’s Desktop
- RDA Toolkit
- OCLC Bibliographic Formats and Standards
- OCLC’s guidelines on when to input a new record
- Library of Congress Catalog
- Library of Congress Authorities
- Cutter table (local in our cataloging wiki)
- Various LC Linked Data queries, such as Countries and Geographic areas and Languages
I visit most of these sites several times a day so it’s very handy to have them close by, but it’s getting crowded up there on the bookmark bar. I could maintain a separate page of links, but don’t want to increase how much I’m clicking around. Some sites I removed from my bookmarks bar, and just counted on being able to remember enough of the URL or title that Firefox would complete it for me (typing “new record” gets me to the OCLC page on that topic) but for others I found search engine plugins — by using one of those, I didn’t even have to load the site’s search page! I couldn’t find them for everything, though…
OpenSearch plugins
OpenSearch is a collection of technologies for working with search engines and their responses. One of these is the OpenSearch Description file format, which allows you to use XML to describe a search engine. Files in this format are recognized by most major web browsers, where they in can some way be installed and subsequently used for searching even more quickly than visiting that search page with a bookmark.
OpenSearch plugins are relatively straightforward to write. They typically consist of a small XML file in which you describe the search engine and specify its behavior, and an HTML page to facilitate installation or auto-discovery, depending on your preference and browser’s capabilities.
Firefox
OpenSearch plugins are most transparent in Firefox. To install one of my plugins in Firefox, visit its web page and press the Install Search Engine button, or pull down the search engine list and select it from where it appears there:
After installing a plugin, it will appear in the list of search engines available from the search box on the upper right. Just click the down arrow, select your search engine, and enter your search!
Chrome
OpenSearch plugins can also be used in Chrome. They are convenient to use, but slightly hidden, as Chrome’s location bar and search bar are more thoroughly combined.
To install one of my plugins, click the Install Search Engine button on its web page, and you will be prompted to edit the information about the search engine. The default Keyword will be the domain of the search engine — you may want to change this, particularly if you have more than one engine from a given domain! Make the keyword something short and memorable, as you will need to use it to access the plugin. For the MARC Countries plugin, I use the keyword “country”:
After the plugin is installed, click the location bar as though you are typing in a URL, and type your keyword followed by a tab. The prompt will change, and anything you type now in the location bar will be sent to the search engine:
Chrome seems to have some sneaky auto-discovery support (silent installation of search engine plugins when it discovers them) but it only works when the OpenSearch description file is available from the root of the domain. To see this behavior in action, visit YouTube and then type “youtube <tab>” in the location bar.
Internet Explorer 9
To install one of my plugins in IE9, click the Install Search Engine button on its web page. Once the plugin is installed, you can use it from the location bar. When you type your search terms, the favicons of all of the search engines you have installed will appear below the location bar. Select the one you want to use, and press enter.
IE7 and IE8 apparently support auto-discovery, but I have not tested this.
Safari
OpenSearch plugins are not supported natively in Safari, but can be used through the extension OpenSearch for Safari. If you have the extension installed, whenever you visit a page with a search engine available for auto-discovery, a small red number will appear on the magnifying glass search button to alert you to this. If you click the button, you’ll have the option to install the search engine. After installation, the search engine will be available as an option from that same button.
My OpenSearch Plugins
If you’d like to install some of my plugins, click the links below:
- InfoKat — Search InfoKat (Voyager Catalog) by bib number using persistent URL syntax
- LC-LDS — Search Library of Congress Linked Data Services services for specific vocabularies, including MARC Countries, MARC Languages and MARC Geographic Areas.
- BibFormats — Search OCLC Bibliographic Formats and Standards by tag number
- UKnowledge — Search UKnowledge (bepress) institutional repository
Writing your own
Writing your own OpenSearch plugins can be easy! You can use my files as a template; just snag the js directory and a plugin directory, and modify the fields in the plugin files to make them work for your search engine.
For example, if you wanted to search only for math ETDs in the institutional repository UKnowledge, start by executing that search with a string that is easy for you to recognize, like your name:
You may get no search results — that’s fine. What you are mainly after is: where did your name appear in the URL that performed the search? Copy the URL out of the search bar to see:
http://uknowledge.uky.edu/do/search/?q=ZEMKAT&start=0&context=1911345
Replace your name with {searchTerms} (including the curly brackets) and replace any ampersands (&) with the character entity (&) so that you have a well-formed XML file. Put that string into the value of the template attribute of the Url tag:
<Url type=”text/html” template=”http://uknowledge.uky.edu/do/search/?q={searchTerms}&start=0&context=1911345″ />
If you want your search engine to look cute when it is installed, give it a favicon as well!
Copy the files to a server where they can be accessed online, and modify index.html to reflect the address of search.xml. Don’t have a server? You can store your plugin on GitHub and reference it via the “Raw” URL. As a bonus, you can share it with everyone else this way!
Beyond string substitution
If you look at the code, you might notice that the BibFormats plugin is a bit different from the others, in part because its URL is not as simple. Here are URLs for some of the documentation pages:
- 245: https://www.oclc.org/bibformats/en/2xx/245.html
- 650: https://www.oclc.org/bibformats/en/6xx/650.html
Note that the search term (tag number) appears at the end of the URL, but the first digit also shows up right before it followed by xx. I couldn’t figure out how to tease the first digit out of {searchTerms} for inclusion in the URL, so I made a small PHP file (lookup.php) that accepted the tag, created the URL, and redirected to the correct document page. After I’d done this, I recognized an opportunity! Some new tags (such as 344, 345, 346) do not yet appear in the standard place in the OCLC documentation, but they are documented in OCLC Technical Bulletin 261. Rather than remembering this arbitrary fact, I let the program know about this, so it would take you somewhere useful if you asked about those fields. Similarly, the new field 264 is not yet in the standard OCLC documentation, but there are PCC guidelines for its use, so I redirect requests for 264 to that document. The possibilities are endless!
Questions
Is your favorite browser not included here? (Does it support OpenSearch?)
What are your go-to bookmarks for cataloging, or other library work? Would any of them make good OpenSearch plugins?