mut fp := flag.new_flag_parser(os.args)
generator := fp.string('generator', '', 'generator name')
method := fp.string('method', '', 'generator method name')
path := './data/$generator/$method'
if os.file_exists(path) {
print_generator_sample(path)
println('File does not exist')
fn print_generator_sample(path string) {
contents := os.read_file(path.trim_space()) or {
println('Failed to open $path')
lines := contents.split_into_lines()
print_random_element(lines, length)
fn print_random_element(lines []string, length int) {
rand.seed(time.now().uni)
println(lines[rand.next(length-1)])