def generateMonthlyReport(): month = requester.requestScopeOfMonthlyReport() fileName = month[0] + '-' + month[1] file = open('MonthlyProgressReports/' + fileName, 'w+') writer.writeMonthlyHeader(file, month) writer.writeThisMonthHeader(file) printer.printThisMonthMessage() requester.requestMonthlyActivities(file, month[0] + '-' + month[1]) writer.writeNextMonthHeader(file) printer.printNextMonthMessage() requester.requestActivities(file) file.close() return
def generateWeeklyReport(): week = requester.requestScopeOfWeeklyReport() fileName = week[0] + '-' + week[1] directory = 'WeeklyProgressReports/' + week[2] + '-' + week[3] + '/' if not os.path.exists(directory): os.makedirs(directory) file = open(directory + fileName, 'w+') writer.writeWeeklyHeader(file, week) writer.writeThisWeekHeader(file) printer.printThisWeekMessage() requester.requestActivities(file, True) writer.writeNextWeekHeader(file) printer.printNextWeekMessage() requester.requestActivities(file, False) file.close() return