diff --git a/generate.py b/generate.py index e52372d..a299319 100755 --- a/generate.py +++ b/generate.py @@ -4,6 +4,15 @@ from random import randint, random, choice from choice_network import Choice, FixedText, RandInt, Network +def get_first_names(): + lines = [] + with open("vornamen.csv") as file: + lines = file.read().split("\n") + names = [ + name + " " + for name in lines + ] + return names greeting = """ Englisch version below. @@ -32,7 +41,7 @@ network = Network( student = ["Student ", "Studentin ", "", "Studierende:r "], ), student = Choice( - last_name = ["Anna ", "Anton ", "Amal "], + last_name = get_first_names(), matr_nr = [""], ), last_name = Choice( diff --git a/vornamen.csv b/vornamen.csv new file mode 120000 index 0000000..a5bb226 --- /dev/null +++ b/vornamen.csv @@ -0,0 +1 @@ +../vornamen/vornamen.csv \ No newline at end of file