Beginnings of a mesostic generator

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.

This is all in Python; I have no idea how much of it I can do in JavaScript, even assuming I get this version going flawlessly. But there you go – some progress, and hope of a mesostic generator that takes plain text input instead of webpages, so you don’t get all the html tags mixed in to your “poem”!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s