While creating a .textclipping file is a easy method to save a selected piece of text, the actual usefulness of a .textclipping is quite limited as it is easily opened in Finder and can be copied and pasted into other apps but it cannot be directly edited and with Ventura. If it is opened with TextEdit, which is the only way Apple provides as a means of conversion to plain text, Unlike a the clean conversion that older versions of TextEdit provided, it now get with the clipping all its formatting code and other stuff that has to be edited out to extract the basic text clipping. Additionally, no other Apps that I have found or seen in my research seems to be able to open a .textclipping file other than Finder or TextEdit. This also means that it cannot be directly shared with other OS’s.
So for a long time I have spent many hours trying to find a simple solution to properly convert a .textclipping file in to a plain text file with no success until now. While there are a number of scripted solutions to this using shell scripts, Applescript, or Automator none have worked as they all seem to rely of depreciated or commands no longer available in their original form in Ventura. So with the assistance of some of the new AI tools and figuring out what to ask them, I finally stumbled on a simple Automator solution that actually works with the result being a converted plain text file with the original file name in the same location that the original file was located. It is also capable of simultaneously creating a HTML file in the same manner. The original Automator script originally created both, but by putting a hashtag (#) in front of the line of code that writes the HTML file I have disabled it as I have no use for the file in HTML format. If you wish to have the HTML file, just delete the hashtag in front of the last line of the shell script in the Automator script.
The script is in the copyable PDF below. First create a new Quick Action in Automator. Add the 2 Automator Actions, from the Action Library. Then the copy and paste the shell script code into the second shell script action deleting what may there
Notes: First, make sure that the shell is set correctly to python3 in the pull down menu. Then be sure the shell script Pass Inputs is set to arguments instead of stdin or the script will not work.
After confirming that it matches the code in the pdf file below, deleting the hashtag in the last line if an HTML file is desired, Save the Quick Action and Give it your desired name. As a Quick Action it will be saved in the right place.
To use, simply select the desired .textclipping file to convert and then from the contextual menu, select the Quick Action you created under the Quick Actions title in the contextual menu.
Here is the PDF
Convert Text Clipping.pdf (395.3 KB)
Here is the copyable shell script code in the Automator Service
Convert Text Clipping script.pdf (18.3 KB)
If you wish to convert it to rich text, TextEdit will do that for you and do that correctly.
I am no longer a programmer and am not familiar with python. So I have no real idea on how this works or how to do any serious modifications. So all I know about it is what is in this topic. Hope you find it useful as I have.