mirror of
https://github.com/lucaspalomodevelop/Party.git
synced 2026-03-13 00:07:21 +00:00
kommentare
This commit is contained in:
parent
6780b46fd7
commit
96f2bedb01
@ -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
4
log.py
@ -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:
|
||||
|
||||
4
mate.py
4
mate.py
@ -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")
|
||||
|
||||
|
||||
|
||||
3
musik.py
3
musik.py
@ -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")
|
||||
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
""" statistic """
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
def create_chart(session_id,spiel_name):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user