Glossarium -- Updated 19 July 2020
Glossarium is a single macro using local variables to access multiple data files or glossaries formatted as simple text files.
From a popup list, you can 1) view individual entries from a popup menu, 2) perform a full-text search on the glossary, 3) list entries by category and 4) add new entries to a glossary, all using Glossarium.
One action in green at the top of the macro tells Glossarium how to interpret your data files. It has the following format:
Glossary: [The name of one data file] File: [The full path to that data file] Categories: [The name of each category in the file] [blank line]
The name of a data file about photography name might, for example, be:
The full path looks to its data file might be:
Listing categories with a comma after each one also requires indicating the single character code for each category that is used in the glossary file. So the photography data file might have these categories:
G/eneral, C/amera, F/ilm, P/rinting, S/canning, Color T/heory
DATA FILE FORMAT
Because the data file is merely a text file, you can certainly edit it in any text editor. But it's easy to make formatting mistakes when making new entries so we've included a function to Add an Entry in the popup list.
The glossary format itself is straightforward:
[Key Word or Phrase] - [Definition in any number of paragraphs] - [Category key codes] - [blank line]
CATEGORY KEY CODES
To keep things simple, Glossarium uses a unique single letter code for each category. If you indicate a lowercase character for a code it will be treated as an uppercase character. No space is required between codes in this field.
That's all there is to it, really.
We've included two sample glossaries to demonstrate the usefulness of Glossarium:
Regex.txt is a data file documenting regular expressions. It uses HTML tables to format references and groups them together using "Table: " as a precede.
Wines.txt is a data file documenting wine making and drinking that shows how to handle accented characters.
Printing.txt is a data file documenting commercial printing and bindery terms.
These data files were compiled from multiple online sources in a matter of minutes.
19 July 2020 -- Version 1.2a
- Added clipboard save of current definition, deleted when window is closed
14 July 2020 -- Version 1.1a
Refined CSS with larger font sizes, leading, buttons
Add an Entry cycles until Exited
GlossariumSearchKey replaces LocalKey to facilitate utf8 keys (Local variables with diacriticals can't be passed to a shell script as an environment variable). The osascript requires newline be stripped.
LocalGlossary, which contained the glossary entries, has been replaced by a Perl variable to avoid bumping into Keyboard Maestro's environment variable limit.
Glossarium.12a.zip (33.0 KB) -- Glossarium 1.1a, Install Glossaries macro, three glossaries
Glossarium.pdf.zip (483.2 KB) -- PDF Documentation