for those of you out there without the luxury of a graphical user interface, i present to you all the joy of endlessly concatenated stream-of-consciousness consumerist injunction beatz, now accessible via the command line!

Free Market Montgomery .py01

inspired by a recent experiment using this source material, it occurred to me that the indefinite recombination of this fine anthem might translate well to text.  thus was born my first python program.

the archive linked above contains the script (‘fmm.py’), and three source text files (‘two.txt’, ‘four.txt’, and ‘eight.txt’) containing phrases the script will use.  (assuming you’re comfortable desecrating the inspired words of Sammy Stephens, these phrases can be modified, though possibly at the cost of metrical consistency.)  also included is a crusty old poem by Robert Frost (‘frost.txt’) in need of some fresh air, which i’ve included to serve as an example of how a generative flea market jingle can be used to enhance other texts.

to operate, navigate the terminal to the directory in which the script and the source texts reside, and type python fmm.py.  you can also try piping a text into it (e.g. python fmm.py < frost.txt) and adding a single numeric argument (e.g. python fmm.py < frost.txt 40).  if you are piping a text into the script, the argument defines the chance of a script’s line being replaced by a flea market-related line.  if you’re running the script on its own, this argument determines how many lines are generated.

still more to come.