37 lines
1019 B
Plaintext
37 lines
1019 B
Plaintext
# coding: utf-8
|
|
|
|
import os
|
|
import time
|
|
import codecs
|
|
import json
|
|
|
|
from app import stream
|
|
|
|
class manager_cl(object):
|
|
exposed = True
|
|
|
|
def __init__(self):
|
|
self.stream = stream.stream_cl()
|
|
|
|
def LIST(self):
|
|
#ausliefern der liste der Auktionen
|
|
filelist = {}
|
|
|
|
filenames = os.listdir('data')
|
|
for name in filenames:
|
|
if name.endswith('.json'):
|
|
charge = codecs.open(os.path.join('data', name), 'rU', 'utf-8')
|
|
chargeData = charge.read()
|
|
charge.close()
|
|
|
|
filelist[name]['chargeNr'] = name
|
|
filelist[name]['chargeName'] = chargeData['info']['name']
|
|
print(filelist)
|
|
|
|
def LOS(self, charge, los_nr):
|
|
#gibt Daten vom Los zurück
|
|
pass
|
|
def RECEIVE(self, charge):
|
|
#erhält Daten einer Charge und legt diese an oder überschreibt sie
|
|
#wenn sie bereits existiert
|
|
pass |