-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
44 lines (34 loc) · 1.21 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# -*- coding: utf-8 -*-
import string
import os.path
from Taskoop_Bll import StringUtils, MailUtils
from Taskoop_UI import ConsoleUI, GUI
import sys
from PyQt4 import QtGui
# Main method, to be coded :þ
def main(argv):
if len(argv) >= 1 and argv[0].upper() == '-X':
GUI.GUI()
else:
ConsoleUI.Start()
def doStuff():
# Generate the HTML code
loopCount = 3 # how many times each participant has to perform each task
htmlFile = GenerateHTML(tasks, people, loopCount, arePeopleShownInHeader,
startingPoint, frequency)
# Decide whether to send the generated table by email
#userInput = string.whitespace
#while not StringUtils.IsYesNoInputValid(userInput):
#userInput = input("Send the generated table by email ? [Y/N]")
#if userInput.upper() == StringUtils.YES_KEY:
#SendMail(htmlFile)
print("OK")
# Send a file by email
def SendMail(fileToSend):
userInput = string.whitespace
while not StringUtils.IsEmailInputValid(userInput):
userInput = input("Please type a valid email address: ")
#TODO enable the generated table to be sent by mail
MailUtils.SendMail(fileToSend, userInput)
print('OK')
main(sys.argv[1:])