示例#1
0
文件: contacts.py 项目: Nioub/GLMF190
def cli_mode(args):
    person = Contact(args.name, (args.base, args.cursor))
    forename = person.forename
    name = person.name
    mail = person.mail

    if mail == None:
        print('Nouveau contact')
        mail = input('Veuillez saisir le mail: ')
        person.mail = mail

    person.generateDoc(args.sun)
    person.sendMail()

    print('Le mail a été envoyé à', forename, name)
示例#2
0
文件: contacts.py 项目: GLMF/GLMF190
def cli_mode(args):
    person = Contact(args.name, (args.base, args.cursor))
    forename = person.forename
    name = person.name
    mail = person.mail

    if mail == None:
        print('Nouveau contact')
        mail = input('Veuillez saisir le mail: ')
        person.mail = mail

    person.generateDoc(args.sun)
    person.sendMail()

    print('Le mail a été envoyé à', forename, name)
示例#3
0
文件: contacts.py 项目: GLMF/GLMF190
def cli_mode(args):
    person = Contact(args.name, (args.base, args.cursor))
    forename = person.forename
    name = person.name
    mail = person.mail

    if mail == None:
        print('Nouveau contact')
        mail = input('Veuillez saisir le mail: ')
        person.mail = mail

    print('Mode CLI')
    print('Contact:', forename, name)
    print('Mail:', mail)

    person.generateDoc(args.sun)
示例#4
0
文件: TextUI.py 项目: GLMF/GLMF191
    def main(self, *args, **kwargs):
        form = npyscreen.Form(name="Agenda")
        contact = form.add(ContactAutocomplete, name="Contact:")
        mail = form.add(npyscreen.TitleText, name="Mail:")
        weather = form.add(npyscreen.TitleSelectOne, max_height=len(TextUI.weather_values), 
                value=[0], name="Temps:", values=TextUI.weather_values, scroll_exit=True)

        form.edit()

        (base, cursor) = DB.create_db()
        person = Contact(contact.value, (base, cursor))
        person.mail = mail.value

        npyscreen.notify_wait("Valeur saisie : " + contact.value, title="Vérification")

        DB.close_db(base, cursor)
示例#5
0
文件: contacts.py 项目: Nioub/GLMF190
def cli_mode(args):
    person = Contact(args.name, (args.base, args.cursor))
    forename = person.forename
    name = person.name
    mail = person.mail

    if mail == None:
        print('Nouveau contact')
        mail = input('Veuillez saisir le mail: ')
        person.mail = mail

    print('Mode CLI')
    print('Contact:', forename, name)
    print('Mail:', mail)

    person.generateDoc(args.sun)
示例#6
0
    def main(self, *args, **kwargs):
        form = npyscreen.Form(name="Agenda")
        contact = form.add(ContactAutocomplete, name="Contact:")
        mail = form.add(npyscreen.TitleText, name="Mail:")
        weather = form.add(npyscreen.TitleSelectOne,
                           max_height=len(TextUI.weather_values),
                           value=[0],
                           name="Temps:",
                           values=TextUI.weather_values,
                           scroll_exit=True)

        form.edit()

        (base, cursor) = DB.create_db()
        person = Contact(contact.value, (base, cursor))
        person.mail = mail.value

        npyscreen.notify_wait("Valeur saisie : " + contact.value,
                              title="Vérification")

        DB.close_db(base, cursor)