Improve your writing with TextSoap

While getting ready for 2020, it occurred to me I can use TextSoap’s regex engine to improve my writing by finding and highlighting common and overused words. There are 3 steps to the process: Use the “If Text Matches” action with a list of words I want to highlight Format the foreground and background colors of the text Set problem words to capitals so they stand out After checking a couple of websites, I created this short list of words to focus on. \b(and|or|for example|but|just|other|more|new|good|best|many|first|able|basically|interesting|honestly|literally|very|really|quite|seems|had|even|that|seriously|to be honest|ridiculous|know)\b From there I used the Set Text Color, Set Background Color filters, followed by the Convert to Uppercase action. When finished, the “cleaner” can run inside Scrivener itself, so I don’t have to leave my main app to get feedback. It’s a simple formatter, but I think this will have a powerful impact.

You really need to get TextSoap from Bundlehunt

I've already made a couple of comments about TextSoap, but if you haven't already picked up a copy from Bundlehunt, I strongly urge you to jump over there right now and grab it before it's gone. It's not just for text cleaning but can be used of parsing, formatting, searching, and copying. The uses for TextSoap are increasing day by day. In fact, it's solving formatting issues I didn't even know I had. To give a couple of examples, I write these blog articles in Scrivener, which is great. What's not great is that web formatting wants an extra line break between paragraphs. With TextSoap, adding those is now a click of the "2 Returns" button. The same is true for web links. Correcting those in a Markdown editor is a simple, but manual task. Now it's a click of the "HTML to Markdown" button. There's also the Extract Text from HTML Source which is a huge timesaver. Or the […]

Inserting and Appending Text with TextSoap

On the surface this seems like a silly, even trivial request, insert a line of text at the top of the file and append a line of text to the bottom of the file. And it is a simple request, until you want to do it in bulk. Then it becomes a copy/paste nightmare that is woefully inefficient or you get into sed, cat, echo, for .. each loops and some other variants of shell scripting. What I wanted to do was add code blocks to top and bottom of several Markdown files so they would be seen as code. Groovy code to be specific with the: ”’groovy ”’ While looking for a reliable solution that could be easily implemented, I caught something in TextSoap. It has an Insert Action. It’s an insert Before and After action. When no text is selection, the action is performed on the entire block of text. Since TextSoap has a menu bar button, the […]

Formatting Execution Times with TextSoap

As noted, I have a couple of tests that use the TimeDuration library to time how long certain actions take. For example, the time it takes to Save a large number of items. After running a whole series of test suites, I had a lot of information in the log files. As an experiment, I searched through all the logs and pulled out the “Execution Time:” marker. This gave me multiple instances of how long it took to save that large chunk of data. I then decided to try out TextSoap to see what sort of formatting I could apply to this text. Could I make some sort of report that showed the really long save times and the longer than average save times? Simply put, you absolutely can. Using a bit of RegEx and then applying some formatting, I can call out the really long test that took 3 minutes. Clearly something went totally wrong there. .*minutes.* I can […]