kommentare

This commit is contained in:
fingadumbledore 2023-05-12 19:57:05 +02:00
parent 6780b46fd7
commit 96f2bedb01
5 changed files with 17 additions and 0 deletions

View File

@ -1,7 +1,9 @@
""" database stuff """
import sqlite3
import json
def dbcon(sql):
""" connect to database """
try:
con = sqlite3.Connection("party.db")
cur = con.cursor()
@ -11,6 +13,7 @@ def dbcon(sql):
print("Fehler:")
def return_dbcon(sql):
""" connext to database and return stuff """
try:
con = sqlite3.connect("party.db")
cur = con.cursor()
@ -21,6 +24,7 @@ def return_dbcon(sql):
return "Error"
def mate_erstellen():
""" collect mate from json """
try:
with open('./Config/mate.json') as f:
data = json.load(f)
@ -39,6 +43,7 @@ def mate_erstellen():
print("Fehler beim laden der Datei: mate.json")
def create_db():
""" a little bit useless """
conn = sqlite3.connect("chat.db")
c = conn.cursor()
c.execute("CREATE TABLE messages (username text, message text, timestamp text)")

4
log.py
View File

@ -1,10 +1,13 @@
""" Server logging system """
import os
import time
def clear_log():
""" clearing log """
print("f")
def log_server(log, type):
""" server log"""
file_size = os.path.getsize('server.log')
date = time.strftime("%d-%m-%Y %H:%M:%S", time.localtime(time.time()))
if file_size >= 1024*1024:
@ -18,6 +21,7 @@ def log_server(log, type):
def chat_log(log,type):
""" chat log """
file_size = os.path.getsize('chat.log')
date = time.strftime("%d-%m-%Y %H:%M:%S", time.localtime(time.time()))
if file_size >= 1024*1024:

View File

@ -1,12 +1,16 @@
""" important """
# mws = matewirtschaftssystem
def mws():
""" manage mate """
print("Mate")
def materechner():
""" calculate mate """
print("eine Mate haha")
def mate_logik(sorte, anzahl):
""" mate logic """
print("ich kann denken")

View File

@ -1,9 +1,12 @@
""" play music"""
def musik_player():
""" music player"""
print("Ich könnte Musik abspielen")
def metadaten_picker():
""" i love metadata"""
print("ich mag Metadaten")

View File

@ -1,3 +1,4 @@
""" statistic """
import matplotlib.pyplot as plt
def create_chart(session_id,spiel_name):