feat: use templates to generate com
This commit is contained in:
parent
a47c5df213
commit
d29173d14b
9 changed files with 212 additions and 152 deletions
|
@ -11,6 +11,7 @@ Created on Sun Mar 25 18:20:49 2018
|
|||
# * mettre en place une file d'instruction pour anticiper
|
||||
# * vérifier les eval et les types donnés
|
||||
|
||||
from genCom import GenerateurComm
|
||||
from cineclubBlogSQ import filmSQ as f
|
||||
from config import dump_path, db_path
|
||||
import sqlite3
|
||||
|
@ -22,6 +23,7 @@ class FilmInterface():
|
|||
|
||||
def __init__(self):
|
||||
self.filmCharge = None
|
||||
self.generateur_com = GenerateurComm()
|
||||
|
||||
def menu(self):
|
||||
self.filmEnCours()
|
||||
|
@ -161,22 +163,22 @@ class FilmInterface():
|
|||
rep = input(
|
||||
"Voulez-vous afficher \n 1: l'article du bocal du film courant \n 2: l'article de blog du film courant \n 3: le calendrier du film courant \n 4: la communication Facebook du film courant \n 5: l'email du film courant \n 6: le calendrier des films à partir du film courant \n 7: changer le film sélectionné \n 0: revenir au menu principal \n")
|
||||
if rep == "1":
|
||||
print(self.filmCharge.bocal())
|
||||
print(self.generateur_com.bocal(self.filmCharge))
|
||||
self.finAction()
|
||||
elif rep == "2":
|
||||
print(self.filmCharge.blog())
|
||||
print(self.generateur_com.blog(self.filmCharge))
|
||||
self.finAction()
|
||||
elif rep == "3":
|
||||
print(self.filmCharge.calendrier())
|
||||
print(self.generateur_com.calendrier(self.filmCharge))
|
||||
self.finAction()
|
||||
elif rep == "4":
|
||||
print(self.filmCharge.facebook())
|
||||
print(self.generateur_com.facebook(self.filmCharge))
|
||||
self.finAction()
|
||||
elif rep == "5":
|
||||
print(self.filmCharge.mail())
|
||||
print(self.generateur_com.mail(self.filmCharge))
|
||||
self.finAction()
|
||||
elif rep == "6":
|
||||
print(self.filmCharge.allCalendars())
|
||||
print(self.generateur_com.allCalendars(self.filmCharge))
|
||||
self.finAction()
|
||||
elif rep == "7":
|
||||
self.selectFilm()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue