ActiveWords + Conversant

Last year I wrote about ActiveWords, which is hands down one of the best Windows utilities I’ve ever used. ActiveWords makes it easy to trigger relatively complex sequences of events just by typing a keyword into any text entry box.

I mostly use it to handle many of the repetitive tasks that are involved in maintaining my Conversant-based web sites. Conversant itself is pretty straightforward, but I’ve got so many different things going on — and a tendency to do things the hard way — that ActiveWords offers an excellent interface for many of these procedures.

Here’s a basic example. I’ve got close to 1,500 topical pages. Each of those topical pages has an associated RSS feed and features an XML icon with a link to the RSS feed. Each topical page has a hidden field that has the location of the RSS feed (there is an easier way to do this, but like I said, I like to be difficult). So whenever I create a new topical page I simply plant the cursor in the text entry box for the RSS field, type "RSS" followed by the F8 key which runs this basic text substitution script, (the greater than and less than signs are represented by the GT and LT tags).

<lt>!–#siteurl–<gt>index/rss/channel/

which would output:

<!–#siteurl–>index/rss/channel/

then I just have to tack on whatever this particular RSS feed is called and I’m done. It makes it a lot easier to do that then either a) having to remember this format all the time or b) sticking it in a text file, loading the file, and then copying and pasting.

I use a slightly more advanced script to deal with setting up the topical pages themselves. The way the topical pages work is that each article I write is tagged with various keywords that I’ve set up. The topical page simply returns a set of query results that find all articles tagged with a specific keyword or group of keywords. Conversant has a special macro, InsertQuery, that inserts the results from its Advanced Query Page into a regular page. So I’ve set up a script that is triggered when I type "AQP"+F8,

<LT>!–#insertquery aqppath="" cache="true" cacheExpires="720"–<gt>[LEFT:30]

This returns,

<!–#insertquery aqppath="" cache="true" cacheExpires="720"–>

and the [LEFT:30] portion at the end moves the cursor back to between the quote marks after the aqppath="" so I can go ahead and type in the path for the Advanced Query Page that I want to use for this topical page.

I’ve got about 6 ActiveWord scripts that perform actions like this. This way I can set these up the HTML code/Conversant macros like I want, simply remember the ActiveWords token I’m using, and then free up that space in my brain for other purposes.

Something else I’ve been doing for awhile for my web site is adding public domain e-texts to the site. This is part of my obssessive-compulsive personality. I have a page on my personal site about Darwinian evolution, for example. So it’s only logical that I also need to have e-texts of all of the books that Darwin ever wrote on the site as well.

But just having the texts there is kind of boring, so I’ve taken stuff that |Seth Dillingham| and Steve Ivy developed and added paragraph-level anchors so that if I (or anyone else wanted to), you could use a URL to bring up specific paragraphs. Moreover, I’m using a Javascript that Seth wrote to highlight the selected paragraph if you’re using the anchor, and a Cookie-based system to let the user make the permalinks visible or invisible (did I say I was obssessive?) For an example, see this chapter from a book by Frederick Douglass — play with the “Show/Hide Permalinks” option in the right-hand column to see how this works.

So the first thing I need to do is go through a book and add permalinks to every paragraph. I use Textpad 4.7 for all of my text editing, and this ActiveWords script triggered by "permalinks"+F8 to add the permalinks,

<CTRL><HOME></CTRL><lt>p<gt><CTRL><END> </CTRL><lt>/p<gt><CTRL><HOME></CTRL><F8>
\n\n<TAB><LT>/p<GT>\n\n<LT>p<GT><ALT>a</ALT>
<SHIFT><TAB></SHIFT><LT>P<GT><TAB><LT> a name="p\i(1)"<GT><LT>/a<GT> <LT>p id="mp\i(1)"<GT><ALT>a</alt>

This script goes through and adds an opening paragraph tag at the beginning of the document and a closing paragraph tag at the end of the document, then adds paragraph tags at the beginning and end of every other paragraph. Then it goes through and adds a named anchor at the beginning of every paragraph along with a paragraph ID tag that the Javascript highlighter needs as well.

Leave a Reply