Are there any text formatting plugins for GH or functions in GH Python?

I’m working on a donor wall with several hundred names and want to adjust capitalization based on proximity to certain elements and groupings. Would be pretty rad if I could manage that inside GH rather than spreadsheet magic.

Hi Weston,

I’m sure there are numerous approaches.

Maybe this resembles what you’re after?
text_help.gh (23.1 KB)
txtA

Most likely you’ll need to adjust the script based on your rules.

Also a good idea to look into different-yet-related text manipulations, like this old thread

As far as plug-ins: yes, there are a few, go to Food4Rhino.com

1 Like

about changing the letter-case in Python

string.capitalize() maskes the very first letter of the very first character in a string uppercase
string.title() makes the first letter of each word in a string uppercase
string.upper() makes the whole string uppercase

4 Likes

Yes Python has lots of tools for text formatting. Also check out the split, join and format methods on python strings, if, else and elif for the logic and in to check whether a substring is inside your string

2 Likes