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.

Other articles of interest:

Leave a Reply

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

Recent Comments
  • How To Disable the Quicken Registration Prompt (32)
    • Mike: Hi, for anyone still trying to run older versions of Quicken, mine is 2004, I hope this helps. I managed to get it running on my old laptop by adding the three missing dll files, when I needed to upgrade I thought I would be able...
    • Juani: Hi, I have a registered Quicken 2016 and now my files are being held hostage by Intuit, cannot log in with my ID unless I upgrade therefore buy a subscription, I need to access my files, please HELP. Thanks
    • David: A BIG Thank you! I regularly reinstall Windows OS’s using different hardware configs. In short, Quicken 2011 (it’s March of 2020 as I write this) has been a program I’ve been very happy with and continue to use....
    • Karen L: Today I rang Reckon Australia again, got a different guy and he talked me through the process of getting me a new product key to enter since I already had the licence and it had been extended. Reckon have only extended it by 1...
    • Karen L: I have Australian Quicken 2008 on Windows 8.1. It keeps asking me to renew my licence which Reckon did for me however the activation won’t work. I tried this to disable the registration prompt however it did not stop the...
  • Enter dates into a date picker for Chrome and Firefox (1)
    • Prasanna: Hello, How to enter a previous month FIRST day and LAST day from the system date. Thanks Prasanna
  • Building Relationships with Developers (1)
    • Carlos Herrera: Ah yes. I have a team of software developers and it is genuinely so hard to keep them in the loop during projects. Though the more we work the better the communication becomes and we go from a trail and error process to a...
  • Integrating DevonAgent Pro with Alfred (1)
    • J. Garr: Beautiful, sweet, and simple. I love it; thanks for posting this solution.
  • Round and Round with the For..Next in Katalon Studio (1)
    • Sweet Ophaline Labador: Hello can you help me how to loop this scenario. Checking the elements is just the same. I want to check that the following function is available in www.siacargo.com: Track Shipment – clicking on this can...
  • Parsing Strings in Katalon – Split, Substring and Readlines (6)
    • Don Pedro: String tempText=”Date Month January. Revenue $1,355,721.00″ println(tempText.split(“ \$”)[1]) You need to escape the $ with \$ The [1] on the split captures characters on the right of the split [0]...
    • Prasad: Hi, I need to get the substring from the below string ‘Date Month January. Revenue $1,355,721.00’ I want to extract text after $ value. Please help Thank you
  • Working with Dates and Date Formatting in Katalon Studio (15)
    • Sangeethaa: How to get previous day’s date(Yesterday’s date)? Actually I was using today.previous() before,it was working fine till today morning.Now its not retrieving right date. Can anyone please guide me on this.
    • Don Pedro: That could be a little tricky. First, is the text/format always going to be the same? You will need to do some parsing. Separate the first but of text at 2019. After that, split the text again to get rid of Central Standard...
  • Output status messages and test information by writing to the Log File Viewer in Katalon Studio (6)
    • Saranya: Good One. Could you plz share link to access all your katalon related blogs. ThankQ
    • Rodrigo Calabretta: I’m using the KeywordUtil.markFailed or KeywordUtil.markError and my test stops is being shown as Error and If I use in the @afterTestCase the testCaseContext.getTestCaseSta tus() to show the status test case...