From b2e91138d40be6d0ce08a0d4c327169f711c15ba Mon Sep 17 00:00:00 2001 From: AntonObersteiner Date: Sun, 2 Jun 2024 21:27:26 +0200 Subject: [PATCH] add last names --- generate.py | 9 +++-- nachnamen.csv | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+), 4 deletions(-) create mode 100644 nachnamen.csv diff --git a/generate.py b/generate.py index a299319..bf5085c 100755 --- a/generate.py +++ b/generate.py @@ -4,13 +4,14 @@ from random import randint, random, choice from choice_network import Choice, FixedText, RandInt, Network -def get_first_names(): +def get_names(filename): lines = [] - with open("vornamen.csv") as file: + with open(filename) as file: lines = file.read().split("\n") names = [ name + " " for name in lines + if len(name) > 1 ] return names @@ -41,11 +42,11 @@ network = Network( student = ["Student ", "Studentin ", "", "Studierende:r "], ), student = Choice( - last_name = get_first_names(), + last_name = get_names("vornamen.csv"), matr_nr = [""], ), last_name = Choice( - student_mit = ["Beier ", "Behar ", "Berger "], + student_mit = get_names("nachnamen.csv"), ), student_mit = Choice( matr_nr = ["mit "], diff --git a/nachnamen.csv b/nachnamen.csv new file mode 100644 index 0000000..717dce5 --- /dev/null +++ b/nachnamen.csv @@ -0,0 +1,106 @@ +Müller +Schmidt +Schneider +Fischer +Weber +Meyer +Wagner +Becker +Schulz +Hoffmann +Schäfer +Koch +Bauer +Richter +Klein +Wolf +Schröder +Neumann +Schwarz +Zimmermann +Braun +Krüger +Hofmann +Hartmann +Lange +Schmitt +Werner +Schmitz +Krause +Meier +Lehmann +Schmid +Schulze +Maier +Köhler +Herrmann +König +Walter +Mayer +Huber +Kaiser +Fuchs +Peters +Lang +Scholz +Möller +Weiß +Jung +Hahn +Schubert +Vogel +Friedrich +Keller +Günther +Frank +Berger +Winkler +Roth +Beck +Lorenz +Baumann +Franke +Albrecht +Schuster +Simon +Ludwig +Böhm +Winter +Kraus +Martin +Schumacher +Krämer +Vogt +Stein +Jäger +Otto +Sommer +Groß +Seidel +Heinrich +Brandt +Haas +Schreiber +Graf +Schulte +Dietrich +Ziegler +Kuhn +Kühn +Pohl +Engel +Horn +Busch +Bergmann +Thomas +Voigt +Sauer +Arnold +Wolff +Pfeiffer +Nowak +Noack +Pietsch +Yılmaz +Kaya +Nguyen