add first names from a cologne name registry csv
This commit is contained in:
parent
8f06d4e1ee
commit
dd525cec26
11
generate.py
11
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(
|
||||
|
|
1
vornamen.csv
Symbolic link
1
vornamen.csv
Symbolic link
|
@ -0,0 +1 @@
|
|||
../vornamen/vornamen.csv
|
|
Loading…
Reference in a new issue