troutstick / magic_words

A silly phrase generator that keeps track of previously emitted phrases.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Magic Words

A silly phrase generator. :) Phrases that have previously been printed out are remembered by the program and will not be printed in future sessions.

Use python magic.py to begin interacting with this program!

Sample output:

Press `q` to quit
Enter something to receive next magic: 
MAGIC WORD: `lasagna bolognese`
num_left: 571

Press `q` to quit
Enter something to receive next magic:
MAGIC WORD: `encyclopedia rabbi`
num_left: 570

Press `q` to quit
Enter something to receive next magic: 
MAGIC WORD: `bolivia abroad`
num_left: 569

Press `q` to quit
Enter something to receive next magic:
MAGIC WORD: `olivia beer`
num_left: 568

Structure

  • magic.py: The main file, interacted with via command line
  • create_magic.py: Creates phrases based on combinations of words in input.txt. There are regex patterns that parse the input and places inputted words into buckets, from which the combos are generated.
  • get_magic.py: Prints out the phrases generated by create_magic.py. Woah oh ohhhhhh it's magic!
  • input.txt: A list of words to be turned into m a g i c. Words separated by newlines; # marks comments.

About

A silly phrase generator that keeps track of previously emitted phrases.


Languages

Language:Python 100.0%