What is this, and why did I build it?
The Glossary Term Processor takes a glossary you keep in a CSV file and adds hover definitions to your Canvas pages, so a learner can point at an unfamiliar term and see what it means without leaving the sentence.
It came out of the Atomic Design System for Canvas I built at BHSSC. One of the components in that system is a hover definition: you wrap a word in an <abbr> tag with the definition in its title, and the definition shows up when someone hovers over it. The purpose of this is to support learners who are new to the vocabulary of a field without cluttering the page with definitions for the people who already know them. That works fine for a term or two. It does not work well for a full glossary across a full course, in that someone has to hand-code every tag on every page and keep track of which terms are already done.
There are two versions on this page: 1) the original HTML tool, which runs in your browser on whatever HTML you give it, and 2) a Google Apps Script web tool that connects to Canvas directly and can process whole courses.
How did it go from one version to two?
The original tool is a single HTML file. You give it a CSV of terms and definitions along with some HTML, and it hands the HTML back with each term wrapped in an <abbr> tag. All of the processing happens locally in the browser, so nothing is sent anywhere, the page’s existing formatting is left alone, and there is nothing to install or sign up for. If you can format a CSV, you can use it.

That was enough for one person working on one page at a time. Once it was being used across whole courses, four problems came up: 1) processing pages one at a time took a long time on a course of any real size, 2) applying terms by hand across several courses led to inconsistent results, 3) there was no way to undo or adjust a page once it had been processed, and 4) the tool sat completely outside of Canvas, so every page meant copying HTML out and pasting it back in.
The second version answers those by working inside Canvas through its API. It is built from four parts: the main application, a Canvas API wrapper, the glossary processor, and the interface that walks you through it.
Before it changes anything, it checks that it can reach your Canvas instance and that you have permission to edit the course, and it validates your glossary file (it accepts more than one CSV format). It can run across an entire course or only the pages you pick. It works through Canvas’s pagination on large courses and handles page URLs with special characters in them. On each page it skips terms that already sit inside existing markup, skips content it has already processed, and detects malformed HTML, including broken glossary markup, so it can clean that up instead of making it worse. While it runs you get progress and statistics, and when something fails the error report says what went wrong and what to try next. There is also a test tool for troubleshooting a single page and an analysis tool that looks for problem page structures before you process anything.
The part that makes it safe to try on a real course is recovery. Canvas keeps a revision history for every page, and the tool uses it, so you can restore pages to their earlier versions one at a time or in a batch.
Get started
For Canvas courses, use the web tool. The interface walks you through connecting to Canvas and checking your glossary before anything gets processed.
If you want your own copy of the code, download the zip of Apps Script files here: https://drive.google.com/file/d/1ggZRmUnt06SXlMev3MD994sF2B113jrg/view?usp=sharing
For individual use without a Canvas connection, the original HTML tool is still available as a standalone file that runs in your browser: https://drive.google.com/file/d/1N9ynrm7lgyjao5z-6ddYtPhn7Zb9v_Ng/view?usp=sharing. A copy of the original HTML tool is also saved on the Internet Archive: https://archive.org/details/html-glossary-term-processor
Make it yours
All of the source code is in the zip, split into the same four parts described above. The code is modular, so it can be adapted for a different learning management system or a different context without starting over.
Connect and continue
If something in here does not work, or a page comes out of the processor looking different than you expected, I would like to know. The same goes for glossary situations it does not handle yet. You can reach me at licht.education@gmail.com, and there are more tools and resources at bradylicht.com.
