macro with clipping?
Posted: Wed Jul 16, 2008 8:07 pm
As much as I love TextPad, I prefer reading Gutenberg books formatted.
I have been chugging along, tagging a few texts from Gutenberg for formatting, using the Clip Library to make sure I don't forget any of those pesky closing tags.
Often these texts show emphasis either through ALL CAPS or _faux_ underlining, which I change to more reader-friendly emphasis also using the Clip Library.
While the "underlined" text can be quite easily dealt with using a single search/replace for the whole book, I'm finding that changing the all caps text a bit more tedious to accomplish.
First of all, I have been having trouble figuring out a single regular expression to find (a) all single all capped words, whether they are followed by a space, punctuation, or a hard return; and also (b) all all capped groups of words, whether etc. ... (I know this isn't the right forum for that problem, and I'm still playing around with that anyway and hope to figure out the solution on my own).
Second -- and finally we get to the subject line -- after finding the set of all capped words that need to be changed to different emphasis, theyboth need to be made either lower or title case as necessary, and made the correct tags applied (either italic or bold, depending on the context).
I would love if it were possible to either
(preferably) -- make a macro that would both lowercase and then use a specific clipping
or if that is not possible (as I suspect)
to assign a keyboard shortcut to a specific clippingso I am not jumping back and forth from the keyboard to the mouse constantly.
As I said, I have done a couple of these the hard way already -- meaning select the all caps words, then either Ctrl+L or Ctrl+Shift+U, as needed, and then mouse over to the Clip Library and double click on the correct clipping.
While the results are ok, I am pretty much determined to figure out a better way before I get stuck doing this to another long file.
I suppose another solution would be if I could create a macro with a hot spot like the clippings do, but I also suspect that is not possible in TextPad.
Any suggestions? Am I missing something?
I have been chugging along, tagging a few texts from Gutenberg for formatting, using the Clip Library to make sure I don't forget any of those pesky closing tags.
Often these texts show emphasis either through ALL CAPS or _faux_ underlining, which I change to more reader-friendly emphasis also using the Clip Library.
While the "underlined" text can be quite easily dealt with using a single search/replace for the whole book, I'm finding that changing the all caps text a bit more tedious to accomplish.
First of all, I have been having trouble figuring out a single regular expression to find (a) all single all capped words, whether they are followed by a space, punctuation, or a hard return; and also (b) all all capped groups of words, whether etc. ... (I know this isn't the right forum for that problem, and I'm still playing around with that anyway and hope to figure out the solution on my own).
Second -- and finally we get to the subject line -- after finding the set of all capped words that need to be changed to different emphasis, theyboth need to be made either lower or title case as necessary, and made the correct tags applied (either italic or bold, depending on the context).
I would love if it were possible to either
(preferably) -- make a macro that would both lowercase and then use a specific clipping
or if that is not possible (as I suspect)
to assign a keyboard shortcut to a specific clippingso I am not jumping back and forth from the keyboard to the mouse constantly.
As I said, I have done a couple of these the hard way already -- meaning select the all caps words, then either Ctrl+L or Ctrl+Shift+U, as needed, and then mouse over to the Clip Library and double click on the correct clipping.
While the results are ok, I am pretty much determined to figure out a better way before I get stuck doing this to another long file.
I suppose another solution would be if I could create a macro with a hot spot like the clippings do, but I also suspect that is not possible in TextPad.
Any suggestions? Am I missing something?