finish lclass emmissionGUi

This commit is contained in:
vincent 2018-08-22 14:23:19 +02:00
parent 9343859e42
commit 96b2e3cf20

View File

@ -64,9 +64,21 @@ class ScrollableCanvas(Frame):
# update the inner frame's width to fill the canvas # update the inner frame's width to fill the canvas
canvas.itemconfigure(interior_id, width=canvas.winfo_width()) canvas.itemconfigure(interior_id, width=canvas.winfo_width())
canvas.bind('<Configure>', _configure_canvas) canvas.bind('<Configure>', _configure_canvas)
class emmisionGUI(frame):
def __init__(parent,**kwarg): class emmisionGUI(Frame):
Frame.__init__(parent) def __init__(self,parent,**kwarg):
Frame.__init__(self,parent)
self.image=LabelImage(self,kwarg['img'])
self.image.pack()
self.LabelTitle=Labbelink(self,("emmision ce soir: "+kwarg["title"]),kwarg['href'])
self.LabelTitle.pack()
if len(kwarg['casting']) > 0:
self.LabelReal=Label(self,text="réalisateur: "+kwarg['casting'][0])
self.LabelReal.pack()
self.labelCasting=Label(self,text="acteur: "+str(kwarg['casting'][1:]))
self.labelCasting.pack()
self.LabelSynopsys=Label(self,text="synopsys: " +kwarg['synopsis'],wraplength=350)
self.LabelSynopsys.pack()
class Interface: class Interface:
@ -114,20 +126,12 @@ class Interface:
link.pack() link.pack()
self.resultframe.update() self.resultframe.update()
print(self.data[self.value.get()]) print(self.data[self.value.get()])
emision=parse_emmission(strlink) emision=parse_emmission(strlink)
if emision: if emision:
if emision == "can't find show": if emision == "can't find show":
Label(self.resultframe.interior,text="impssible de parser cette chaine").pack() Label(self.resultframe.interior,text="impssible de parser cette chaine").pack()
else: else:
image=LabelImage(self.resultframe.interior,emision['img']) emmisionGUI(self.resultframe.interior,**emision).pack()
image.pack()
Labbelink(self.resultframe.interior,("emmision ce soir: "+emision["title"]),emision['href']).pack()
if len(emision['casting']) > 0:
Label(self.resultframe.interior,text="réalisateur: "+emision['casting'][0]).pack()
Label(self.resultframe.interior,text="acteur: "+str(emision['casting'][1:])).pack()
Label(self.resultframe.interior,text="synopsys: " +emision['synopsis'],wraplength=350).pack()
else: else:
Label(self.resultframe.interior,text="pas de connection internet impossible de determiner l'émission du soir").pack() Label(self.resultframe.interior,text="pas de connection internet impossible de determiner l'émission du soir").pack()