How I Use TextSoap

TextSoap is a tool I bought on a BundleHunt sale thinking it might come in handy one day. That has been an understatement. It’s now a text editor I use almost every day to clean up and reformat text.

On it’s own, TextSoap is a great TXT and RFT editor, with all the standard features you would expect. Of course, the power comes from the built in cleaners, RegEx powered Search and Replace feature, as well as chaining together dozens of cleaners to transform text.

And those cleaners can be used within other applications, not just within TextSoap itself. So, when working in Valentina Studio, the text can be reformatted without leaving the app. TextSoap can be called from it’s own menu bar applet, from a floating panel, or from other tools like Popclip.

TextSoap comes with a dozen cleaners and formatters built in. My most common cleaners are:

– Add an extra return between lines
– Remove extra returns
– Remove duplicate lines
– Convert to Title Case

Some of the more advanced cleaners include I’ve used are:

– Add Prefix and Suffix lines to text
– Extract text
– Change font
– Change font size
– If Text Matches condition

One of my most common tasks is to remove or add, TAB, Space, Enter, or CRLF. This is done to convert a CSV list to a column and vice-versa. This is so I can take something out of LibreOffice and drop it in Valentina Studio. With the Search/Replace engine it’s a matter of using ‘\n’, ‘\t’,’\s’ where needed.

At this point, I have several hotkeys set up to directly call formatters. For each blog article, I use the formatter to add an extra RETURN between paragraphs. Scrivener doesn’t need them, but WordPress does. Instead of going line by line, I press the key and the article is instantly reformatted.

I also have a Common Words formatter that goes through my text looking for overused words. It converts these to uppercase, changes the font to red, and the background to yellow. If there’s a ton of yellow on the screen, time for some serious editing.

Another common usage is the Extract Text. After a run in Katalon Studio, I parse the Execution Log looking for errors or other keywords. For example, show me all the lines with the word, “Minute” in them. Or all the lines with “Missing.” And of course, “Error.” These lines are extracted so I only have the text I’m interested in. A file of 10,000 lines is reduced to a handful in the blink of an eye. Incredibly powerful. The same could be done for logs like Papertrail and Rollbar.

As mentioned, I can convert a long line of numbers such as 1,2,3,4 into a column of numbers to be used in SQL such as (‘1′,’2′,’3′,’4’). This can be used used for the WITHIN clause. These are usually product SKUs or Customer IDs that I need to find. Getting the text in the proper format takes a mere second.

The Prefix and Suffix cleaners are perfect for building strings. I use that to Prefix a name with a Mac Volume name or something like https://. The same can be done for HTML or XML tags. It’s an easy way to get text ready for Postman, add opening and closing braces, or open and close tags.

There is another cleaner I have that works with Jira. It may seem trivial, but I’ve already used it 800+ times. When viewing a ticket, I want the number and the title. That’s easily copied, but when pasted, it comes across with Returns I don’t want. I have a TextSoap cleaner that removes all the Returns, does a small bit of RegEx to add a separator between ticket number and title. It’s minor but doing that a dozen times a day is so tedious. Now I just press a key and the work is done. There is no point in me repeatedly pressing the delete key, then the arrows keys, then dash a dozen keys when I can have the computer do it.

TextSoap was also the tool I used when I needed to extract and reformat queries that were stored in Excel. For reasons that send me into a rage, each cell in the row was a piece of information about how the query worked, what it was used for and other instructions. It was all useful but poorly stored.

Using the Concatenate commands in Calc, I put the text together in a way that was useful. Then using several RegEx search and replace blocks chained together, it was reformatted and parsed with TextSoap so it could actually be used. Moving everything around by hand would have taken at least a day and driven me to the brink. With TextSoap it took under an hour. All that information is now in SnippetsLab where they can be used properly and exported a usable format if needed. If I didn’t have TextSoap, I would have abandoned the project.

There are dozen of these types of tasks I handle each week with TextSoap. But even with these simple jobs, I save big chunks of time and tons of frustration. If I had to reformat and parse text for a living, the time saving would almost be beyond measure.

If there is a pattern to the text, TextSoap can either clean it up, reformat it, or extract the vital pieces. For an app that was nearly purchased on a whim, it has proven to be invaluable and is at the fore of my app toolbox.

That's my story and I'm sticking to it.

Author Signature for Posts

Tags :

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.