A configurable generator of things that have a strict grammar.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
M. Gardner 7b42e853a7 make running sass optional 2 years ago
README.md add readme 2 years ago
gen.php Make spaces between pattern parts optional 2 years ago
ideas.php initial commit 2 years ago
style.css make running sass optional 2 years ago
style.scss initial commit 2 years ago

README.md

php-gen

A generator of things with a strict syntax.

This is a very simple project, literally less than a hundred lines. in source code.

What can it do? Well, you give it an ini file that tells it what to do.

The fields in this ini file are the following:

title="Word Generator"
; This is not required, but it is recommended. 

format[]="consonant"
format[]="vowel"
format[]="consonant"
format[]="vowel"
format[]="consonant"
format[]="space"
format[]="consonant"
format[]="vowel"
format[]="consonant"
format[]="vowel"
format[]="consonant"
; This specifies the format that the generated text will have. This is required.

; Also, if you don't have at least one option for all specified fields, you can expect an error message

space[]=" "

vowel[]="a"
consonant[]="b"
consonant[]="c"
consonant[]="d"
vowel[]="e"
consonant[]="f"
consonant[]="g"
consonant[]="h"
vowel[]="i"
consonant[]="j"
consonant[]="k"
consonant[]="l"
consonant[]="m"
consonant[]="n"
vowel[]="o"
consonant[]="p"
consonant[]="q"
consonant[]="r"
consonant[]="s"
consonant[]="t"
vowel[]="u"
consonant[]="v"
consonant[]="w"
consonant[]="x"
consonant[]="y"
consonant[]="z"

The name of this ini file is wordlist.ini, because I usually use it to generate random colections of words, like sentences.

What it can do

Because I assume that you won't be lettning other people get at your config files, sanitization is minimal. This is good, because this means you can even randomly generate javascript.

Basically, you can include whatever html you want in these fields, letting you format your generated string however you want.

In theory, you could even generate any sort of image or audio, although I'm not sure if you can even play inline audio files. I know that you can display inline svgs for insance.