separated StugA name and date for title query
This commit is contained in:
22
main.go
22
main.go
@@ -24,17 +24,29 @@ func main() {
|
|||||||
}
|
}
|
||||||
fileName := scanner.Text()
|
fileName := scanner.Text()
|
||||||
|
|
||||||
fmt.Println("Danke! Jetzt brauche ich noch einen Titel, wie z.B. 'Teilnahmeliste der StugA Lehramt GO-Vollversammlung 01.01.2026':")
|
fmt.Print("Danke! Jetzt brauche ich noch ein paar weitere Infos.\n\n")
|
||||||
|
fmt.Println("Wie heißt euer StugA? Beispiel: 'StugA Lehramt GO':")
|
||||||
|
|
||||||
scanner.Scan()
|
scanner.Scan()
|
||||||
err2 := scanner.Err()
|
err = scanner.Err()
|
||||||
if err2 != nil {
|
if err != nil {
|
||||||
log.Fatalln(err2.Error())
|
log.Fatalln(err.Error())
|
||||||
}
|
}
|
||||||
title := scanner.Text()
|
stuga := scanner.Text()
|
||||||
|
|
||||||
|
fmt.Println("Zuletzt brauche ich das Datum der Vollversammlung, Beispiel: '28.05.2026':")
|
||||||
|
|
||||||
|
scanner.Scan()
|
||||||
|
err = scanner.Err()
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalln(err.Error())
|
||||||
|
}
|
||||||
|
date := scanner.Text()
|
||||||
|
|
||||||
fmt.Println("Deine Datei wird erstellt...")
|
fmt.Println("Deine Datei wird erstellt...")
|
||||||
|
|
||||||
|
title := fmt.Sprintf("Teilnahmeliste der %s-Vollversammlung vom %s", stuga, date)
|
||||||
|
|
||||||
createPdf(fileName, title)
|
createPdf(fileName, title)
|
||||||
|
|
||||||
fmt.Println("Die Datei wurde erstellt! Das Programm schließt sich jetzt.")
|
fmt.Println("Die Datei wurde erstellt! Das Programm schließt sich jetzt.")
|
||||||
|
|||||||
Reference in New Issue
Block a user