Brevis — Automating Text Expansions

This simple answer (and, no, I don't mind you asking), is that I wanted to use tabs themselves in the replacements. So I wanted a standard data format that could accommodate that. Any other application looking at the data would understand it.

Yes, I could have reinvented the wheel and escaped the tab (eg: \\t) -- and JSON does require escaping its own delimiters -- but no other application would have known what Brevis was doing.

The 'bulky' JSON format (you're right, it isn't as efficient as it might be) is greatly mitigated by using single character field names and compacting the format (not prettifying it). What you saw when you used the Edit utility is quite different from what you see when you look at the global variable Brevis. Indeed, compared to separate Keyboard Maestro macros, Brevis represents a substantial space savings in your Keyboard Maestro plist. Somewhere in the documentation, I give an example of that.

For Glossarium, I used new lines to delimit its three known fields rather than JSON because I wanted the data file to be human readable as the primary text entry vehicle. That's not a requirement in this case. Just the opposite.

JSON is, in fact, well supported. You can import JSON-formatted data into Excel and Numbers and other applications without knowing anything about the format.

I don't see the advantage of auto complete in a text expansion context. You don't need (or want) auto complete in that context, it seems to me.

I don't mind discussing the design decisions I made. They certainly evolved through several prior unreleased versions of this macro set. Before anything gets here, I've beaten it to death. :grin:

Keyboard Maestro does have an option to convert case depending on the trigger but it is not available when you use the regex trigger, as Brevis does.

So Brevis itself would have to distinguish between a trigger that happens to use uppercase and one that intentionally uses it to force case conversion. If you use =USA to expand to United States of America you might get UNITED STATES OF AMERICA unless Brevis understood from =USA alone which you wanted.

The solution to this is using separate expansions for each case. So =Usa might expand to title caps and =USA would work for Space Shuttle decals. There's no duplication involved in the JSON variable.

Hope that answers your (very good) questions. Thanks for asking.