Dateien nach "/" hochladen
This commit is contained in:
BIN
MaxMustermann.png
Normal file
BIN
MaxMustermann.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
11
README.md
Normal file
11
README.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Registrierung
|
||||||
|
|
||||||
|
Registrierung ist ein in Python geschriebenes Programm zur Ein- & Aus- registrierung
|
||||||
|
von Einsatzkräften mit Hilfe von QR-Codes.
|
||||||
|
|
||||||
|
|
||||||
|
## Authors
|
||||||
|
|
||||||
|
- [@Dtrieb](https://github.com/Dtrieb)
|
||||||
|
- [@Schrottfresse](https://www.github.com/Schrottfresse)
|
||||||
|
|
||||||
88
Registrierung.py
Normal file
88
Registrierung.py
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
# Registrierung BY DANIEL SCHLAPA
|
||||||
|
|
||||||
|
# Bsp. QRCODE: Mustermann;Max;01.01.1982;m;40000;Musterdorf;deutsch;Musterstrasse;;Düsseldorf;Deutsches Rotes Kreuz ;;;;
|
||||||
|
# qrcode = "ustermann;Max;01.01.1982;m;40000;Musterdorf;deutsch;Musterstrasse;;Düsseldorf;Deutsches Rotes Kreuz ;;;;"
|
||||||
|
|
||||||
|
import time
|
||||||
|
import qrcode
|
||||||
|
|
||||||
|
# print(time.strftime("%d%H%M%b%y"))
|
||||||
|
# print(time.strftime("%d.%m.%Y %H:%M:%S"))
|
||||||
|
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
<Code, der einen Fehler werfen könnte>
|
||||||
|
except <Fehlertyp, z.B. ValueError>:
|
||||||
|
<Fehlerbehandlung>
|
||||||
|
|
||||||
|
if ';' in string:
|
||||||
|
<Mehrere Werte>
|
||||||
|
else:
|
||||||
|
<Ein Wert>
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
def input_code():
|
||||||
|
scancode = input("Scan den Code: ").strip()
|
||||||
|
|
||||||
|
if ';' in scancode:
|
||||||
|
kompletter_qrcode = scancode
|
||||||
|
nachname, vorname, geburtsdatum, geschlecht, plz, ort, nationalitaet, strasse, helferid, null, hiorg, null, null, null,null = kompletter_qrcode.split(";")
|
||||||
|
kompletter_name = nachname + ", " + vorname
|
||||||
|
|
||||||
|
print("AUSGABE DER DATEN")
|
||||||
|
print("-----------------\n")
|
||||||
|
print("Kompletter Name: " + kompletter_name)
|
||||||
|
print("Vorname: " + vorname)
|
||||||
|
print("Nachname: " + nachname)
|
||||||
|
print("Straße: " + strasse)
|
||||||
|
print("Postleitzzahl + Ort: " + plz + " " + ort)
|
||||||
|
print("Geburtsdatum: " + geburtsdatum)
|
||||||
|
print("Geschlecht: " + geschlecht)
|
||||||
|
print("Nationalität: " + nationalitaet)
|
||||||
|
print("Hilfsorganisation: " + hiorg)
|
||||||
|
start_datum = time.strftime("%d.%m.%Y")
|
||||||
|
start_uhrzeit = time.strftime("%H:%M:%S")
|
||||||
|
print (start_datum + " " + start_uhrzeit)
|
||||||
|
else:
|
||||||
|
print("Code: " + scancode)
|
||||||
|
|
||||||
|
def make_qrcode():
|
||||||
|
dateinname_qrcode = input("Dateiname: ").strip()
|
||||||
|
img = qrcode.make('Daniel')
|
||||||
|
type(img)
|
||||||
|
img.save(dateinname_qrcode + ".png")
|
||||||
|
print("QR-Code " + dateinname_qrcode + ".png" + " wurde erstellt.")
|
||||||
|
|
||||||
|
def main():
|
||||||
|
print("""Menü
|
||||||
|
----
|
||||||
|
1 - Einregistrieren
|
||||||
|
2 - Ausregistrieren
|
||||||
|
|
||||||
|
3 - QR-Code erstellen
|
||||||
|
|
||||||
|
4 - Test
|
||||||
|
|
||||||
|
5 - Ende""")
|
||||||
|
|
||||||
|
while True:
|
||||||
|
menu_auswahl = int(input("Menüpunkt: "))
|
||||||
|
|
||||||
|
if (menu_auswahl == 1):
|
||||||
|
input_code()
|
||||||
|
elif (menu_auswahl == 2):
|
||||||
|
print("SORRY - 2")
|
||||||
|
elif (menu_auswahl == 3):
|
||||||
|
make_qrcode()
|
||||||
|
elif (menu_auswahl == 4):
|
||||||
|
print("SORRY - 4")
|
||||||
|
elif (menu_auswahl == 5):
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
print("Auswahl ist ungültig!")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
|
|
||||||
Reference in New Issue
Block a user