Literary Toolbox III and Text Toolbox I

AFTER MOVING TO CATALINA RECENTLY, I reluctantly bid farewell to the Spell Catcher and local WordNet access options of Literary Toolbox II. So I reconfigured the palette to use the macOS spell checking options while retaining remote WordNet access. Otherwise Literary Toolbox III remains the same as its predecessor. But the change should make it a nicer fit with current macOS releases.

ss-189

In losing Spell Catcher, I also lost its Modify command that could perform a number of useful text transformations. Fortunately it was possible to recreate them in Perl and, at the same time, modernize them a bit. And even extend them. That became Text Tools I, which includes an option to call Literary Toolbox III.

ss-223

Both palettes are included in this post.

Text Tools I is included in two versions, one compatible with Keyboard Maestro 9 that resembles Literary Toolbox III and the other that operates as a menu bar pulldown menu with Keyboard Maestro 10. Otherwise they are identical.

The options in Text Tools I are fully documented in the accompanying PDF but include stripping HTML tags and adding them to plain text, quoting text for email replies in CSS or with a quote character, cleaning up text, applying basic AP Style to text, smartening or straightening quotes and other typographic punctuation, various case transformations, paragraph formation as either tab indented or block style, redacting text, sorting lines and translating text.

Rather ambitious, admittedly. But I make no pretense that the conversions are perfect. They're all I need, however. You may find, for example, that some obscure HTML constructions are not stripped or not all of Markdown is converted to HTML. And, of course, you are free to expand the code to suit.

13 March 2022: I've added two new modules and revised three in today's update. Just import and enable them, deleting the old versions, to add them to whichever Text Toolbox version you're using.

LiteraryToolbox III

LiteraryToolbox III.pdf.zip (656.7 KB)

Literary Toolbox III Macros.kmmacros (203.5 KB)

Text Toolbox I

Text Toolbox.pdf.zip (437.8 KB)

Text Toolbox I v9 Macros.kmmacros (152.2 KB)

Text Toolbox I Macros.kmmacros (138.6 KB)

March Updates Read Me

13 March 2022

Rather than distribute an updated Text Toolbox, I've decided to use a module approach, releasing updated modules to replace older ones and new ones to add to the collection.

This update includes five modules, two new ones and three revisions.

NEW

The two new modules include:

  • Undo: Sitting at the top of the palette this one simply executes a Command-Z to undo the last paste. I reflexively hit Command-Z but for newer Mac users, this might be handy. Utterly optional though.

  • Switch Quotes: If you are quoting some text that itself uses quotes, it can be laborious to switch the quotes from, say, double to single quotes. This module automatically switches from double to single or single to double for either Straight Quotes or Smart Quotes, while protecting apostrophes.

REVISED

  • Form Paragraphs: Now handles all three common line endings, including macOS and OS X (newlines), old Macintoch System (carriage returns) and Windows (LFCR). It also adds a Single Lines option for unindented paragraphs.

  • Comet Text Cleaner: Inherits the new line ending handling for macOS and OS X (newlines), old Macintoch System (carriage returns) and Windows (LFCR).

  • Smarten Quotes: Expanded apostrophe support.

MarchUpdates.zip (8.2 KB)

May Updates Read Me

Literary Toolbox

This update includes three revised Literary Toolbox modules.

REVISED

  • Dictionary: Replaced global variable (SC_Word) with a simple copy and paste of selected text. You can delete the global in Keyboard Maestro editor's Preferences where Variables are listed.

  • Thesaurus: Replaced global variable (SC_Word) with a simple copy and paste of selected text. You can delete the global in Keyboard Maestro editor's Preferences where Variables are listed.

  • WordNet: Provides three approaches to Princteon's WordNet database. 'V' by itself activates wnb3.app (a free 64-bit app by Sergey Sikorskiy at WordNet 3.0 browser | Sergey Sikorskiy) to look up the selection in a local database. 'Opt-V' retrieves the data from Princeton directly and, like wnb3.app, lets you continue the search in the same window. 'Ctl-V' uses the same dark interface as the rest of Literary Tools but subseqeuent calls will resort to the Princeton interface.

DISCUSSION

The built-in Dictionary provides a wealth of information often sufficient for my own needs but WordNet is an intriguing alternative. The free Thesaurus option from Nisus is local but both Dictionary and WordNet provide local options in this release.

You can access WordNet if you are off-line if you install wnb3.app from https://www.sikorskiy.net/info/prj/wnb3/, which includes the data files.

You can use the dark mode formatted report for you initial display with the third WordNet option.

You can just pick one and stick with it, eliminating the others.

I had at first wanted to do a local dark mode option but that, I learned, would require installing node.js, which isn't something I wanted to support. I may still do it because I prefer the dark mode interface to the other two, so if you're interested rattle my chain.

LiteraryToolbox.May.zip (6.7 KB)

Text Toolbox

This update includes one Text Toolbox revised module.

REVISED

  • Translate: Results are returned to the HTML Prompt window rather than a browser window.

76)Translate....kmmacros (10.3 KB)

8 Likes