working with complete sentences inside text objects

Barry  Phipps's icon

I'm working on a prompt generator for working with AI image generation. Trying to shuffle through complete sentences either randomly or cycling through.

Any tips on handling sentences with commas and other problem characters?

My first post here. Thanks in advance.

Roman Thilenius's icon

did the same thing recently... and while commas can usually be solved ("word," is a valid symbol which can be send around max and single commas usually do not make sense in this context (apart from beeing a questionable grammar) i ended up storing symbols as ascii numbers in a [coll].

the more complex the shuffle/replace/move algorithms you want to make are, the easier it gets to work with lists of integer numbers compared to words in a [text].

in the coll you´d have one word per line and it already comes with a bunch of useful commands such as store, insert, and delete.

medium sized sets of words, say like a list of colors or shapes, to be exchanged can be held in [umenu] which itself can be triggered by numbers again (just like coll) - in addition to manually choosing one.

so you´d work with lists everywhere and only at the very end the text formatting happens into a [text].

Source Audio's icon

"Any tips on handling sentences with commas and other problem characters?"

enclose sentences as a symbol using double quotas, and keep them so to the end.

the only one that remains really difficult to handle is a backslash.

If you need to display sentences without visible quotas, use comment.

Barry  Phipps's icon

Thanks Roman. I was hoping there would just be a way to put quotes or brackets around a sentence or a whole paragraph to indicate what it is. I may be in over my head.

When you said you did the same thing recently, were you also making a prompt generator? If so, how did it go?