I may or may not be making good progress on a mesostic generator (I really need a good name for this thing, like the Mesostisaur or Poeticus mesosticii or…um, something even geekier…? 😛
I think my read function is good — it takes the text from a txt file and cleans it up nicely (it does remove punctuation; hyphens within words are ok, but anything between words gets stripped away).
But I don’t have a good idea how to test the other subfunctions individually, so I’m trying to do the whole thing and then give it a go. I’m trying to make it so that it loops back to the beginning if it hits the end of the oracle (source text) before it’s done. That may mean that words get used more than once, although hopefully they won’t be repeated excessively or in the same part of the mesostic every time.
It will also abort and print the partially completed mesostic if it can’t finish with the oracle, seed (spine), and number of iterations requested. I didn’t like that the mesostomatic just threw an error…not very polite, right? 😉
I should (fingers crossed) be able to get it printed as text in a way that you can just copy & paste it and have it look right as long as you’re in a monospace font.