The CM Tooltips plugin is a great piece of software, but in its free version, does not include a facility to bulk upload glossary items, so I wrote one.
This goes on a page, and as it stands, there is no role checking, so you might want to make the page private!
The shortcode is simple
[cj_glossary_bulk_load]
This will put a file upload form on the page. Very basic, using the standard HTML file upload facility.
The data is keyed on the term in the ‘term’ column(CSV) or <dt> field (HTML). That means that if you upload a term with a term name that’s already in the glossary, the definition will be updated to the value in your upload.
If the term does not exist, it will be added. If you want to delete an item, use the CM Tooltips admin page to do that.
File formats
The two recognised formats look like as below. You do not have to specify the format. The app works it out from the data (but it might make a mistake if you send something that is in neither format):
HTML
In the html format, the terms and definitions are sought from a definitions list e.g.
<dl> <dt>Sky</dt:<dd>The blue bit above your head</dd> <dt>Earth</dt><ddThe muddy bit under your feet</dd> </dl>
CSV
In the CSV format (which you can save from a spreadsheet for example) there should be a row naming
the columns, followed by a row for each definition. The “term” and “definition” columns are the only important ones. any other columns will be ignored. Missing column values are treated as containing an empty stringĀ e.g.
"term","definition","rubbish" "Sky","The blue bit above your head","Something else" "Earth","The muddy bit under your feet"
Download