#!/usr/bin/env python #Yet Another Meeting Assistant (YaMA), is a program that primarily #helps any minute taker with minutes of meetings. #Copyright (C) 2005-2010 Atul Nene (www.atulnene.com) # #This program is free software; you can redistribute it and/or #modify it under the terms of the GNU General Public License #as published by the Free Software Foundation; specifically version 2 #of the License # #This program is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details at #http://www.gnu.org/licenses/gpl.html . import string import time from datetime import date from datetime import timedelta from time import strftime, tzname, daylight from Tkinter import * import os import tkFileDialog import tkFont import sys #TODO: Put in a Save and Load Meeting feature #TODO: Launch Email app for MIs and AIs class Form: def __init__(self, parentApp, pageID): self.parentApp = parentApp self.pageID = pageID self.frame = Frame (parentApp.pageFrame) def hide(self): self.frame.forget() def show(self): self.frame.pack() class ActionPointObj: def __init__(self): self.ID = "" self.contactNick = "" self.contactName = "" self.contactEmail = "" self.expEndDate = "" self.actualCompletionDate = "" self.details = "" self.pastRef = "" self.extRef = "" self.updateID = 0 self.percentComplete = 0 def previewText(self): return "Action Point ID: " + self.ID + "\n" + "Contact: " + self.contactNick + ":" + self.contactName + " <" + self.contactEmail + ">" + "\n" + "Expected Closure Date: " + self.expEndDate + "\n" + "Past Reference: " + self.pastRef + "\n" + "External Reference: " + self.extRef + "\n" + "Update ID: " + `self.updateID` + "\n" + "Percent Complete: " + `self.percentComplete` + "\n" + "Actual Completion Date: " + self.actualCompletionDate + "\n" + "Action Details: " + self.details class AttendeeObj: def __init__(self): self.attendeeNick= "" self.attendeeName = "" self.attendeeEmail = "" self.attendeeType = 2 # 1=Organizer, 2=Required, 3=Optional, 4=NonParticipant self.attendeeCost = 10 self.attendeePresence = 1 # 1=InPerson, 2=Remote self.attendeePresenceText = "On Phone" # only valid if Remote def previewText(self): tmpText = "Organizer" if self.attendeeType == 2: tmpText = "Required Attendee" elif self.attendeeType == 3: tmpText = "Optional Attendee" elif self.attendeeType == 4: tmpText = "Non Participant" return "Attendee Details:\nShort Name:" + self.attendeeNick + "\n" + "Full Name: " + self.attendeeName + "\n" + "Email:" + self.attendeeEmail + "\n" + "Type:" + tmpText + "\n" + "Cost:" + `self.attendeeCost` + "\n" + "Presence:" + `self.attendeePresence` + ", '" + self.attendeePresenceText + "'\n" class DiscussionObj: def __init__(self): self.details = "" def previewText(self): return "Discussion Details: " + self.details class AgendaObj: def __init__(self): self.details = "" def previewText(self): return "Agenda Item Details: " + self.details class DecisionObj: def __init__(self): self.contactNick= "" self.contactName= "" self.contactEmail= "" self.details = "" def previewText(self): return "Contact: " + self.contactNick + ":" + self.contactName + " <" + self.contactEmail + ">" + "\n" + "Decision Details: " + self.details class AboutPage(Form): def __init__(self, parentApp, pageID): Form.__init__(self, parentApp, pageID) self.parentApp = parentApp tcl_patchLevel = root.tk.eval("return $tcl_patchLevel") tk_patchLevel = root.tk.eval("return $tk_patchLevel") python_version = sys.version self.label1 = Label (self.frame, text = "Yet Another Meeting Assistant (YaMA)\n", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+6, "bold")) self.label1.grid(row=0, column=0, sticky=N) self.tipArea = Frame (self.frame, border=5) self.tipArea.grid(row=1, column=0, sticky=N) self.tip = Label(self.tipArea, justify=LEFT, text="YaMA can help you with the Agenda, Minutes, Invitations and Action Points of Meetings.\nYou can use it 'before' the meeting to put in the Agenda and the Attendee list and\nsend out the Invitations via email. You can use it 'during' the meeting to capture\nthe Minutes and the Action Points and share right after. \n\nUsage:\n1. Click on the tabs on the left to begin creating your Agenda/Minutes. \n2. Enter information in the respective tabs, and when done, click on the \"Publish\" tab.\n3. Preview the text, Copy To Clipboard, Paste into your email client, and Send-thats it !\n4. Export Meeting Invitations and Action Points to iCalendar/Wiki/CSV formats to\ninteroperate with other applications.\n5. Import Action Points from previous Minutes to review and record those still open.\n6. Time is precious! Calculate and communicate the cost of your meeting.", bd=1, relief=SUNKEN) self.tip.grid(row=0, column=0) self.label3 = Label (self.frame, justify=LEFT, text = "\nYaMA comes with ABSOLUTELY NO WARRANTY;\nThis is free software, and you are welcome to \nredistribute it under certain conditions; see \nhttp://www.gnu.org/licenses/gpl.html for details.\n", font=("Courier", 10, "bold")) self.label3.grid(row=2, column=0, sticky=N) self.label4 = Label (self.frame, justify=LEFT, text = "\nPlease see http://yama.sourceforge.net for help.\n\n\n\nPlease write to atul@atulnene.com with comments,\n suggestions, and customization requests and include\n the following information in your email:") self.label4.grid(row=4, column=0, sticky=N) self.versionText = Text (self.frame, height=5, width=80, bd=1, background="light grey", font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.versionText.insert(END, "YaMA : v" + parentApp.yama_version + "\nPython : " + python_version + "\nTCL : " + tcl_patchLevel + ", Tk : " + tk_patchLevel + "\nOS : " + os.name + ", Platform : " + sys.platform + ", Hex Version : " + `sys.hexversion`) if os.name == "nt": self.versionText.insert(END, "\nWindows Version : " + `sys.getwindowsversion()`) self.versionText.grid(row=5, column=0, padx=5) def changeFontSize(self): self.versionText.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) def show(self): self.parentApp.updateMessage (None) Form.show(self) class PreviewReportForm(Form): def __init__(self, parentApp, pageID): Form.__init__(self, parentApp, pageID) self.parentApp = parentApp self.frame.rowconfigure(0, weight = 1) self.frame.columnconfigure(0, weight = 1) self.titlePanel = Frame (self.frame) self.titlePanel.grid(row=0, column=0, sticky=NSEW) self.titleLabel = Label(self.titlePanel, text="Preview the Minutes", anchor=CENTER, font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+6, "bold")) self.titleLabel.pack(fill=X, anchor=W) self.buttonPanel = Frame (self.frame) self.buttonPanel.grid (row=1, column=0, sticky=W) self.markRevision = Checkbutton (self.buttonPanel, text="Mark as Revised", variable = self.parentApp.markMinutesAsRevised) self.markRevision.grid (row=3, column=0, sticky=W) self.revisionPanel = Frame (self.buttonPanel, border=5) self.revisionPanel.grid(row=3, column=1, columnspan=2, sticky=W) label1 = Label(self.revisionPanel, text="Revision #:") label1.pack (side=LEFT) self.revisionNumEntry = Entry (self.revisionPanel, width=2, textvariable=self.parentApp.minutesRevisionNumber, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) #self.revisionNumEntry.grid(row=2, column=1, sticky=W) self.revisionNumEntry.pack(side=LEFT) label2 = Label(self.revisionPanel, text="Reason:") label2.pack (side=LEFT) self.revisionTextEntry = Entry (self.revisionPanel, width=40, textvariable=self.parentApp.minutesRevisionText, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) #self.revisionTextEntry.grid(row=2, column=2, sticky=W) self.revisionTextEntry.pack(side=LEFT) self.previewNow = Button (self.buttonPanel, text="Preview Now", command=self.commandPreviewNow) self.previewNow.grid (row=4, column=0, columnspan=4) self.previewPanel = Frame (self.frame, border=5) self.previewPanel.grid(row=2, column=0, sticky=NSEW) self.notePanel = Frame (self.previewPanel) self.notePanel.grid(row=2, column=0,sticky=W) self.noteScrollbar = Scrollbar (self.notePanel) self.noteScrollbar.pack(side=RIGHT, fill=Y) self.note = Text (self.notePanel, height=30, width=80, yscrollcommand=self.noteScrollbar.set, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.note.pack(side=LEFT, fill=BOTH, expand=1) self.noteScrollbar.config(command=self.note.yview) self.copyTo = Button (self.previewPanel, text="Copy To Clipboard (Select+^C))", command=self.copyToClipboard) self.copyTo.grid (row=3, column=0, pady=5) def changeFontSize(self): self.note.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.revisionNumEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.revisionTextEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) def copyToClipboard(self): self.parentApp.master.clipboard_clear() self.parentApp.master.clipboard_append(self.note.get(1.0,END)) def commandPreviewNow(self): self.parentApp.makeReport() self.note.delete(1.0, END) self.note.insert(END, self.parentApp.finalReport) def show(self): self.parentApp.makeReport() self.note.delete(1.0, END) self.note.insert(END, self.parentApp.finalReport) self.parentApp.updateMessage ("MSG_FORTUNE_PUBLISH") Form.show(self) class ExportActionsForm(Form): def __init__(self, parentApp, pageID): Form.__init__(self, parentApp, pageID) self.parentApp = parentApp self.frame.rowconfigure(0, weight = 1) self.frame.columnconfigure(0, weight = 1) self.titlePanel = Frame (self.frame) self.titlePanel.grid(row=0, column=0, sticky=NSEW) self.titleLabel = Label(self.titlePanel, text="Export to iCalendar, Wiki formats", anchor=CENTER, font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+6, "bold")) self.titleLabel.pack(fill=X, anchor=W) self.buttonPanel = Frame (self.frame) self.buttonPanel.grid (row=1, column=0) self.outlookCompatibility = Checkbutton (self.buttonPanel, text="Attempt Compatibility with MSOutlook", variable = self.parentApp.outlookCompatibleWhenExport) self.outlookCompatibility.grid (row=0, column=0, columnspan=3, pady=5) self.exportInviteNow = Button (self.buttonPanel, text="Export Meeting Invitation (iCal) Now", command=self.commandExportMINow) self.exportInviteNow.grid (row=1, column=0, pady=5) #self.separatorButton = Button (self.buttonPanel, text=" ", relief=FLAT, bd=1) #self.separatorButton.grid (row=1, column=1) self.exportAINow = Button (self.buttonPanel, text="Export Action Points (iCal) Now", command=self.commandExportAINow) self.exportAINow.grid (row=2, column=0, pady=5) #self.separatorButton = Button (self.buttonPanel, text=" ", relief=FLAT, bd=1) #self.separatorButton.grid (row=1, column=3) self.exportAIWikiNow = Button (self.buttonPanel, text="Export Action Points (Wiki) Now", command=self.commandExportAIToWikiNow) self.exportAIWikiNow.grid (row=3, column=0, pady=5) self.logPanel = Frame (self.frame, border=5) self.logPanel.grid(row=2, column=0, sticky=NSEW) self.notePanel = Frame (self.logPanel) self.notePanel.grid(row=1, column=0,sticky=W) self.noteScrollbar = Scrollbar (self.notePanel) self.noteScrollbar.pack(side=RIGHT, fill=Y) self.note = Text (self.notePanel, height=21, width=80, yscrollcommand=self.noteScrollbar.set, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.note.pack(side=LEFT, fill=BOTH, expand=1) self.noteScrollbar.config(command=self.note.yview) self.buttonPanel = Frame (self.logPanel) self.buttonPanel.grid(row=2, column=0) self.clearButton = Button (self.buttonPanel, text="Clear", command=self.commandClear) self.clearButton.grid (row=0, column=0, sticky=W, padx=5, pady=5) self.openTemp = Button (self.buttonPanel, text="Open Temporary Location", command=self.commandOpenTemp) self.openTemp.grid (row=0, column=3, sticky=E, padx=5, pady=5) def commandClear(self): self.note.delete(1.0, END) def changeFontSize(self): self.note.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) def commandExportAIToWikiNow(self): if self.parentApp.actionItemCount == 0: self.note.insert(END, "To Export, add at least one Action Point\n") return tmpKeys = self.parentApp.actionItems.keys() tmpKeys.sort() self.note.insert(END, "Evaluating suitability of Action Points for Export ...\n") evalCount = 0 for id in tmpKeys: obj = self.parentApp.actionItems[id] if obj.contactNick == "": self.note.insert(END, "Action Point " + id + " should have the Contact Name.\n") evalCount = evalCount + 1 if "" == obj.expEndDate or self.parentApp.skeletonDateStr == obj.expEndDate: self.note.insert(END, "Action Point " + id + " should have the Closure Date.\n") evalCount = evalCount + 1 if evalCount > 0: self.note.insert(END, "To Export, correct the " + `evalCount` + " error(s) in Action Point(s) as specified above.\n") return self.note.insert(END, "Evaluation Complete.\n") self.note.insert(END, "Paste the following table with Action Points into your wikipage ...\n") tmpSep = self.parentApp.optionTableHeaderCellSeparator.get() self.note.insert(END, tmpSep + "ID" + tmpSep + "Person" + tmpSep + "Details" + tmpSep + "EDOC" + tmpSep + "% Done" + tmpSep + "ADOC" + tmpSep + "Past Reference" + tmpSep + "External Reference" + tmpSep + "\n") tmpSep = self.parentApp.optionTableCellSeparator.get() for id in tmpKeys: obj = self.parentApp.actionItems[id] self.note.insert(END, tmpSep + obj.ID + tmpSep + obj.contactNick + tmpSep + obj.details + tmpSep + obj.expEndDate + tmpSep + `obj.percentComplete` + "%" + tmpSep + obj.actualCompletionDate + tmpSep + obj.pastRef + tmpSep + obj.extRef + tmpSep + "\n") def commandExportAINow(self): if self.parentApp.actionItemCount == 0: self.note.insert(END, "To Export, add at least one Action Point\n") return if self.parentApp.outlookCompatibleWhenExport.get() == 1: self.note.insert(END, "\nImplementing Special Considerations for Outlook Compatibility ...\n") tmpKeys = self.parentApp.actionItems.keys() tmpKeys.sort() self.note.insert(END, "Evaluating suitability of Action Points for Export ...\n") evalCount = 0 for id in tmpKeys: obj = self.parentApp.actionItems[id] if obj.contactName == "": self.note.insert(END, "Action Point " + id + " should have the Contact Name.\n") evalCount = evalCount + 1 if obj.contactEmail == "": self.note.insert(END, "Action Point " + id + " should have the Email Address.\n") evalCount = evalCount + 1 if "" == obj.expEndDate or self.parentApp.skeletonDateStr == obj.expEndDate: self.note.insert(END, "Action Point " + id + " should have the Closure Date.\n") evalCount = evalCount + 1 if evalCount > 0: self.note.insert(END, "To Export, correct the " + `evalCount` + " error(s) in Action Point(s) as specified above.\n") return self.note.insert(END, "Evaluation Complete.\n") self.note.insert(END, "Exporting Action Points to temporary location ...\n") for id in tmpKeys: obj = self.parentApp.actionItems[id] strlist1 = string.split (obj.expEndDate, '-') tmpDate1 = date (int(strlist1[0]), int(strlist1[1]), int(strlist1[2])) tmpDate2 = tmpDate1 + timedelta(days=1) tmpDateStr1 = tmpDate1.strftime ("%Y") + tmpDate1.strftime ("%m") + tmpDate1.strftime ("%d") tmpDateStr2 = tmpDate2.strftime ("%Y") + tmpDate2.strftime ("%m") + tmpDate2.strftime ("%d") if "" != obj.actualCompletionDate: strlist3 = string.split (obj.actualCompletionDate, '-') tmpDate3 = date (int(strlist3[0]), int(strlist3[1]), int(strlist3[2])) tmpDateStr3 = tmpDate3.strftime ("%Y") + tmpDate3.strftime ("%m") + tmpDate3.strftime ("%d") today = date.today() tmpCreatedDateStr = today.strftime ("%Y") + today.strftime ("%m") + today.strftime ("%d") tmpText = "BEGIN:VCALENDAR" + "\n" tmpText = tmpText + "PRODID:-//" + self.parentApp.yama_copyright + "//NONSGML YaMA v" + self.parentApp.yama_version + "//EN\n" tmpText = tmpText + "VERSION:2.0" + "\n" if self.parentApp.outlookCompatibleWhenExport.get() == 1: tmpText = tmpText + "METHOD:REQUEST" + "\n" tmpText = tmpText + "X-MS-OLK-FORCEINSPECTOROPEN:TRUE" + "\n" #tmpText = tmpText + "BEGIN:VTIMEZONE" + "\n" #tmpText = tmpText + "TZID:Chennai\, Kolkata\, Mumbai\, New Delhi" + "\n" #tmpText = tmpText + "BEGIN:STANDARD" + "\n" #tmpText = tmpText + "DTSTART:16010101T000000" + "\n" #tmpText = tmpText + "TZOFFSETFROM:+0530" + "\n" #tmpText = tmpText + "TZOFFSETTO:+0530" + "\n" #tmpText = tmpText + "END:STANDARD" + "\n" #tmpText = tmpText + "END:VTIMEZONE" + "\n" #tmpText = tmpText + "BEGIN:VTIMEZONE" + "\n" #tmpText = tmpText + "TZID:India Standard Time" + "\n" #tmpText = tmpText + "BEGIN:STANDARD" + "\n" #tmpText = tmpText + "DTSTART:16010101T000000" + "\n" #tmpText = tmpText + "TZOFFSETFROM:+0630" + "\n" #tmpText = tmpText + "TZOFFSETTO:+0530" + "\n" #tmpText = tmpText + "END:STANDARD" + "\n" #tmpText = tmpText + "END:VTIMEZONE" + "\n" if self.parentApp.outlookCompatibleWhenExport.get() == 1: tmpText = tmpText + "BEGIN:VEVENT" + "\n" else: tmpText = tmpText + "BEGIN:VTODO" + "\n" tmpText = tmpText + "DTEND;TZID=\"" + self.parentApp.meetingTimeZone.get() + "\";VALUE=DATE:" + tmpDateStr2 + "\n" tmpText = tmpText + "DTSTAMP;TZID=\"" + self.parentApp.meetingTimeZone.get() + "\":VALUE=DATE:" + tmpCreatedDateStr + "\n" tmpText = tmpText + "DTSTART;TZID=\"" + self.parentApp.meetingTimeZone.get() + "\";VALUE=DATE:" + tmpDateStr1 + "\n" tmpText = tmpText + "DUE;VALUE=DATE:" + tmpDateStr1 + "\n" tmpText = tmpText + "UID:" + "YaMA-AP-"+ today.isoformat() + "\n" tmpText = tmpText + "SEQUENCE:" + `obj.updateID` + "\n" tmpText = tmpText + "PERCENT-COMPLETE:" + `obj.percentComplete` + "\n" if "" != obj.actualCompletionDate: tmpText = tmpText + "COMPLETED;TZID=\"Chennai, Kolkata, Mumbai, New Delhi\";VALUE=DATE:" + tmpDateStr3 + "\n" if self.parentApp.organizerName.get() == "": self.note.insert(END, "Note: Organizer unspecified for this Action Point\n") if (self.parentApp.outlookCompatibleWhenExport.get() == 1) and (self.parentApp.organizerName.get() == obj.contactName): tmpText = tmpText + "ORGANIZER;CN=\"Meeting Organizer\":MAILTO:organizer@meeting.dummy\n" else: tmpText = tmpText + "ORGANIZER;CN=\"" + self.parentApp.organizerName.get() + "\":MAILTO:"+self.parentApp.organizerEmail.get() + "\n" tmpTokenList = string.split (obj.details, "\n", 1) #print tmpTokenList tmpToken = tmpTokenList[0] #print tmpToken #print len(tmpToken) if len(tmpToken) > 100: tmpToken = tmpToken[0:99] tmpToken = tmpToken + "..." #print tmpToken tmpText = tmpText + "SUMMARY;ENCODING=QUOTED-PRINTABLE:" + obj.ID + " : " + tmpToken + "\n" tmpText = tmpText + "ATTENDEE;CN=\"" + obj.contactName + "\";RSVP=TRUE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:MAILTO:" + obj.contactEmail +"\n" tmpDescription = obj.details tmpDescription = string.replace(obj.details, "\n", "\n\t") oldOrNew = " (Old) " if today.isoformat() in obj.ID: oldOrNew = " (New) " if obj.pastRef != "": tmpDescription = tmpDescription + "\n\tPast Reference:" + obj.pastRef oldOrNew = oldOrNew + " (with a Past Ref) " tmpText = tmpText + "DESCRIPTION;ENCODING=QUOTED-PRINTABLE:\"" + tmpDescription + "\t\"\n" tmpText = tmpText + "TRANSP:TRANSPARENT" + "\n" tmpText = tmpText + "CATEGORIES;ENCODING=QUOTED-PRINTABLE:YaMA" + "\n" if self.parentApp.outlookCompatibleWhenExport.get() == 1: if self.parentApp.meetingStatus.get() == 2: tmpStatus = "CONFIRMED" elif self.parentApp.meetingStatus.get() == 3: tmpStatus = "CANCELLED" else: tmpStatus = "TENTATIVE" else: if 0 == obj.percentComplete: tmpStatus = "NEEDS-ACTION" elif 100 == obj.percentComplete: tmpStatus = "COMPLETED" else: tmpStatus = "IN-PROCESS" tmpText = tmpText + "STATUS:" + tmpStatus + "\n" tmpText = tmpText + "PRIORITY:3" + "\n" tmpText = tmpText + "LOCATION:" + self.parentApp.meetingLocation.get() + "\n" tmpText = tmpText + "CLASS:PRIVATE" + "\n" tmpText = tmpText + "BEGIN:VALARM" + "\n" tmpText = tmpText + "TRIGGER:-PT720M" + "\n" tmpText = tmpText + "ACTION:DISPLAY" + "\n" tmpText = tmpText + "DESCRIPTION:Reminder" + "\n" tmpText = tmpText + "END:VALARM" + "\n" if self.parentApp.outlookCompatibleWhenExport.get() == 1: tmpText = tmpText + "END:VEVENT" + "\n" else: tmpText = tmpText + "END:VTODO" + "\n" tmpText = tmpText + "END:VCALENDAR" + "\n" self.note.insert(END, "\nAction Point \"" + obj.ID + " " + tmpToken + "\"" + oldOrNew + " for " + obj.contactName + " " ) tmpFileName = os.tempnam (None, "YaMA-AP-") + ".ics" print tmpFileName tmpFd = open (tmpFileName, "w") tmpFd.write (tmpText) tmpFd.flush() tmpFd.close() #os.startfile (tmpFileName) self.note.insert(END, "exported to File:" + tmpFileName + "\n") self.note.insert(END, "\nFor each of these, you may send it attached to an email to notify the assignee. In order that the assignee remembers to add it to the Personal Information Manager, it is suggested that you include the following text in the email:\n") if self.parentApp.outlookCompatibleWhenExport.get() == 0: self.note.insert(END, "\n\"Attached is an Action Point from the Meeting (in the iCalendar format). Please open it with your favorite Personal Information Manager so as to mark your ToDo List. This will help you remember that task - you should be reminded a day prior to the due date.\"\n") else: self.note.insert(END, "\n\"Attached is an Action Point from the Meeting (in the iCalendar format). Please open it with Outlook. It will appear as an appointment request and you will need to 'Accept' it, after which it will become an All-Day-Event on the due date of the Action Point. This will help you remember that task - you should be reminded by Outlook a day prior to the due date.\"\n") def commandExportMINow(self): if self.parentApp.agendaCount == 0: self.note.insert(END, "To Export, add at least one Agenda Item\n") return if self.parentApp.attendeeCount == 0: self.note.insert(END, "To Export, add at least one Attendee\n") return tmpOrganizer = self.parentApp.organizerNick.get() if tmpOrganizer == "": self.note.insert(END, "To Export, at least one Attendee should be of type Organizer\n") return tmpSubject = self.parentApp.meetingSubject.get() if tmpSubject == "": self.note.insert(END, "To Export, enter Subject of the meeting\n") return tmpLocation = self.parentApp.meetingLocation.get() if tmpLocation == "": self.note.insert(END, "To Export, enter Location of the meeting\n") return tmpDate = self.parentApp.meetingDate.get() if tmpDate == "" or tmpDate == self.parentApp.skeletonDateStr: self.note.insert(END, "To Export, enter Date of the meeting\n") return tmpFromTime = self.parentApp.meetingFromTime.get() if tmpFromTime == "" or tmpFromTime == self.parentApp.skeletonTimeStr: self.note.insert(END, "To Export, enter Start Time of the meeting\n") return tmpToTime = self.parentApp.meetingToTime.get() if tmpToTime == "" or tmpToTime == self.parentApp.skeletonTimeStr: self.note.insert(END, "To Export, enter End Time of the meeting\n") return if self.parentApp.meetingType.get() == 0: tmpType = self.parentApp.specifiedMeetingType.get() if tmpType == "": tmpType = "[Specified Meeting Type]" else: tmpType = self.parentApp.meetingTypeText[self.parentApp.meetingType.get()] if self.parentApp.outlookCompatibleWhenExport.get() == 1: self.note.insert(END, "\nImplementing Special Considerations for Outlook Compatibility ...\n") self.note.insert(END, "Exporting Meeting Invitation to temporary location ...\n") strlist1 = string.split (tmpDate, '-') tmpDate1 = date (int(strlist1[0]), int(strlist1[1]), int(strlist1[2])) tmpDateStr = tmpDate1.strftime ("%Y") + tmpDate1.strftime ("%m") + tmpDate1.strftime ("%d") strlist2 = string.split (tmpFromTime, ':') tmpFromTimeStr = strlist2[0] + strlist2[1] strlist3 = string.split (tmpToTime, ':') tmpToTimeStr = strlist3[0] + strlist3[1] tmpText = "BEGIN:VCALENDAR" + "\n" tmpText = tmpText + "PRODID:-//" + self.parentApp.yama_copyright + "//NONSGML YaMA v" + self.parentApp.yama_version + "//EN\n" tmpText = tmpText + "VERSION:2.0" + "\n" tmpText = tmpText + "METHOD:REQUEST" + "\n" if self.parentApp.outlookCompatibleWhenExport.get() == 1: tmpText = tmpText + "X-MS-OLK-FORCEINSPECTOROPEN:TRUE" + "\n" #tmpText = tmpText + "BEGIN:VTIMEZONE" + "\n" #tmpText = tmpText + "TZID:Chennai\, Kolkata\, Mumbai\, New Delhi" + "\n" #tmpText = tmpText + "BEGIN:STANDARD" + "\n" #tmpText = tmpText + "DTSTART:16010101T000000" + "\n" #tmpText = tmpText + "TZOFFSETFROM:+0530" + "\n" #tmpText = tmpText + "TZOFFSETTO:+0530" + "\n" #tmpText = tmpText + "END:STANDARD" + "\n" #tmpText = tmpText + "END:VTIMEZONE" + "\n" #tmpText = tmpText + "BEGIN:VTIMEZONE" + "\n" #tmpText = tmpText + "TZID:India Standard Time" + "\n" #tmpText = tmpText + "BEGIN:STANDARD" + "\n" #tmpText = tmpText + "DTSTART:16010101T000000" + "\n" #tmpText = tmpText + "TZOFFSETFROM:+0630" + "\n" #tmpText = tmpText + "TZOFFSETTO:+0530" + "\n" #tmpText = tmpText + "END:STANDARD" + "\n" #tmpText = tmpText + "END:VTIMEZONE" + "\n" tmpText = tmpText + "BEGIN:VEVENT" + "\n" tmpText = tmpText + "DTSTART;TZID=\"" + self.parentApp.meetingTimeZone.get() + "\":" + tmpDateStr + "T" + tmpFromTimeStr + "00\n" tmpText = tmpText + "DTEND;TZID=\"" + self.parentApp.meetingTimeZone.get() + "\":" + tmpDateStr + "T" + tmpToTimeStr + "00\n" today = date.today() tmpText = tmpText + "UID:" + "YaMA-MI-"+ today.isoformat() + str(time.time()) + "\n" tmpText = tmpText + "SEQUENCE:0" + "\n" tmpText = tmpText + "ORGANIZER;CN=\"" + self.parentApp.organizerName.get() + "\":MAILTO:"+self.parentApp.organizerEmail.get() + "\n" tmpText = tmpText + "SUMMARY;ENCODING=QUOTED-PRINTABLE:" + tmpType + ":" + self.parentApp.meetingSubject.get() + "\n" tmpKeys = self.parentApp.attendees.keys() tmpKeys.sort() for id in tmpKeys: obj = self.parentApp.attendees[id] if obj.attendeeType != 1: tmpRole = "REQ-PARTICIPANT" if obj.attendeeType == 3: tmpRole = "OPT-PARTICIPANT" elif obj.attendeeType == 4: tmpRole = "NON-PARTICIPANT" tmpText = tmpText + "ATTENDEE;CN=\"" + obj.attendeeName + "\";RSVP=TRUE;PARTSTAT=NEEDS-ACTION;ROLE=" + tmpRole + ":MAILTO:" + obj.attendeeEmail +"\n" tmpAgenda = "Agenda for " + tmpType + ": " + tmpSubject + ", " + tmpDate + ", " + tmpFromTime + "-" + tmpToTime + "\n\n" tmpCount = 1 tmpKeys = self.parentApp.agenda.keys() tmpKeys.sort() for id in tmpKeys: obj = self.parentApp.agenda[id] tmpText1 = "\t" + `tmpCount` + ". " + obj.details + "\n" tmpCount = tmpCount + 1 tmpAgenda = tmpAgenda + tmpText1 tmpDial = self.parentApp.meetingDialNum.get() if tmpDial != "": tmpAgenda = tmpAgenda + "\tDial " + tmpDial + "\n" tmpAccess = self.parentApp.meetingAccessCode.get() if tmpAccess != "": tmpAgenda = tmpAgenda + "\tAccess Code " + tmpAccess + "\n" tmpURL = self.parentApp.meetingURL.get() if tmpURL != "": tmpAgenda = tmpAgenda + "\tURL " + tmpURL + "\n" tmpText = tmpText + "DESCRIPTION;ENCODING=QUOTED-PRINTABLE:\"" + tmpAgenda + "\t\"\n" tmpText = tmpText + "TRANSP:OPAQUE" + "\n" tmpText = tmpText + "CATEGORIES;ENCODING=QUOTED-PRINTABLE:YaMA" + "\n" tmpText = tmpText + "STATUS:NEEDS-ACTION" + "\n" tmpText = tmpText + "PRIORITY:3" + "\n" tmpText = tmpText + "LOCATION:" + tmpLocation + "\n" tmpText = tmpText + "CLASS:PUBLIC" + "\n" tmpText = tmpText + "BEGIN:VALARM" + "\n" tmpText = tmpText + "TRIGGER:-PT15M" + "\n" tmpText = tmpText + "ACTION:DISPLAY" + "\n" tmpText = tmpText + "DESCRIPTION:Reminder" + "\n" tmpText = tmpText + "END:VALARM" + "\n" tmpText = tmpText + "END:VEVENT" + "\n" tmpText = tmpText + "END:VCALENDAR" + "\n" self.note.insert(END, "\nMeeting Invitation " + tmpSubject + " ") tmpFileName = os.tempnam (None, "YaMA-MI-") + ".ics" print tmpFileName tmpFd = open (tmpFileName, "w") tmpFd.write (tmpText) tmpFd.flush() tmpFd.close() #os.startfile (tmpFileName) self.note.insert(END, "exported to File:" + tmpFileName + "\n") self.note.insert(END, "\nYou may send the same attached to an email to notify attendees. In order that the attendees remember to add it to their calendars, it is suggested that you include the following text in the email:\n") self.note.insert(END, "\n\"Attached is an Invitation for a Meeting (in the iCalendar format). Please open it with your favorite calendaring application so as to mark your calendars. Do respond to the invitation as appropriate.\"\n") def commandOpenTemp(self): # find a way to do this cleanly in a crossplatform manner if os.name == "nt": tmpFileName = os.environ ['TMP'] os.startfile (tmpFileName) self.parentApp.updateMessage ("MSG_TMPLOCSUCC") else: self.parentApp.updateMessage ("MSG_OSRESTRICT") pass def show(self): #self.note.delete(1.0, END) self.parentApp.updateMessage ("MSG_FORTUNE_EXPORT") Form.show(self) class ParseActionsForm(Form): def __init__(self, parentApp, pageID): Form.__init__(self, parentApp, pageID) self.parentApp = parentApp self.parsedAIO = ActionPointObj() self.frame.rowconfigure(0, weight = 1) self.frame.columnconfigure(0, weight = 1) self.titlePanel = Frame (self.frame) self.titlePanel.grid(row=0, column=0, sticky=NSEW) self.titleLabel = Label(self.titlePanel, text="Parse Actions into YaMA", anchor=CENTER, font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+6, "bold")) self.titleLabel.pack(fill=X, anchor=W) self.logPanel = Frame (self.frame, border=5) self.logPanel.grid(row=1, column=0, sticky=NSEW) self.label4 = Label (self.logPanel, justify=LEFT, text = "Click 'Clear' for an empty input field. Paste the text for ONE Action Point from\nthe Minutes of a previous Meeting, and Click 'Parse'. Then choose from the options\nthat affect the Action Point properties and click 'Add to Minutes'.") self.label4.grid(row=1, column=0, sticky=W) self.clearButton = Button (self.logPanel, text="Clear", command=self.commandClear) self.clearButton.grid (row=2, column=0, sticky=W, pady=5) self.notePanel1 = Frame (self.logPanel) self.notePanel1.grid(row=3, column=0,sticky=W) self.noteScrollbar1 = Scrollbar (self.notePanel1) self.noteScrollbar1.pack(side=RIGHT, fill=Y) self.note1 = Text (self.notePanel1, height=10, width=80, yscrollcommand=self.noteScrollbar1.set, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.note1.pack(side=LEFT, fill=BOTH, expand=1) self.noteScrollbar1.config(command=self.note1.yview) self.parseButton = Button (self.logPanel, text="Parse", command=self.commandParse) self.parseButton.grid (row=4, column=0, sticky=W, pady=5) self.notePanel2 = Frame (self.logPanel) self.notePanel2.grid(row=5, column=0,sticky=W) self.noteScrollbar2 = Scrollbar (self.notePanel2) self.noteScrollbar2.pack(side=RIGHT, fill=Y) self.note2 = Text (self.notePanel2, height=10, width=80, bd=1, background="light grey", yscrollcommand=self.noteScrollbar2.set, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.note2.pack(side=LEFT, fill=BOTH, expand=1) self.noteScrollbar2.config(command=self.note2.yview) self.buttonPanel = Frame (self.logPanel) self.buttonPanel.grid (row=6, column=0, sticky=W) self.addToMinutes = Button (self.buttonPanel, text="Add to Minutes", command=self.commandAddToMinutes) self.addToMinutes.grid (row=0, column=0, pady=5) self.changeToANewID = IntVar() self.changeIDCheck = Checkbutton (self.buttonPanel, text="Generate A New ID", variable = self.changeToANewID) self.changeIDCheck.grid (row=0, column=1) self.changeToANewDate = IntVar() self.changeDateCheck = Checkbutton (self.buttonPanel, text="Set A New Closure Date", variable = self.changeToANewDate) self.changeDateCheck.grid (row=0, column=2) self.eedStr = StringVar() self.eedStr.set (self.parentApp.skeletonDateStr) self.eedEntry = Entry (self.buttonPanel, width=12, textvariable=self.eedStr, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.eedEntry.grid(row=0, column=3) self.todayButton = Button (self.buttonPanel, text="<< Today",command=self.commandToday) self.todayButton.grid(row=0, column=4, pady=5, padx=5) self.useMatchingNick = IntVar() self.useMatchingNick.set(1) self.matchingNickCheck = Checkbutton (self.buttonPanel, text="Use matching name from Attendee List", variable = self.useMatchingNick) self.matchingNickCheck.grid (row=1, column=1, columnspan=2, sticky=W) def changeFontSize(self): self.note1.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.note2.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.eedEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) def commandAddToMinutes(self): needsUpdate = 0 needsReset = 0 if "" == self.parsedAIO.ID: self.parentApp.updateMessage ("ERR_AP_PARSE_TO_ADD") return if 1 == self.changeToANewDate.get(): self.parsedAIO.expEndDate = self.eedEntry.get() if "" == self.parsedAIO.expEndDate or self.parentApp.skeletonDateStr == self.parsedAIO.expEndDate: self.parentApp.updateMessage ("ERR_FIELD_EMPTY", "New Closure Date") return needsUpdate = 1 if 1 == self.changeToANewID.get(): #if past reference is empty, set it to the current ID before updating if "" == self.parsedAIO.pastRef: self.parsedAIO.pastRef = self.parsedAIO.ID self.parsedAIO.ID = self.parentApp.generateActionPointID () needsReset = 1 self.note2.delete(1.0, END) tmpMatchingNickFound = FALSE if 1 == self.useMatchingNick.get(): tmpKeys = self.parentApp.attendees.keys() for id in tmpKeys: obj = self.parentApp.attendees[id] if obj.attendeeNick == self.parsedAIO.contactNick: self.parsedAIO.contactName = obj.attendeeName self.parsedAIO.contactEmail = obj.attendeeEmail tmpMatchingNickFound = TRUE break if TRUE == tmpMatchingNickFound: self.note2.insert(END, "Using matching Attendee information: " + self.parsedAIO.contactName + "<" + self.parsedAIO.contactEmail + ">\n") else: self.note2.insert(END, "No matching Attendee found.\n") if 1 == needsReset: self.parsedAIO.updateID = 0 elif 1 == needsUpdate: self.parsedAIO.updateID = self.parsedAIO.updateID + 1 idStr = self.parentApp.addActionPoint(self.parsedAIO) print idStr str = idStr + ". "+ self.parsedAIO.details self.parentApp.pageList["ActionPoints"].list.insert(END, str) self.note2.insert(END, "Action Point " + self.parsedAIO.ID + " added to Minutes\n") #reset data structure contents self.parsedAIO = ActionPointObj() def commandClear(self): self.note1.delete(1.0, END) def commandParse(self): str = self.note1.get(1.0, END) if str == "" or str == "\n": self.parentApp.updateMessage ("ERR_FIELD_EMPTY") return if str != "": #print str strlist = string.split (str, "\n") #print strlist try: strlist1 = string.split (strlist[0], "ID: ") self.parsedAIO.ID = strlist1[1] self.parsedAIO.contactName = "" self.parsedAIO.contactEmail = "" self.parsedAIO.updateID = 0 self.parsedAIO.percentComplete = 0 for substr in strlist[1:]: #print substr if "" == substr: continue if "Contact:" in substr: strlist1 = string.split (substr, "Contact: ") #print strlist1 self.parsedAIO.contactNick = strlist1[1] elif "Expected Closure Date:" in substr: strlist1 = string.split (substr, "Expected Closure Date: ") #print strlist1 self.parsedAIO.expEndDate = strlist1[1] elif "Past Reference:" in substr: strlist1 = string.split (substr, "Past Reference: ") #print strlist1 self.parsedAIO.pastRef = strlist1[1] elif "External Reference:" in substr: strlist1 = string.split (substr, "External Reference: ") #print strlist1 self.parsedAIO.extRef = strlist1[1] elif "Update ID:" in substr: strlist1 = string.split (substr, "Update ID: ") #print strlist1 self.parsedAIO.updateID = int(strlist1[1]) elif "Percent Complete:" in substr: strlist1 = string.split (substr, "Percent Complete: ") #print strlist1 self.parsedAIO.percentComplete = int(strlist1[1]) elif "Actual Completion Date:" in substr: strlist1 = string.split (substr, "Actual Completion Date: ") #print strlist1 self.parsedAIO.actualCompletionDate = strlist1[1] else: #print "Yoyo" + substr self.parsedAIO.details = substr except: self.note2.delete(1.0, END) self.note2.insert(END, "The Action Point could not be parsed correctly, please check and try again.\n") else: self.note2.delete(1.0, END) self.note2.insert(END, "The following data is recognized...\n") self.note2.insert(END, self.parsedAIO.previewText() + "\n") if "" == self.parsedAIO.ID: self.note2.insert(END, "Warning: Action Point does not have an ID\n") if "" == self.parsedAIO.details: self.note2.insert(END, "Warning: Action Point does not have the Action Text\n") def commandToday(self): today = date.today() self.eedStr.set (today.isoformat()) def show(self): #self.note.delete(1.0, END) self.parentApp.updateMessage ("MSG_FORTUNE_PARSE") Form.show(self) class OptionsForm(Form): def __init__(self, parentApp, pageID): Form.__init__(self, parentApp, pageID) self.parentApp = parentApp self.parsedAIO = ActionPointObj() self.frame.rowconfigure(0, weight = 1) self.frame.columnconfigure(0, weight = 1) self.titlePanel = Frame (self.frame) self.titlePanel.grid(row=0, column=0, sticky=NSEW) self.titleLabel = Label(self.titlePanel, text="Options", anchor=CENTER, font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+6, "bold")) self.titleLabel.pack(fill=X, anchor=W) self.optionsPanel = Frame (self.frame, border=5) self.optionsPanel.grid(row=1, column=0, sticky=NSEW) self.publishPanel = Frame (self.optionsPanel) self.publishPanel.grid (row=0, column=0, sticky=W) self.publishOptionsLabel = Label (self.publishPanel, text="Publish Minutes Preview:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.publishOptionsLabel.grid (row=0, column=0, sticky=W) self.startTitleWithDate = Checkbutton (self.publishPanel, text="Start Title with Date", variable = self.parentApp.dateInReportTitle) self.startTitleWithDate.grid (row=1, column=0, sticky=W) self.includeTimeInTitle = Checkbutton (self.publishPanel, text="Include Time in Title", variable = self.parentApp.timeInReportTitle) self.includeTimeInTitle.grid (row=1, column=1, sticky=W) self.locationInMinutes = Checkbutton (self.publishPanel, text="Include Location in Minutes", variable = self.parentApp.locationInMinutes) self.locationInMinutes.grid (row=1, column=2, sticky=W) self.nonAttendeesInReport = Checkbutton (self.publishPanel, text="Include Non-Attendees", variable = self.parentApp.nonAttendeesInReport) self.nonAttendeesInReport.grid (row=2, column=0, sticky=W) self.wikiFriendlyOutputInReport = Checkbutton (self.publishPanel, text="Wiki friendly text", variable = self.parentApp.wikiFriendlyOutputInReport) self.wikiFriendlyOutputInReport.grid (row=2, column=1, sticky=W) self.taglineInReport = Checkbutton (self.publishPanel, text="Include YaMA Tagline", variable = self.parentApp.taglineInReport) self.taglineInReport.grid (row=2, column=2, sticky=W) self.attendeePresenceInReport = Checkbutton (self.publishPanel, text="Include Attendee Presence", variable = self.parentApp.attendeePresenceInReport) self.attendeePresenceInReport.grid (row=3, column=0, sticky=W) self.meetingCostInReport = Checkbutton (self.publishPanel, text="Include Meeting Cost", variable = self.parentApp.meetingCostInReport) self.meetingCostInReport.grid (row=3, column=1, sticky=W) self.separatorButton = Button (self.optionsPanel, text="", relief=FLAT, bd=1) self.separatorButton.grid (row=1, column=0, columnspan=4) self.apIDPanel = Frame (self.optionsPanel) self.apIDPanel.grid (row=2, column=0, sticky=W) self.apIDFormatLabel = Label (self.apIDPanel, text="Action Point ID Format:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.apIDFormatLabel.grid (row=0, column=0, columnspan=3, sticky=W) self.useAPIDPrefixCheck = Checkbutton (self.apIDPanel, text="Use Prefix", variable = self.parentApp.optionUseAPIDPrefix) self.useAPIDPrefixCheck.grid (row=1, column=0, sticky=W) self.eedEntry = Entry (self.apIDPanel, width=12, textvariable=self.parentApp.optionAPIDPrefix, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.eedEntry.grid(row=1, column=1, sticky=W) self.useAPIDDateCheck = Checkbutton (self.apIDPanel, text="Use Date", variable = self.parentApp.optionUseAPIDDate) self.useAPIDDateCheck.grid (row=2, column=0, sticky=W) self.useAPIDCustomTokenCheck = Checkbutton (self.apIDPanel, text="Use Custom Token", variable = self.parentApp.optionUseAPIDCustomToken) self.useAPIDCustomTokenCheck.grid (row=3, column=0, sticky=W) self.tokenEntry = Entry (self.apIDPanel, width=12, textvariable=self.parentApp.optionAPIDCustomToken, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.tokenEntry.grid(row=3, column=1, sticky=W) self.separatorButton = Button (self.optionsPanel, text="", relief=FLAT, bd=1) self.separatorButton.grid (row=3, column=0, columnspan=4) self.wikiPanel = Frame (self.optionsPanel) self.wikiPanel.grid (row=4, column=0, sticky=W) self.wikiElementFormatLabel = Label (self.wikiPanel, text="Wiki Markup Element Format:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.wikiElementFormatLabel.grid (row=0, column=0, columnspan=3, sticky=W) self.tableHeaderCellSepLabel = Label (self.wikiPanel, text="Table Header Cell Separator") self.tableHeaderCellSepLabel.grid (row=1, column=0, sticky=W) self.tableHdrCellEntry = Entry (self.wikiPanel, width=12, textvariable=self.parentApp.optionTableHeaderCellSeparator, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.tableHdrCellEntry.grid(row=1, column=1, sticky=W) self.tableCellSepLabel = Label (self.wikiPanel, text="Table Cell Separator") self.tableCellSepLabel.grid (row=2, column=0, sticky=W) self.tableCellEntry = Entry (self.wikiPanel, width=12, textvariable=self.parentApp.optionTableCellSeparator, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.tableCellEntry.grid(row=2, column=1, sticky=W) self.textBoldMarkStartLabel = Label (self.wikiPanel, text="Enclose Bold text within ") self.textBoldMarkStartLabel.grid (row=3, column=0, sticky=W) self.textBoldMarkStartEntry = Entry (self.wikiPanel, width=12, textvariable=self.parentApp.optionWikiTextBoldMarkStart, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.textBoldMarkStartEntry.grid(row=3, column=1, sticky=W) self.textBoldMarkEndLabel = Label (self.wikiPanel, text=" and ") self.textBoldMarkEndLabel.grid (row=3, column=2, sticky=W) self.textBoldMarkEndEntry = Entry (self.wikiPanel, width=12, textvariable=self.parentApp.optionWikiTextBoldMarkEnd, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.textBoldMarkEndEntry.grid(row=3, column=3, sticky=W) self.textCRLFLabel = Label (self.wikiPanel, text="Indicate a CRLF using ") self.textCRLFLabel.grid (row=4, column=0, sticky=W) self.textCRLFEntry = Entry (self.wikiPanel, width=12, textvariable=self.parentApp.optionWikiTextCRLF, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.textCRLFEntry.grid(row=4, column=1, sticky=W) self.separatorButton = Button (self.optionsPanel, text="", relief=FLAT, bd=1) self.separatorButton.grid (row=5, column=0, columnspan=4) self.miscPanel = Frame (self.optionsPanel) self.miscPanel.grid (row=6, column=0, sticky=W) self.miscOptionsLabel = Label (self.miscPanel, text="Miscellaneous Options:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.miscOptionsLabel.grid (row=0, column=0, columnspan=3, sticky=W) self.attendeeCostUnitsLabel = Label (self.miscPanel, text="Attendee Cost Units") self.attendeeCostUnitsLabel.grid (row=1, column=0, sticky=W) self.attendeeCostUnitsEntry = Entry (self.miscPanel, width=12, textvariable=self.parentApp.attendeeCostUnitsStr, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.attendeeCostUnitsEntry.grid(row=1, column=1, sticky=W) self.separatorButton = Button (self.optionsPanel, text="", relief=FLAT, bd=1) self.separatorButton.grid (row=7, column=0, columnspan=4) self.buttonPanel = Frame (self.optionsPanel) self.buttonPanel.grid(row=8, column=0, columnspan=4) self.saveButton = Button (self.buttonPanel, text="Save Options To ...", command=self.commandSave) self.saveButton.grid (row=0, column=0, sticky=W, padx=5, pady=5) self.loadButton = Button (self.buttonPanel, text="Load Options From ...", command=self.commandLoad) self.loadButton.grid (row=0, column=3, sticky=E, padx=5, pady=5) def changeFontSize(self): self.eedEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.tokenEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.tableHdrCellEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.tableCellEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.textBoldMarkStartEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.textBoldMarkEndEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.textCRLFEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.attendeeCostUnitsEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) def commandLoad(self): currentVersionFound = False fileName = tkFileDialog.askopenfilename (parent=self.parentApp.master, title='Load From', filetypes=[('YaMA Text Files','*.yama.txt'),('All Files','*.*')]) if fileName != None and fileName != '': #print fileName fdInFile = open(fileName, "r") tmpstr = fdInFile.readline() count = 0 while tmpstr: #try to find the current version number in the header comments of the file if "#" in tmpstr: if "v" + self.parentApp.yama_version in tmpstr: currentVersionFound = True tmpstr = fdInFile.readline() continue #initial header comments over, if current version is not yet found, #its either an older file or may even be corrupt if False == currentVersionFound: self.parentApp.updateMessage ("ERR_IMPORT_FILE_OLDER_OR_CORRUPT") break if not "#" in tmpstr: strlist = string.split (tmpstr, '\n') strlist0 = string.split (strlist[0], '=') str0 = strlist0[0] str1 = strlist0[1] if "StartTitleWithDate" == str0: if str1 != "": val = int(str1) if not val in [0,1]: val = 0 else: val = 0 self.parentApp.dateInReportTitle.set(val) elif "IncludeTimeInTitle" == str0: if str1 != "": val = int(str1) if not val in [0,1]: val = 0 else: val = 0 self.parentApp.timeInReportTitle.set(val) elif "LocationInMinutes" == str0: if str1 != "": val = int(str1) if not val in [0,1]: val = 1 else: val = 1 self.parentApp.locationInMinutes.set(val) elif "NonAttendeesInReport" == str0: if str1 != "": val = int(str1) if not val in [0,1]: val = 1 else: val = 1 self.parentApp.nonAttendeesInReport.set(val) elif "WikiFriendlyOutputInReport" == str0: if str1 != "": val = int(str1) if not val in [0,1]: val = 0 else: val = 0 self.parentApp.wikiFriendlyOutputInReport.set(val) elif "TaglineInReport" == str0: if str1 != "": val = int(str1) if not val in [0,1]: val = 1 else: val = 1 self.parentApp.taglineInReport.set(val) elif "AttendeePresenceInReport" == str0: if str1 != "": val = int(str1) if not val in [0,1]: val = 1 else: val = 1 self.parentApp.attendeePresenceInReport.set(val) elif "MeetingCostInReport" == str0: if str1 != "": val = int(str1) if not val in [0,1]: val = 0 else: val = 0 self.parentApp.meetingCostInReport.set(val) elif "UseAPIDPrefix" == str0: if str1 != "": val = int(str1) if not val in [0,1]: val = 1 else: val = 1 self.parentApp.optionUseAPIDPrefix.set(val) elif "APIDPrefix" == str0: if str1 != "": val1 = str1 else: val = "AP" self.parentApp.optionAPIDPrefix.set(val1) elif "UseAPIDDate" == str0: if str1 != "": val = int(str1) if not val in [0,1]: val = 1 else: val = 1 self.parentApp.optionUseAPIDDate.set(val) elif "UseAPIDCustomToken" == str0: if str1 != "": val = int(str1) if not val in [0,1]: val = 0 else: val = 0 self.parentApp.optionUseAPIDCustomToken.set(val) elif "APIDCustomToken" == str0: if str1 != "": val1 = str1 else: val = "Task" self.parentApp.optionAPIDCustomToken.set(val1) elif "WikiTableHeaderCellSeparator" == str0: if str1 != "": val1 = str1 else: val = "||" self.parentApp.optionTableHeaderCellSeparator.set(val1) elif "WikiTableCellSeparator" == str0: if str1 != "": val1 = str1 else: val = "||" self.parentApp.optionTableCellSeparator.set(val1) elif "WikiTextBoldMarkStart" == str0: if str1 != "": val1 = str1 else: val = "'''" self.parentApp.optionWikiTextBoldMarkStart.set(val1) elif "WikiTextBoldMarkEnd" == str0: if str1 != "": val1 = str1 else: val = "'''" self.parentApp.optionWikiTextBoldMarkEnd.set(val1) elif "WikiTextCRLF" == str0: if str1 != "": val1 = str1 else: val = "[[BR]]" self.parentApp.optionWikiTextCRLF.set(val1) elif "MiscAttendeeCostUnits" == str0: if str1 != "": val1 = str1 else: val = "Rupees" self.parentApp.attendeeCostUnitsStr.set(val1) else: print "Unknown Token !!" tmpstr = fdInFile.readline() fdInFile.close() def commandSave(self): fileName = tkFileDialog.asksaveasfilename (parent=self.parentApp.master, title='Save To', filetypes=[('YaMA Text Files','*.yama.txt'),('All Files','*.*')]) if fileName != None and fileName != '': #print fileName fdOutFile = open(fileName, "w") fdOutFile.write("#YaMA Options File Generated by " + self.parentApp.yama_copyright + " \n") fdOutFile.write("#The following Options are valid:" + "\n") fdOutFile.write("#StartTitleWithDate=0 for False, =1 for True" + "\n") fdOutFile.write("#IncludeTimeInTitle=0 for False, =1 for True" + "\n") fdOutFile.write("#LocationInMinutes=0 for False, =1 for True" + "\n") fdOutFile.write("#NonAttendeesInReport=0 for False, =1 for True" + "\n") fdOutFile.write("#WikiFriendlyOutputInReport=0 for False, =1 for True" + "\n") fdOutFile.write("#TaglineInReport=0 for False, =1 for True" + "\n") fdOutFile.write("#AttendeePresenceInReport=0 for False, =1 for True" + "\n") fdOutFile.write("#MeetingCostInReport=0 for False, =1 for True" + "\n") fdOutFile.write("#UseAPIDPrefix=0 for False, =1 for True" + "\n") fdOutFile.write("#APIDPrefix=" + "\n") fdOutFile.write("#UseAPIDDate=0 for False, =1 for True" + "\n") fdOutFile.write("#UseAPIDCustomToken=0 for False, =1 for True" + "\n") fdOutFile.write("#APIDCustomToken=" + "\n") fdOutFile.write("#WikiTableHeaderCellSeparator=" + "\n") fdOutFile.write("#WikiTableCellSeparator=" + "\n") fdOutFile.write("#WikiTextBoldMarkStart=" + "\n") fdOutFile.write("#WikiTextBoldMarkEnd=" + "\n") fdOutFile.write("#WikiTextCRLF=" + "\n") fdOutFile.write("#MiscAttendeeCostUnits=" + "\n") fdOutFile.write("#This line intentionally kept as filler" + "\n") fdOutFile.write("StartTitleWithDate="+ `self.parentApp.dateInReportTitle.get()` + "\n") fdOutFile.write("IncludeTimeInTitle="+ `self.parentApp.timeInReportTitle.get()` + "\n") fdOutFile.write("LocationInMinutes="+ `self.parentApp.locationInMinutes.get()` + "\n") fdOutFile.write("NonAttendeesInReport="+ `self.parentApp.nonAttendeesInReport.get()` + "\n") fdOutFile.write("WikiFriendlyOutputInReport="+ `self.parentApp.wikiFriendlyOutputInReport.get()` + "\n") fdOutFile.write("TaglineInReport="+ `self.parentApp.taglineInReport.get()` + "\n") fdOutFile.write("AttendeePresenceInReport="+ `self.parentApp.attendeePresenceInReport.get()` + "\n") fdOutFile.write("MeetingCostInReport="+ `self.parentApp.meetingCostInReport.get()` + "\n") fdOutFile.write("UseAPIDPrefix="+ `self.parentApp.optionUseAPIDPrefix.get()` + "\n") fdOutFile.write("APIDPrefix="+ self.parentApp.optionAPIDPrefix.get() + "\n") fdOutFile.write("UseAPIDDate="+ `self.parentApp.optionUseAPIDDate.get()` + "\n") fdOutFile.write("UseAPIDCustomToken="+ `self.parentApp.optionUseAPIDCustomToken.get()` + "\n") fdOutFile.write("APIDCustomToken="+ self.parentApp.optionAPIDCustomToken.get() + "\n") fdOutFile.write("WikiTableHeaderCellSeparator="+ self.parentApp.optionTableHeaderCellSeparator.get() + "\n") fdOutFile.write("WikiTableCellSeparator="+ self.parentApp.optionTableCellSeparator.get() + "\n") fdOutFile.write("WikiTextBoldMarkStart="+ self.parentApp.optionWikiTextBoldMarkStart.get() + "\n") fdOutFile.write("WikiTextBoldMarkEnd="+ self.parentApp.optionWikiTextBoldMarkEnd.get() + "\n") fdOutFile.write("WikiTextCRLF="+ self.parentApp.optionWikiTextCRLF.get() + "\n") fdOutFile.write("MiscAttendeeCostUnits="+ self.parentApp.attendeeCostUnitsStr.get() + "\n") fdOutFile.close() def show(self): self.parentApp.updateMessage ("MSG_FORTUNE_OPTIONS") Form.show(self) class ActionPointsForm(Form): def __init__(self, parentApp, pageID): Form.__init__(self, parentApp, pageID) self.parentApp = parentApp self.frame.rowconfigure(0, weight = 1) self.frame.columnconfigure(0, weight = 1) self.titlePanel = Frame (self.frame) self.titlePanel.grid(row=0, column=0, sticky=NSEW, columnspan=3) self.titleLabel = Label(self.titlePanel, text="Actions: Record the Action Points", anchor=CENTER, font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+6, "bold")) self.titleLabel.pack(fill=X, anchor=W) self.aiOuterPanel = Frame (self.frame, border=5) self.aiOuterPanel.grid(row=1, column=0) self.idPanel = Frame (self.aiOuterPanel) self.idPanel.grid(row=0, column=0) self.idLabel = Label (self.idPanel, text="ID:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.idLabel.grid (row=0, column=0, sticky=NSEW) self.idStr = StringVar() self.idEntry = Entry (self.idPanel, textvariable=self.idStr, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.idEntry.grid(row=0, column=1) self.generateButton = Button (self.idPanel, text="<< Generate",command=self.commandGenerate) self.generateButton.grid(row=0, column=2, sticky=W, padx=5) self.contactNameLabel = Label (self.idPanel, text="Contact:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.contactNameLabel.grid (row=1, column=0, sticky=NSEW) self.contactNickStr = StringVar() self.contactNickEntry = Entry (self.idPanel, width=15, textvariable=self.contactNickStr, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.contactNickEntry.grid(row=1, column=1, sticky=W) self.contactFullNameStr = StringVar() self.contactFullNameEntry = Entry (self.idPanel, width=20, textvariable=self.contactFullNameStr, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.contactFullNameEntry.grid(row=2, column=1, sticky=W) self.contactEmailLabel = Label (self.idPanel, text="Email:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.contactEmailLabel.grid (row=3, column=0, sticky=NSEW) self.contactEmailStr = StringVar() self.contactEmailEntry = Entry (self.idPanel, width=20, textvariable=self.contactEmailStr, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.contactEmailEntry.grid(row=3, column=1, sticky=W) self.ctListPanel = Frame (self.idPanel, border=5) self.ctListPanel.grid(row=1, column=2, rowspan=3) self.selectContactButton = Button (self.ctListPanel, text="<< Select",command=self.commandSelectContact) self.selectContactButton.grid(row=1, column=0, sticky=NSEW) self.ctListBoxPanel = Frame (self.ctListPanel) self.ctListBoxPanel.grid(row=0, column=0,sticky=NSEW) self.ctListScrollbar = Scrollbar (self.ctListBoxPanel) self.ctListScrollbar.pack(side=RIGHT, fill=Y) self.ctList = Listbox (self.ctListBoxPanel, height=5, width=10, yscrollcommand=self.ctListScrollbar.set, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.ctList.pack(side=LEFT, fill=BOTH, expand=1) self.ctListScrollbar.config(command=self.ctList.yview) self.eedLabel = Label (self.idPanel, text="Closure:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.eedLabel.grid (row=4, column=0, sticky=NSEW) self.eedStr = StringVar() self.eedStr.set (self.parentApp.skeletonDateStr) self.eedEntry = Entry (self.idPanel, textvariable=self.eedStr, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.eedEntry.grid(row=4, column=1) self.todayButton = Button (self.idPanel, text="<< Today",command=self.commandToday) self.todayButton.grid(row=4, column=2, sticky=W, padx=5) self.pastRefLabel = Label (self.idPanel, text="Past Ref:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.pastRefLabel.grid (row=5, column=0, sticky=NSEW) self.pastRefStr = StringVar() self.pastRefEntry = Entry (self.idPanel, textvariable=self.pastRefStr, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.pastRefEntry.grid(row=5, column=1) self.extRefLabel = Label (self.idPanel, text="Ext Ref:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.extRefLabel.grid (row=6, column=0, sticky=NSEW) self.extRefStr = StringVar() self.extRefEntry = Entry (self.idPanel, textvariable=self.extRefStr, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.extRefEntry.grid(row=6, column=1) self.updateIDPanel = Frame (self.idPanel) self.updateIDPanel.grid(row=7, column=0, columnspan=3) self.percentCompleteLabel = Label (self.updateIDPanel, text="% Complete:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.percentCompleteLabel.pack (side=LEFT, fill=X, expand=1) self.percentCompleteStr = StringVar() self.percentCompleteEntry = Entry (self.updateIDPanel, textvariable=self.percentCompleteStr, width=5, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.percentCompleteEntry.pack (side=LEFT, fill=X, expand=1) self.updateIDLabel = Label (self.updateIDPanel, text="Update ID:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.updateIDLabel.pack (side=LEFT, fill=X, expand=1) self.updateIDStr = StringVar() self.updateIDEntry = Entry (self.updateIDPanel, textvariable=self.updateIDStr, width=5, background="light grey", font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.updateIDEntry.pack (side=LEFT, fill=X, expand=1) self.aisPanel = Frame (self.aiOuterPanel) self.aisPanel.grid(row=1, column=0) self.aisLabel = Label (self.aisPanel, text="Action Point Text:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.aisLabel.grid(row=0, column=0, stick=W) self.notePanel = Frame (self.aisPanel) self.notePanel.grid(row=1, column=0,sticky=W) self.noteScrollbar = Scrollbar (self.notePanel) self.noteScrollbar.pack(side=RIGHT, fill=Y) self.note = Text (self.notePanel, height=4, width=45, yscrollcommand=self.noteScrollbar.set, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.note.pack(side=LEFT, fill=BOTH, expand=1) self.noteScrollbar.config(command=self.note.yview) self.buttonPanel = Frame (self.frame, borderwidth=10) self.buttonPanel.grid(row=1, column=1) self.addActionPoint = Button (self.buttonPanel, text="Save >>\nTo List",command=self.commandAddActionPoint) self.addActionPoint.pack(side=TOP, fill=BOTH, expand=1) self.editSelected = Button (self.buttonPanel, text="<< Edit \nSelected",command=self.commandEditSelected) self.editSelected.pack(side=TOP, fill=BOTH, expand=1) self.copySelected = Button (self.buttonPanel, text="<= Copy \nSelected",command=self.commandCopySelected) self.copySelected.pack(side=TOP, fill=BOTH, expand=1) self.delSelected = Button (self.buttonPanel, text="Delete \nSelected",command=self.commandDelSelected) self.delSelected.pack(side=TOP, fill=BOTH, expand=1) self.previewSelected = Button (self.buttonPanel, text="Preview \nSelected",command=self.commandPreviewSelected) self.previewSelected.pack(side=TOP, fill=BOTH, expand=1) self.listPanel = Frame (self.frame, border=5) self.listPanel.grid(row=1, column=2) self.listLabel = Label(self.listPanel, text="Actions List:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.listLabel.grid(row=0, column=0,sticky=W) self.listBoxPanel = Frame (self.listPanel) self.listBoxPanel.grid(row=1, column=0, columnspan=2, sticky=W) self.listScrollbar = Scrollbar (self.listBoxPanel) self.listScrollbar.pack(side=RIGHT, fill=Y) self.list = Listbox (self.listBoxPanel, height=17, width=25, yscrollcommand=self.listScrollbar.set, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.list.pack(side=LEFT, fill=BOTH, expand=1) self.listScrollbar.config(command=self.list.yview) self.importAListButton = Button (self.listPanel, text="Import (CSV) ...",command=self.commandImport) self.importAListButton.grid(row=2, column=0, sticky=S, pady=5) self.exportAListButton = Button (self.listPanel, text="Export (CSV) ...",command=self.commandExport) self.exportAListButton.grid(row=3, column=0, sticky=S, pady=5) self.previewPanel = Frame (self.frame, border=5) self.previewPanel.grid(row=2, column=0, columnspan=3) self.previewLabel = Label (self.previewPanel, text="Preview:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.previewLabel.grid(row=0, column=0, sticky=W) self.previewTextPanel = Frame (self.previewPanel) self.previewTextPanel.grid(row=1, column=0, sticky=W) self.previewScrollbar = Scrollbar (self.previewTextPanel) self.previewScrollbar.pack(side=RIGHT, fill=Y) self.previewText = Text (self.previewTextPanel, height=9, width=85, bd=1, background="light grey", yscrollcommand=self.previewScrollbar.set, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.previewText.pack(side=LEFT, fill=BOTH, expand=1) self.previewScrollbar.config(command=self.previewText.yview) def changeFontSize(self): self.idEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.contactNickEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.contactFullNameEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.contactEmailEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.eedEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.pastRefEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.extRefEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.updateIDEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.percentCompleteEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.note.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.list.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.ctList.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.previewText.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) def commandAddActionPoint(self): str = self.idStr.get() if str == "" or str == "\n": self.parentApp.updateMessage ("ERR_FIELD_EMPTY", "ID") return str = self.note.get(1.0, END) if str == "" or str == "\n": self.parentApp.updateMessage ("ERR_FIELD_EMPTY", "Action Point Text") return if str != "": aio = ActionPointObj() aio.details = str aio.ID = self.idStr.get() aio.contactNick = self.contactNickStr.get() aio.contactName = self.contactFullNameStr.get() aio.contactEmail = self.contactEmailStr.get() aio.expEndDate = self.eedStr.get() aio.pastRef = self.pastRefStr.get() aio.extRef = self.extRefStr.get() if "" == self.updateIDStr.get(): aio.updateID = 0 else: aio.updateID = int(self.updateIDStr.get()) # since this was previously set, it means an AI has been edited and # is being saved again. hence bump up the updateID aio.updateID = aio.updateID + 1 if "" == self.percentCompleteStr.get(): aio.percentComplete = 0 else: aio.percentComplete = int(self.percentCompleteStr.get()) # while saving, check if percent complete is 100 # if yes, actual completion date should be set to now if 100 == aio.percentComplete: today = date.today() aio.actualCompletionDate = today.strftime ("%Y") + "-" + today.strftime ("%m") + "-" + today.strftime ("%d") idStr = self.parentApp.addActionPoint(aio) str = idStr + ". "+ str self.list.insert(END, str) self.note.delete(1.0, END) self.idStr.set("") self.contactNickStr.set("") self.contactFullNameStr.set("") self.contactEmailStr.set("") self.eedStr.set(self.parentApp.skeletonDateStr) self.pastRefStr.set("") self.extRefStr.set("") self.updateIDStr.set("") self.percentCompleteStr.set("") def commandSelectContact(self): items = self.ctList.curselection() if len (items) > 0: tmpstr = self.ctList.get(items[0]) strlist = string.split(tmpstr, ".") self.contactNickStr.set(self.parentApp.attendees[strlist[0]].attendeeNick) self.contactFullNameStr.set(self.parentApp.attendees[strlist[0]].attendeeName) self.contactEmailStr.set(self.parentApp.attendees[strlist[0]].attendeeEmail) def commandToday(self): today = date.today() self.eedStr.set (today.isoformat()) def commandGenerate(self): self.idStr.set (self.parentApp.generateActionPointID()) def commandPreviewSelected(self): items = self.list.curselection() if len (items) > 0: tmpstr = self.list.get(items[0]) strlist = string.split(tmpstr, ".") self.previewText.delete (1.0,END) self.previewText.insert(END, self.parentApp.actionItems[strlist[0]].previewText()) else: self.parentApp.updateMessage ("ERR_AP_PARSE_TO_PREVIEW") def commandEditSelected(self): items = self.list.curselection() if len (items) > 0: tmpstr = self.list.get(items[0]) strlist = string.split(tmpstr, ".") aio = self.parentApp.actionItems[strlist[0]] self.note.delete(1.0, END) self.note.insert(END, aio.details) self.idStr.set(aio.ID) self.contactNickStr.set(aio.contactNick) self.contactFullNameStr.set(aio.contactName) self.contactEmailStr.set(aio.contactEmail) self.eedStr.set(aio.expEndDate) self.pastRefStr.set(aio.pastRef) self.extRefStr.set(aio.extRef) self.updateIDStr.set (`aio.updateID`) self.percentCompleteStr.set (`aio.percentComplete`) self.parentApp.delActionPoint(strlist[0]) self.list.delete(ANCHOR) def commandCopySelected(self): items = self.list.curselection() if len (items) > 0: tmpstr = self.list.get(items[0]) strlist = string.split(tmpstr, ".") aio = self.parentApp.actionItems[strlist[0]] self.note.delete(1.0, END) self.note.insert(END, aio.details) self.idStr.set(aio.ID) self.contactNickStr.set(aio.contactNick) self.contactFullNameStr.set(aio.contactName) self.contactEmailStr.set(aio.contactEmail) self.eedStr.set(aio.expEndDate) self.pastRefStr.set(aio.pastRef) self.extRefStr.set(aio.extRef) # since a copy is being made of an existing AP, # the updateID has to be reset, it cannot be the same as the original self.updateIDStr.set("") self.percentCompleteStr.set(`aio.percentComplete`) def commandDelSelected(self): items = self.list.curselection() if len (items) > 0: tmpstr = self.list.get(items[0]) strlist = string.split(tmpstr, ".") self.parentApp.delActionPoint(strlist[0]) self.list.delete(ANCHOR) def show(self): self.ctList.delete(0, END) tmpKeys = self.parentApp.attendees.keys() tmpKeys.sort() for id in tmpKeys: obj = self.parentApp.attendees[id] self.ctList.insert (END, id + "." + obj.attendeeNick) self.ctList.selection_anchor(0) self.parentApp.updateMessage ("MSG_FORTUNE_ACTIONS") Form.show(self) def commandImport(self): fileName = tkFileDialog.askopenfilename (parent=self.parentApp.master, title='Import From', filetypes=[('Comma Separated Values','*.csv'),('All Files','*.*')]) if fileName != None and fileName != '': print fileName fdInFile = open(fileName, "r") tmpstr = fdInFile.readline() count = 0 while tmpstr: if not "#" in tmpstr and 0 == tmpstr.isspace(): strlist = string.split (tmpstr, '\n') strlist0 = string.split (strlist[0], ',') str0 = strlist0[0] str1 = strlist0[1] str2 = strlist0[2] str3 = strlist0[3] str4 = strlist0[4] str5 = strlist0[5] str6 = strlist0[6] str7 = strlist0[7] str8 = strlist0[8] str9 = strlist0[9] if str0 != "": aio = ActionPointObj() aio.contactNick = str0 if "" != str1: aio.contactName = str1 if "" != str2: aio.contactEmail = str2 if "" != str3: aio.expEndDate = str3 if "" != str4: aio.percentComplete = int (str4) if "" != str5: aio.actualCompletionDate = str5 if "" != str6: aio.pastRef = str6 if "" != str7: aio.extRef = str7 if "" != str8: aio.updateID = int (str8) aio.details = str9 count = count +1 dispStr = str9 idStr = self.parentApp.addActionPoint(aio) dispStr = idStr + ". " + dispStr self.list.insert(END, dispStr) tmpstr = fdInFile.readline() fdInFile.close() def commandExport(self): fileName = tkFileDialog.asksaveasfilename (parent=self.parentApp.master, title='Export To', filetypes=[('Comma Separated Values','*.csv'),('All Files','*.*')]) if fileName != None and fileName != '': #print fileName fdOutFile = open(fileName, "w") fdOutFile.write("#Generated by " + self.parentApp.yama_copyright + ", " + `self.parentApp.actionItemCount` + " action points, Please ensure you keep the order of the fields as is in order to import back into YaMA\n") fdOutFile.write("#NickName,Full Name,Email,Expected End Date,Percent Complete,Actual Completion Date,Past Reference,External Reference,UpdateID,Details" + "\n") tmpKeys = self.parentApp.actionItems.keys() tmpKeys.sort() for id in tmpKeys: rec = self.parentApp.actionItems[id] #print rec.previewText() fdOutFile.write(rec.contactNick + "," + rec.contactName + "," + rec.contactEmail + "," + rec.expEndDate + ","+ `rec.percentComplete` + "," + rec.actualCompletionDate + "," + rec.pastRef + "," + rec.extRef + "," + `rec.updateID` + "," + rec.details + "\n") fdOutFile.close() class DecisionsForm(Form): def __init__(self, parentApp, pageID): Form.__init__(self, parentApp, pageID) self.parentApp = parentApp self.savedIdStr = "" self.frame.rowconfigure(0, weight = 1) self.frame.columnconfigure(0, weight = 1) self.titlePanel = Frame (self.frame) self.titlePanel.grid(row=0, column=0, columnspan=3, sticky=NSEW) self.titleLabel = Label(self.titlePanel, text="Decisions: Record the decisions reached", anchor=CENTER, font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+6, "bold")) self.titleLabel.pack(fill=X, anchor=W) self.decisionsPanel = Frame (self.frame, border=5) self.decisionsPanel.grid(row=1, column=0) self.contactPanel = Frame (self.decisionsPanel) self.contactPanel.grid(row=0, column=0) self.contactNameLabel = Label (self.contactPanel, text="Contact:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.contactNameLabel.grid (row=0, column=0, sticky=NSEW) self.contactNickStr = StringVar() self.contactNickEntry = Entry (self.contactPanel, width=15,textvariable=self.contactNickStr, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.contactNickEntry.grid(row=0, column=1, sticky=W) self.contactFullNameStr = StringVar() self.contactFullNameEntry = Entry (self.contactPanel, width=20, textvariable=self.contactFullNameStr, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.contactFullNameEntry.grid(row=1, column=1, sticky=W) self.contactEmailLabel = Label (self.contactPanel, text="Email:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.contactEmailLabel.grid (row=2, column=0, sticky=NSEW) self.contactEmailStr = StringVar() self.contactEmailEntry = Entry (self.contactPanel, width=20, textvariable=self.contactEmailStr, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.contactEmailEntry.grid(row=2, column=1, sticky=W) self.ctListPanel = Frame (self.contactPanel, border=5) self.ctListPanel.grid(row=0, column=2, rowspan=3) self.selectContactButton = Button (self.ctListPanel, text="<< Select",command=self.commandSelectContact) self.selectContactButton.grid(row=1, column=0, sticky=NSEW) self.ctListBoxPanel = Frame (self.ctListPanel) self.ctListBoxPanel.grid(row=0, column=0,sticky=NSEW) self.ctListScrollbar = Scrollbar (self.ctListBoxPanel) self.ctListScrollbar.pack(side=RIGHT, fill=Y) self.ctList = Listbox (self.ctListBoxPanel, height=5, width=10, yscrollcommand=self.ctListScrollbar.set, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.ctList.pack(side=LEFT, fill=BOTH, expand=1) self.ctListScrollbar.config(command=self.ctList.yview) self.decisionLabel = Label (self.decisionsPanel, text="Decision Text:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.decisionLabel.grid(row=1, column=0, stick=W) self.notePanel = Frame (self.decisionsPanel) self.notePanel.grid(row=2, column=0,sticky=W) self.noteScrollbar = Scrollbar (self.notePanel) self.noteScrollbar.pack(side=RIGHT, fill=Y) self.note = Text (self.notePanel, height=10, width=45, yscrollcommand=self.noteScrollbar.set, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.note.pack(side=LEFT, fill=BOTH, expand=1) self.noteScrollbar.config(command=self.note.yview) self.buttonPanel = Frame (self.frame, borderwidth=10) self.buttonPanel.grid(row=1, column=1) self.addDecision = Button (self.buttonPanel, text="Save >>\nTo List",command=self.commandAddDecision) self.addDecision.pack(side=TOP, fill=BOTH, expand=1) self.editSelected = Button (self.buttonPanel, text="<< Edit \nSelected",command=self.commandEditSelected) self.editSelected.pack(side=TOP, fill=BOTH, expand=1) self.copySelected = Button (self.buttonPanel, text="<= Copy \nSelected",command=self.commandCopySelected) self.copySelected.pack(side=TOP, fill=BOTH, expand=1) self.delSelected = Button (self.buttonPanel, text="Delete \nSelected",command=self.commandDelSelected) self.delSelected.pack(side=TOP, fill=BOTH, expand=1) self.previewSelected = Button (self.buttonPanel, text="Preview \nSelected",command=self.commandPreviewSelected) self.previewSelected.pack(side=TOP, fill=BOTH, expand=1) self.listPanel = Frame (self.frame, border=5) self.listPanel.grid(row=1, column=2) self.listLabel = Label(self.listPanel, text="Decision List:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.listLabel.grid(row=0, column=0,sticky=W) self.listBoxPanel = Frame (self.listPanel) self.listBoxPanel.grid(row=1, column=0,sticky=W) self.listScrollbar = Scrollbar (self.listBoxPanel) self.listScrollbar.pack(side=RIGHT, fill=Y) self.list = Listbox (self.listBoxPanel, height=15, width=25, yscrollcommand=self.listScrollbar.set, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.list.pack(side=LEFT, fill=BOTH, expand=1) self.listScrollbar.config(command=self.list.yview) self.previewPanel = Frame (self.frame, border=5) self.previewPanel.grid(row=2, column=0, columnspan=3) self.previewLabel = Label (self.previewPanel, text="Preview:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.previewLabel.grid(row=0, column=0, sticky=W) self.previewTextPanel = Frame (self.previewPanel) self.previewTextPanel.grid(row=1, column=0, sticky=W) self.previewScrollbar = Scrollbar (self.previewTextPanel) self.previewScrollbar.pack(side=RIGHT, fill=Y) self.previewText = Text (self.previewTextPanel, height=10, width=85, bd=1, background="light grey", yscrollcommand=self.previewScrollbar.set, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.previewText.pack(side=LEFT, fill=BOTH, expand=1) self.previewScrollbar.config(command=self.previewText.yview) def changeFontSize(self): self.contactNickEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.contactFullNameEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.contactEmailEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.note.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.list.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.ctList.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.previewText.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) def commandAddDecision(self): str = self.contactNickEntry.get() if str == "" or str == "\n": self.parentApp.updateMessage ("ERR_FIELD_EMPTY", "Contact") return str = self.note.get(1.0, END) if str == "" or str == "\n": self.parentApp.updateMessage ("ERR_FIELD_EMPTY", "Decision Text") return if str != "": do = DecisionObj() do.details = str do.contactNick = self.contactNickStr.get() do.contactName = self.contactFullNameStr.get() do.contactEmail = self.contactEmailStr.get() idStr = self.parentApp.addDecision(do, self.savedIdStr) str = idStr + ". "+ str self.list.insert(END, str) self.note.delete(1.0, END) self.contactNickStr.set("") self.contactFullNameStr.set("") self.contactEmailStr.set("") self.savedIdStr = "" def commandSelectContact(self): items = self.ctList.curselection() if len (items) > 0: tmpstr = self.ctList.get(items[0]) strlist = string.split(tmpstr, ".") self.contactNickStr.set(self.parentApp.attendees[strlist[0]].attendeeNick) self.contactFullNameStr.set(self.parentApp.attendees[strlist[0]].attendeeName) self.contactEmailStr.set(self.parentApp.attendees[strlist[0]].attendeeEmail) def commandPreviewSelected(self): items = self.list.curselection() if len (items) > 0: tmpstr = self.list.get(items[0]) strlist = string.split(tmpstr, ".") self.previewText.delete (1.0,END) self.previewText.insert(END, self.parentApp.decisions[strlist[0]].previewText()) else: self.parentApp.updateMessage ("ERR_AP_PARSE_TO_PREVIEW") def commandEditSelected(self): items = self.list.curselection() if len (items) > 0: tmpstr = self.list.get(items[0]) strlist = string.split(tmpstr, ".") do = self.parentApp.decisions[strlist[0]] self.note.delete(1.0, END) self.note.insert(END, do.details) self.contactNickStr.set(do.contactNick) self.contactFullNameStr.set(do.contactName) self.contactEmailStr.set(do.contactEmail) self.parentApp.delDecision(strlist[0]) self.list.delete(ANCHOR) self.savedIdStr = strlist[0] def commandCopySelected(self): items = self.list.curselection() if len (items) > 0: tmpstr = self.list.get(items[0]) strlist = string.split(tmpstr, ".") do = self.parentApp.decisions[strlist[0]] self.note.delete(1.0, END) self.note.insert(END, do.details) self.contactNickStr.set(do.contactNick) self.contactFullNameStr.set(do.contactName) self.contactEmailStr.set(do.contactEmail) def commandDelSelected(self): items = self.list.curselection() if len (items) > 0: tmpstr = self.list.get(items[0]) strlist = string.split(tmpstr, ".") self.parentApp.delDecision(strlist[0]) self.list.delete(ANCHOR) def show(self): self.ctList.delete(0, END) tmpKeys = self.parentApp.attendees.keys() tmpKeys.sort() for id in tmpKeys: obj = self.parentApp.attendees[id] self.ctList.insert (END, id + "." + obj.attendeeNick) self.ctList.selection_anchor(0) self.parentApp.updateMessage ("MSG_FORTUNE_DECISIONS") Form.show(self) class AgendaForm(Form): def __init__(self, parentApp, pageID): Form.__init__(self, parentApp, pageID) self.parentApp = parentApp self.savedIdStr = "" self.frame.rowconfigure(0, weight = 1) self.frame.columnconfigure(0, weight = 1) self.titlePanel = Frame (self.frame) self.titlePanel.grid(row=0, column=0, sticky=NSEW, columnspan=3) self.titleLabel = Label(self.titlePanel, text="Agenda: Record the Agenda items", anchor=CENTER, font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+6, "bold")) self.titleLabel.pack(fill=X, anchor=W) self.agendaItemPanel = Frame (self.frame, border=5) self.agendaItemPanel.grid(row=1, column=0) self.agendaItemLabel = Label (self.agendaItemPanel, text="Agenda Item Text:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.agendaItemLabel.grid(row=0, column=0, stick=W) self.notePanel = Frame (self.agendaItemPanel) self.notePanel.grid(row=1, column=0,sticky=W) self.noteScrollbar = Scrollbar (self.notePanel) self.noteScrollbar.pack(side=RIGHT, fill=Y) self.note = Text (self.notePanel, height=10, width=35, yscrollcommand=self.noteScrollbar.set, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.note.pack(side=LEFT, fill=BOTH, expand=1) self.noteScrollbar.config(command=self.note.yview) self.buttonPanel = Frame (self.frame, borderwidth=10) self.buttonPanel.grid(row=1, column=1) self.addAgenda = Button (self.buttonPanel, text="Save >>\nTo List",command=self.commandAddAgenda) self.addAgenda.pack(side=TOP, fill=BOTH, expand=1) self.editSelected = Button (self.buttonPanel, text="<< Edit \nSelected",command=self.commandEditSelected) self.editSelected.pack(side=TOP, fill=BOTH, expand=1) self.copySelected = Button (self.buttonPanel, text="<= Copy \nSelected",command=self.commandCopySelected) self.copySelected.pack(side=TOP, fill=BOTH, expand=1) self.delSelected = Button (self.buttonPanel, text="Delete \nSelected",command=self.commandDelSelected) self.delSelected.pack(side=TOP, fill=BOTH, expand=1) self.previewSelected = Button (self.buttonPanel, text="Preview \nSelected",command=self.commandPreviewSelected) self.previewSelected.pack(side=TOP, fill=BOTH, expand=1) self.listPanel = Frame (self.frame, border=5) self.listPanel.grid(row=1, column=2) self.listLabel = Label(self.listPanel, text="Agenda Item List:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.listLabel.grid(row=0, column=0,sticky=W) self.listBoxPanel = Frame (self.listPanel) self.listBoxPanel.grid(row=1, column=0,sticky=W) self.listScrollbar = Scrollbar (self.listBoxPanel) self.listScrollbar.pack(side=RIGHT, fill=Y) self.list = Listbox (self.listBoxPanel, height=12, width=25, yscrollcommand=self.listScrollbar.set, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.list.pack(side=LEFT, fill=BOTH, expand=1) self.listScrollbar.config(command=self.list.yview) self.previewPanel = Frame (self.frame, border=5) self.previewPanel.grid(row=2, column=0, columnspan=3) self.previewLabel = Label (self.previewPanel, text="Preview:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.previewLabel.grid(row=0, column=0, sticky=W) self.previewTextPanel = Frame (self.previewPanel) self.previewTextPanel.grid(row=1, column=0, sticky=W) self.previewScrollbar = Scrollbar (self.previewTextPanel) self.previewScrollbar.pack(side=RIGHT, fill=Y) self.previewText = Text (self.previewTextPanel, height=10, width=75, bd=1, background="light grey", yscrollcommand=self.previewScrollbar.set, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.previewText.pack(side=LEFT, fill=BOTH, expand=1) self.previewScrollbar.config(command=self.previewText.yview) def changeFontSize(self): self.note.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.list.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.previewText.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) def commandAddAgenda(self): str = self.note.get(1.0, END) if str == "" or str == "\n": self.parentApp.updateMessage ("ERR_FIELD_EMPTY", "Agenda Item Text") return if str != "": ao = AgendaObj() ao.details = str idStr = self.parentApp.addAgenda(ao, self.savedIdStr) str = idStr + ". "+ str self.list.insert(END, str) self.note.delete(1.0, END) self.savedIdStr = "" def commandPreviewSelected(self): items = self.list.curselection() if len (items) > 0: tmpstr = self.list.get(items[0]) strlist = string.split(tmpstr, ".") self.previewText.delete (1.0,END) self.previewText.insert(END, self.parentApp.agenda[strlist[0]].previewText()) else: self.parentApp.updateMessage ("ERR_AP_PARSE_TO_PREVIEW") def commandEditSelected(self): items = self.list.curselection() if len (items) > 0: tmpstr = self.list.get(items[0]) strlist = string.split(tmpstr, ".") ao = self.parentApp.agenda[strlist[0]] self.note.delete(1.0, END) self.note.insert(END, ao.details) self.parentApp.delAgenda(strlist[0]) self.list.delete(ANCHOR) self.savedIdStr = strlist[0] def commandCopySelected(self): items = self.list.curselection() if len (items) > 0: tmpstr = self.list.get(items[0]) strlist = string.split(tmpstr, ".") ao = self.parentApp.agenda[strlist[0]] self.note.delete(1.0, END) self.note.insert(END, ao.details) def commandDelSelected(self): items = self.list.curselection() if len (items) > 0: tmpstr = self.list.get(items[0]) strlist = string.split(tmpstr, ".") self.parentApp.delAgenda(strlist[0]) self.list.delete(ANCHOR) def show(self): self.parentApp.updateMessage ("MSG_FORTUNE_AGENDA") Form.show(self) class DiscussionsForm(Form): def __init__(self, parentApp, pageID): Form.__init__(self, parentApp, pageID) self.parentApp = parentApp self.savedIdStr = "" self.frame.rowconfigure(0, weight = 1) self.frame.columnconfigure(0, weight = 1) self.titlePanel = Frame (self.frame) self.titlePanel.grid(row=0, column=0, sticky=NSEW, columnspan=3) self.titleLabel = Label(self.titlePanel, text="Discussions: Record the issues discussed", anchor=CENTER, font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+6, "bold")) self.titleLabel.pack(fill=X, anchor=W) self.discussionsPanel = Frame (self.frame, border=5) self.discussionsPanel.grid(row=1, column=0) self.issueLabel = Label (self.discussionsPanel, text="Discussion Text:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.issueLabel.grid(row=0, column=0, stick=W) self.notePanel = Frame (self.discussionsPanel) self.notePanel.grid(row=1, column=0,sticky=W) self.noteScrollbar = Scrollbar (self.notePanel) self.noteScrollbar.pack(side=RIGHT, fill=Y) self.note = Text (self.notePanel, height=15, width=45, yscrollcommand=self.noteScrollbar.set, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.note.pack(side=LEFT, fill=BOTH, expand=1) self.noteScrollbar.config(command=self.note.yview) self.buttonPanel = Frame (self.frame, borderwidth=10) self.buttonPanel.grid(row=1, column=1) self.addDiscussion = Button (self.buttonPanel, text="Save >>\nTo List",command=self.commandAddDiscussion) self.addDiscussion.pack(side=TOP, fill=BOTH, expand=1) self.editSelected = Button (self.buttonPanel, text="<< Edit \nSelected",command=self.commandEditSelected) self.editSelected.pack(side=TOP, fill=BOTH, expand=1) self.copySelected = Button (self.buttonPanel, text="<= Copy \nSelected",command=self.commandCopySelected) self.copySelected.pack(side=TOP, fill=BOTH, expand=1) self.delSelected = Button (self.buttonPanel, text="Delete \nSelected",command=self.commandDelSelected) self.delSelected.pack(side=TOP, fill=BOTH, expand=1) self.previewSelected = Button (self.buttonPanel, text="Preview \nSelected",command=self.commandPreviewSelected) self.previewSelected.pack(side=TOP, fill=BOTH, expand=1) self.listPanel = Frame (self.frame, border=5) self.listPanel.grid(row=1, column=2) self.listLabel = Label(self.listPanel, text="Discussion List:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.listLabel.grid(row=0, column=0,sticky=W) self.listBoxPanel = Frame (self.listPanel) self.listBoxPanel.grid(row=1, column=0,sticky=W) self.listScrollbar = Scrollbar (self.listBoxPanel) self.listScrollbar.pack(side=RIGHT, fill=Y) self.list = Listbox (self.listBoxPanel, height=17, width=25, yscrollcommand=self.listScrollbar.set, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.list.pack(side=LEFT, fill=BOTH, expand=1) self.listScrollbar.config(command=self.list.yview) self.previewPanel = Frame (self.frame, border=5) self.previewPanel.grid(row=2, column=0, columnspan=3) self.previewLabel = Label (self.previewPanel, text="Preview:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.previewLabel.grid(row=0, column=0, sticky=W) self.previewTextPanel = Frame (self.previewPanel) self.previewTextPanel.grid(row=1, column=0, sticky=W) self.previewScrollbar = Scrollbar (self.previewTextPanel) self.previewScrollbar.pack(side=RIGHT, fill=Y) self.previewText = Text (self.previewTextPanel, height=10, width=85, bd=1, background="light grey", yscrollcommand=self.previewScrollbar.set, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.previewText.pack(side=LEFT, fill=BOTH, expand=1) self.previewScrollbar.config(command=self.previewText.yview) def changeFontSize(self): self.note.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.list.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.previewText.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) def commandAddDiscussion(self): str = self.note.get(1.0, END) if str == "" or str == "\n": self.parentApp.updateMessage ("ERR_FIELD_EMPTY", "Discussion Text") return if str != "": io = DiscussionObj() io.details = str idStr = self.parentApp.addDiscussion(io, self.savedIdStr) str = idStr + ". "+ str self.list.insert(END, str) self.note.delete(1.0, END) self.savedIdStr = "" def commandPreviewSelected(self): items = self.list.curselection() if len (items) > 0: tmpstr = self.list.get(items[0]) strlist = string.split(tmpstr, ".") self.previewText.delete (1.0,END) self.previewText.insert(END, self.parentApp.discussions[strlist[0]].previewText()) else: self.parentApp.updateMessage ("ERR_AP_PARSE_TO_PREVIEW") def commandEditSelected(self): items = self.list.curselection() if len (items) > 0: tmpstr = self.list.get(items[0]) strlist = string.split(tmpstr, ".") io = self.parentApp.discussions[strlist[0]] self.note.delete(1.0, END) self.note.insert(END, io.details) self.parentApp.delDiscussion(strlist[0]) self.list.delete(ANCHOR) self.savedIdStr = strlist[0] def commandCopySelected(self): items = self.list.curselection() if len (items) > 0: tmpstr = self.list.get(items[0]) strlist = string.split(tmpstr, ".") io = self.parentApp.discussions[strlist[0]] self.note.delete(1.0, END) self.note.insert(END, io.details) def commandDelSelected(self): items = self.list.curselection() if len (items) > 0: tmpstr = self.list.get(items[0]) strlist = string.split(tmpstr, ".") self.parentApp.delDiscussion(strlist[0]) self.list.delete(ANCHOR) def show(self): self.parentApp.updateMessage ("MSG_FORTUNE_ISSUES") Form.show(self) class AboutMeetingForm(Form): def __init__(self, parentApp, pageID): Form.__init__(self, parentApp, pageID) self.parentApp = parentApp self.titlePanel = Frame (self.frame) self.titlePanel.grid(row=0, column=0, sticky=NSEW) self.titleLabel = Label(self.titlePanel, text="Record information about the Meeting", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+6, "bold"),anchor=CENTER) self.titleLabel.pack(fill=X, anchor=W) self.meetInfoPanel = Frame (self.frame) self.meetInfoPanel.grid(row=1, column=0) self.separatorButton = Button (self.meetInfoPanel, text="", relief=FLAT, bd=1) self.separatorButton.grid (row=0, column=0, columnspan=4) self.documentTypeLabel = Label (self.meetInfoPanel, text="Document:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.documentTypeLabel.grid (row=1, column=0, sticky=N) self.documentTypePanel = Frame (self.meetInfoPanel) self.documentTypePanel.grid(row=1, column=1, columnspan=2, sticky=W) parentApp.documentType.set (1) tmpRadio = Radiobutton (self.documentTypePanel, text=parentApp.documentTypeText[1], variable=parentApp.documentType, value=1) tmpRadio.grid(row=0, column=1, sticky=W) tmpRadio = Radiobutton (self.documentTypePanel, text=parentApp.documentTypeText[2], variable=parentApp.documentType, value=2) tmpRadio.grid(row=0, column=2, sticky=W) tmpRadio = Radiobutton (self.documentTypePanel, text=parentApp.documentTypeText[3], variable=parentApp.documentType, value=3) tmpRadio.grid(row=1, column=1, sticky=W) tmpRadio = Radiobutton (self.documentTypePanel, text=parentApp.documentTypeText[4], variable=parentApp.documentType, value=4) tmpRadio.grid(row=1, column=2, sticky=W) tmpRadio = Radiobutton (self.documentTypePanel, text=parentApp.documentTypeText[0], variable=parentApp.documentType, value=0) tmpRadio.grid(row=2, column=1, sticky=W) self.specifiedDocumentType = Entry (self.documentTypePanel,textvariable=self.parentApp.specifiedDocumentType, width=10, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.specifiedDocumentType.grid(row=2, column=2, columnspan=2) self.meetingTypeLabel = Label (self.meetInfoPanel, text="Of:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.meetingTypeLabel.grid (row=2, column=0, sticky=N) self.meetTypePanel = Frame (self.meetInfoPanel) self.meetTypePanel.grid(row=2, column=1, columnspan=3, sticky=W) parentApp.meetingType.set (1) tmpRadio = Radiobutton (self.meetTypePanel, text=parentApp.meetingTypeText[1], variable=parentApp.meetingType, value=1) tmpRadio.grid(row=0, column=1, sticky=W) tmpRadio = Radiobutton (self.meetTypePanel, text=parentApp.meetingTypeText[2], variable=parentApp.meetingType, value=2) tmpRadio.grid(row=0, column=2, sticky=W) tmpRadio = Radiobutton (self.meetTypePanel, text=parentApp.meetingTypeText[3], variable=parentApp.meetingType, value=3) tmpRadio.grid(row=0, column=3, sticky=W) tmpRadio = Radiobutton (self.meetTypePanel, text=parentApp.meetingTypeText[4], variable=parentApp.meetingType, value=4) tmpRadio.grid(row=1, column=1, sticky=W) tmpRadio = Radiobutton (self.meetTypePanel, text=parentApp.meetingTypeText[5], variable=parentApp.meetingType, value=5) tmpRadio.grid(row=1, column=2, sticky=W) tmpRadio = Radiobutton (self.meetTypePanel, text=parentApp.meetingTypeText[6], variable=parentApp.meetingType, value=6) tmpRadio.grid(row=1, column=3, sticky=W) tmpRadio = Radiobutton (self.meetTypePanel, text=parentApp.meetingTypeText[0], variable=parentApp.meetingType, value=0) tmpRadio.grid(row=2, column=1, sticky=W) self.specifiedMeetingType = Entry (self.meetTypePanel,textvariable=self.parentApp.specifiedMeetingType, width=20, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.specifiedMeetingType.grid(row=2, column=2, columnspan=2) self.subjectLabel = Label (self.meetInfoPanel, text="Subject:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.subjectLabel.grid (row=3, column=0, sticky=W) self.subject = Entry (self.meetInfoPanel,textvariable=self.parentApp.meetingSubject, width=50, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.subject.grid(row=3, column=1, columnspan=3, sticky=W) self.locationLabel = Label (self.meetInfoPanel, text="Location:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.locationLabel.grid (row=4, column=0, sticky=W) self.location = Entry (self.meetInfoPanel,textvariable=self.parentApp.meetingLocation, width=50, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.location.grid(row=4, column=1, columnspan=3, sticky=W) self.separatorButton = Button (self.meetInfoPanel, text="", relief=FLAT, bd=1) self.separatorButton.grid (row=5, column=0, columnspan=4) self.meetingDateLabel = Label (self.meetInfoPanel, text="Date:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.meetingDateLabel.grid (row=6, column=0, sticky=NSEW) self.meetingDateEntry = Entry (self.meetInfoPanel, textvariable=self.parentApp.meetingDate, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.meetingDateEntry.grid(row=6, column=1) self.todayButton = Button (self.meetInfoPanel, text="<< Today",command=self.commandToday) self.todayButton.grid(row=6, column=2, sticky=W, padx=5) self.meetingTimeLabel = Label (self.meetInfoPanel, text="Starts:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.meetingTimeLabel.grid (row=7, column=0, sticky=NSEW) self.meetingFromTimeEntry = Entry (self.meetInfoPanel, textvariable=self.parentApp.meetingFromTime, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.meetingFromTimeEntry.grid(row=7, column=1) self.fromTimeButton = Button (self.meetInfoPanel, text="<< Now",command=self.commandFromTime) self.fromTimeButton.grid(row=7, column=2, sticky=W, padx=5) self.meetingTimeZoneLabel = Label (self.meetInfoPanel, text="Time Zone", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.meetingTimeZoneLabel.grid (row=7, column=3, sticky=NSEW) self.meetingTimeLabel = Label (self.meetInfoPanel, text="Ends:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.meetingTimeLabel.grid (row=8, column=0, sticky=NSEW) self.meetingToTimeEntry = Entry (self.meetInfoPanel, textvariable=self.parentApp.meetingToTime, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.meetingToTimeEntry.grid(row=8, column=1) self.toTimeButton = Button (self.meetInfoPanel, text="<< Now",command=self.commandToTime) self.toTimeButton.grid(row=8, column=2, sticky=W, padx=5) self.meetingTimeZoneEntry = Entry (self.meetInfoPanel, textvariable=self.parentApp.meetingTimeZone, width=20, background="light grey", font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.meetingTimeZoneEntry.grid(row=8, column=3, padx=5) self.separatorButton = Button (self.meetInfoPanel, text="", relief=FLAT, bd=1) self.separatorButton.grid (row=9, column=0, columnspan=4) self.meetingDialNumLabel = Label (self.meetInfoPanel, text="Dial#:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.meetingDialNumLabel.grid (row=10, column=0, sticky=NSEW) self.meetingDialNumEntry = Entry (self.meetInfoPanel, textvariable=self.parentApp.meetingDialNum, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.meetingDialNumEntry.grid(row=10, column=1, sticky=W, padx=5) self.meetingAccessCodeLabel = Label (self.meetInfoPanel, text="Access#:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.meetingAccessCodeLabel.grid (row=10, column=2, sticky=NSEW) self.meetingAccessCodeEntry = Entry (self.meetInfoPanel, textvariable=self.parentApp.meetingAccessCode, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.meetingAccessCodeEntry.grid(row=10, column=3, sticky=W, padx=5) self.meetingURLLabel = Label (self.meetInfoPanel, text="URL:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.meetingURLLabel.grid (row=11, column=0, sticky=NSEW) self.meetingURLEntry = Entry (self.meetInfoPanel, width=60, textvariable=self.parentApp.meetingURL, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.meetingURLEntry.grid(row=11, column=1, columnspan=3, sticky=W, padx=5) self.separatorButton = Button (self.meetInfoPanel, text="", relief=FLAT, bd=1) self.separatorButton.grid (row=12, column=0, columnspan=4) self.meetingStatusLabel = Label (self.meetInfoPanel, text="Status:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.meetingStatusLabel.grid (row=13, column=0, sticky=W) parentApp.meetingStatus.set (2) tmpRadio = Radiobutton (self.meetInfoPanel, text="Tentative", variable=parentApp.meetingStatus, value=1) tmpRadio.grid(row=13, column=1) tmpRadio = Radiobutton (self.meetInfoPanel, text="Confirmed", variable=parentApp.meetingStatus, value=2) tmpRadio.grid(row=13, column=2) tmpRadio = Radiobutton (self.meetInfoPanel, text="Cancelled", variable=parentApp.meetingStatus, value=3) tmpRadio.grid(row=13, column=3) self.separatorButton = Button (self.meetInfoPanel, text="", relief=FLAT, bd=1) self.separatorButton.grid (row=14, column=0, columnspan=4) def changeFontSize(self): self.specifiedDocumentType.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.specifiedMeetingType.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.subject.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.location.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.meetingDateEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.meetingFromTimeEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.meetingToTimeEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.meetingTimeZoneEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.meetingDialNumEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.meetingAccessCodeEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.meetingURLEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) def commandToday(self): today = date.today() self.parentApp.meetingDate.set (today.isoformat()) def commandFromTime(self): self.parentApp.meetingFromTime.set (strftime("%H:%M")) def commandToTime(self): self.parentApp.meetingToTime.set (strftime("%H:%M")) def show(self): self.parentApp.updateMessage ("MSG_FORTUNE_ABOUT") Form.show(self) class AttendeesForm(Form): def __init__(self, parentApp, pageID): Form.__init__(self, parentApp, pageID) self.parentApp = parentApp self.savedIdStr = "" self.titlePanel = Frame (self.frame) self.titlePanel.grid(row=0, column=0, sticky=NSEW) self.titleLabel = Label(self.titlePanel, text="Record information about Attendees", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+6, "bold"),anchor=CENTER) self.titleLabel.pack(fill=X, anchor=W) self.attendeePanel = Frame (self.frame) self.attendeePanel.grid(row=1, column=0) self.separatorButton = Button (self.attendeePanel, text="", relief=FLAT, bd=1) self.separatorButton.grid (row=0, column=0, columnspan=3) self.attendeeInfoPanel = Frame (self.attendeePanel) self.attendeeInfoPanel.grid(row=1, column=0, rowspan=4) self.nickLabel = Label (self.attendeeInfoPanel, text="Short Name:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.nickLabel.grid (row=1, column=0, sticky=W) self.nickStr = StringVar() self.nickEntry = Entry (self.attendeeInfoPanel,textvariable=self.nickStr, width=15, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.nickEntry.grid(row=1, column=1, sticky=W) self.organizerEmailLabel = Label (self.attendeeInfoPanel, text="Full Name:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.organizerEmailLabel.grid (row=2, column=0, sticky=W) self.nameStr = StringVar() self.nameEntry = Entry (self.attendeeInfoPanel,textvariable=self.nameStr, width=20, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.nameEntry.grid(row=2, column=1, sticky=W) self.emailLabel = Label (self.attendeeInfoPanel, text="Email:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.emailLabel.grid (row=3, column=0, sticky=W) self.emailStr = StringVar() self.emailEntry = Entry (self.attendeeInfoPanel,textvariable=self.emailStr, width=20, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.emailEntry.grid(row=3, column=1, sticky=W) self.meetingTypeLabel = Label (self.attendeeInfoPanel, text="Type:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.meetingTypeLabel.grid (row=4, column=0, sticky=W) self.attendeeType = IntVar() self.attendeeType.set (2) tmpRadio = Radiobutton (self.attendeeInfoPanel, text="Organizer", variable=self.attendeeType, value=1) tmpRadio.grid(row=4, column=1, sticky=W) tmpRadio = Radiobutton (self.attendeeInfoPanel, text="Required", variable=self.attendeeType, value=2) tmpRadio.grid(row=5, column=1, sticky=W) tmpRadio = Radiobutton (self.attendeeInfoPanel, text="Optional", variable=self.attendeeType, value=3) tmpRadio.grid(row=6, column=1, sticky=W) tmpRadio = Radiobutton (self.attendeeInfoPanel, text="Non Participant", variable=self.attendeeType, value=4) tmpRadio.grid(row=7, column=1, sticky=W) self.presenceLabel = Label (self.attendeeInfoPanel, text="Presence:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.presenceLabel.grid (row=8, column=0, sticky=W) self.presenceType = IntVar() self.presenceType.set (1) tmpRadio = Radiobutton (self.attendeeInfoPanel, text="In Person", variable=self.presenceType, value=1) tmpRadio.grid(row=8, column=1, sticky=W) tmpRadio = Radiobutton (self.attendeeInfoPanel, text="Remote", variable=self.presenceType, value=2) tmpRadio.grid(row=9, column=1, sticky=W) self.presenceStr = StringVar() self.presenceStr.set ("On Phone") self.presenceEntry = Entry (self.attendeeInfoPanel,textvariable=self.presenceStr, width=20, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.presenceEntry.grid(row=10, column=1, sticky=W) self.costLabel = Label (self.attendeeInfoPanel, text="Cost (per hour):", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.costLabel.grid (row=11, column=0, sticky=W) self.costPanel = Frame (self.attendeeInfoPanel) self.costPanel.grid(row=11, column=1, sticky=W) self.costStr = StringVar() self.costStr.set (10) self.costEntry = Entry (self.costPanel,textvariable=self.costStr, width=5, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) #self.costEntry.grid(row=11, column=1, sticky=W) self.costEntry.pack(side=LEFT) self.costUnitsEntry = Entry (self.costPanel, width=15, textvariable=self.parentApp.attendeeCostUnitsStr, bd=1, background="light grey", font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.costUnitsEntry.pack (side=LEFT) self.buttonPanel = Frame (self.attendeePanel, borderwidth=10) self.buttonPanel.grid(row=1, column=1, rowspan=4) self.addName = Button (self.buttonPanel, text="Save >>\nTo List",command=self.commandAddName) self.addName.pack(side=TOP, fill=BOTH, expand=1) self.editSelected = Button (self.buttonPanel, text="<< Edit \nSelected",command=self.commandEditSelected) self.editSelected.pack(side=TOP, fill=BOTH, expand=1) self.copySelected = Button (self.buttonPanel, text="<= Copy \nSelected",command=self.commandCopySelected) self.copySelected.pack(side=TOP, fill=BOTH, expand=1) self.delSelected = Button (self.buttonPanel, text="Delete \nSelected",command=self.commandDelSelected) self.delSelected.pack(side=TOP, fill=BOTH, expand=1) self.previewSelected = Button (self.buttonPanel, text="Preview \nSelected",command=self.commandPreviewSelected) self.previewSelected.pack(side=TOP, fill=BOTH, expand=1) self.listPanel = Frame (self.attendeePanel, border=5) self.listPanel.grid(row=1, column=3, rowspan=4) self.listLabel = Label(self.listPanel, text="Attendee List:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.listLabel.grid(row=0, column=0, columnspan=2, sticky=W) self.listBoxPanel = Frame (self.listPanel) self.listBoxPanel.grid(row=1, column=0, columnspan=2, sticky=W) self.listScrollbar = Scrollbar (self.listBoxPanel) self.listScrollbar.pack(side=RIGHT, fill=Y) self.list = Listbox (self.listBoxPanel, height=13, width=25, yscrollcommand=self.listScrollbar.set, font=(parentApp.widgetFontName, parentApp.widgetFontSize)) self.list.pack(side=LEFT, fill=BOTH, expand=1) self.listScrollbar.config(command=self.list.yview) self.importAListButton = Button (self.listPanel, text="Import (CSV) ...",command=self.commandImport) self.importAListButton.grid(row=2, column=0, sticky=S, pady=5) self.exportAListButton = Button (self.listPanel, text="Export (CSV) ...",command=self.commandExport) self.exportAListButton.grid(row=3, column=0, sticky=S, pady=5) self.previewPanel = Frame (self.attendeePanel, border=5) self.previewPanel.grid(row=5, column=0, columnspan=4) self.previewLabel = Label (self.previewPanel, text="Preview:", font=(parentApp.widgetFontName, parentApp.minWidgetFontSize+3, "normal")) self.previewLabel.grid(row=0, column=0, sticky=W) self.previewTextPanel = Frame (self.previewPanel) self.previewTextPanel.grid(row=1, column=0, sticky=W) self.previewScrollbar = Scrollbar (self.previewTextPanel) self.previewScrollbar.pack(side=RIGHT, fill=Y) self.previewText = Text (self.previewTextPanel, height=10, width=75, bd=1, background="light grey", yscrollcommand=self.previewScrollbar.set, font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.previewText.pack(side=LEFT, fill=BOTH, expand=1) self.previewScrollbar.config(command=self.previewText.yview) def changeFontSize(self): self.nickEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.nameEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.emailEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.list.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.previewText.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.presenceEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.costEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) self.costUnitsEntry.config (font=(self.parentApp.widgetFontName, self.parentApp.widgetFontSize)) def commandAddName(self): str0 = self.nickStr.get() str = self.nameStr.get() str1 = self.emailStr.get() if str0 == "" or str0 == "\n": self.parentApp.updateMessage ("ERR_FIELD_EMPTY", "Short Name") return if str0 != "": at = AttendeeObj() at.attendeeNick = str0 dispStr = str0 if str != "": at.attendeeName = str dispStr = dispStr + ":" + str if str1 != "": at.attendeeEmail = str1 dispStr = dispStr + " <" + str1 + ">" idStr = self.parentApp.addAttendee(at, self.savedIdStr) dispStr = idStr + ". "+ dispStr self.list.insert(END, dispStr) at.attendeeType = self.attendeeType.get () if at.attendeeType == 1: self.parentApp.organizerNick.set (str0) self.parentApp.organizerName.set (str) self.parentApp.organizerEmail.set (str1) at.attendeePresence = self.presenceType.get () if at.attendeePresence == 2: at.attendeePresenceText = self.presenceStr.get() else: at.attendeePresenceText = "On Phone" if "" == self.costStr.get(): at.attendeeCost = 0 else: at.attendeeCost = int(self.costStr.get()) self.nickStr.set("") self.nameStr.set("") self.emailStr.set("") self.attendeeType.set (2) self.presenceType.set (1) self.presenceStr.set ("On Phone") self.savedIdStr = "" def commandPreviewSelected(self): items = self.list.curselection() if len (items) > 0: tmpstr = self.list.get(items[0]) strlist = string.split(tmpstr, ".") self.previewText.delete (1.0,END) self.previewText.insert(END, self.parentApp.attendees[strlist[0]].previewText()) else: self.parentApp.updateMessage ("ERR_AP_PARSE_TO_PREVIEW") def commandEditSelected(self): items = self.list.curselection() if len (items) > 0: tmpstr = self.list.get(items[0]) strlist = string.split(tmpstr, ".") ao = self.parentApp.attendees[strlist[0]] self.nickStr.set(ao.attendeeNick) self.nameStr.set(ao.attendeeName) self.emailStr.set(ao.attendeeEmail) self.attendeeType.set(ao.attendeeType) self.presenceType.set(ao.attendeePresence) if 2 == ao.attendeePresence: self.presenceStr.set (ao.attendeePresenceText) else: self.presenceStr.set ("On Phone") self.costStr.set (`ao.attendeeCost`) self.parentApp.delAttendee(strlist[0]) self.list.delete(ANCHOR) self.savedIdStr = strlist[0] def commandCopySelected(self): items = self.list.curselection() if len (items) > 0: tmpstr = self.list.get(items[0]) strlist = string.split(tmpstr, ".") ao = self.parentApp.attendees[strlist[0]] self.nickStr.set(ao.attendeeNick) self.nameStr.set(ao.attendeeName) self.emailStr.set(ao.attendeeEmail) self.attendeeType.set(ao.attendeeType) self.presenceType.set(ao.attendeePresence) if 2 == ao.attendeePresence: self.presenceStr.set (ao.attendeePresenceText) else: self.presenceStr.set ("On Phone") self.costStr.set (`ao.attendeeCost`) def commandDelSelected(self): items = self.list.curselection() if len (items) > 0: tmpstr = self.list.get(items[0]) strlist = string.split(tmpstr, ".") self.parentApp.delAttendee(strlist[0]) self.list.delete(ANCHOR) def commandToday(self): today = date.today() self.parentApp.meetingDate.set (today.isoformat()) def commandFromTime(self): self.parentApp.meetingFromTime.set (strftime("%H:%M")) def commandToTime(self): self.parentApp.meetingToTime.set (strftime("%H:%M")) def commandImport(self): currentVersionFound = False fileName = tkFileDialog.askopenfilename (parent=self.parentApp.master, title='Import From', filetypes=[('Comma Separated Values','*.csv'),('All Files','*.*')]) if fileName != None and fileName != '': #print fileName fdInFile = open(fileName, "r") tmpstr = fdInFile.readline() count = 0 while tmpstr: #try to find the current version number in the header comments of the file if "#" in tmpstr: if "v" + self.parentApp.yama_version in tmpstr: currentVersionFound = True tmpstr = fdInFile.readline() continue #initial header comments over, if current version is not yet found, #its either an older file or may even be corrupt if False == currentVersionFound: self.parentApp.updateMessage ("ERR_IMPORT_FILE_OLDER_OR_CORRUPT") break if not "#" in tmpstr: strlist = string.split (tmpstr, '\n') strlist0 = string.split (strlist[0], ',') str0 = strlist0[0] str1 = strlist0[1] str2 = strlist0[2] str3 = strlist0[3] str4 = strlist0[4] str5 = strlist0[5] str6 = strlist0[6] if str0 != "": at = AttendeeObj() at.attendeeNick = str0 count = count +1 dispStr = str0 if str1 != "": at.attendeeName = str1 dispStr = dispStr + ":" + str1 if str2 != "": at.attendeeEmail = str2 dispStr = dispStr + " <" + str2 + ">" idStr = self.parentApp.addAttendee(at) dispStr = idStr + ". " + dispStr self.list.insert(END, dispStr) if str3 != "": at.attendeeType = int(str3) else: at.attendeeType = 2 if at.attendeeType == 1: self.parentApp.organizerNick.set (str0) self.parentApp.organizerName.set (str1) self.parentApp.organizerEmail.set (str2) if str4 != "": at.attendeeCost = int(str4) if str5 != "": at.attendeePresence = int(str5) else: at.attendeeType = 1 if str6 != "": at.attendeePresenceText = str6 else: at.attendeeType = "On Phone" tmpstr = fdInFile.readline() fdInFile.close() def commandExport(self): fileName = tkFileDialog.asksaveasfilename (parent=self.parentApp.master, title='Export To', filetypes=[('Comma Separated Values','*.csv'),('All Files','*.*')]) if fileName != None and fileName != '': #print fileName fdOutFile = open(fileName, "w") fdOutFile.write("#Generated by " + self.parentApp.yama_copyright + ", " + `self.parentApp.attendeeCount` + " attendees\n") fdOutFile.write("#Sequence of fields: NickName, Full Name, Email, Attendee Type, Cost, PresenceType, PresenceText" + "\n") fdOutFile.write("#Attendee Type is numeric: 1=Organizer, 2=Required, 3=Optional, 4=NonParticipant" + "\n") fdOutFile.write("#Presence Type is numeric: 1=In Person, 2=Remote" + "\n") for id in self.parentApp.attendees: rec = self.parentApp.attendees[id] fdOutFile.write(rec.attendeeNick + "," + rec.attendeeName + "," + rec.attendeeEmail + "," + `rec.attendeeType` + "," + `rec.attendeeCost` + "," + `rec.attendeePresence` + "," + rec.attendeePresenceText + "\n") fdOutFile.close() def show(self): self.parentApp.updateMessage ("MSG_FORTUNE_ATTENDEES") Form.show(self) class App: def __init__(self, master): self.yama_version = "1.7.2" self.yama_copyright = "YaMA v1.7.2 (C) 2005-2012, Atul Nene (www.atulnene.com)" self.yama_tagline = "YaMA - the meeting assistant (yama.sourceforge.net)" self.master = master self.skeletonDateStr = "[yyyy-mm-dd]" self.skeletonTimeStr = "[HH:MM]" self.apIDPrefix = "AP" self.optionAPIDPrefix = StringVar() self.optionAPIDPrefix.set (self.apIDPrefix) self.optionUseAPIDPrefix = IntVar() self.optionUseAPIDPrefix.set (1) self.optionUseAPIDDate = IntVar() self.optionUseAPIDDate.set (1) self.apIDCustomToken = "Task" self.optionAPIDCustomToken = StringVar() self.optionAPIDCustomToken.set (self.apIDCustomToken) self.optionUseAPIDCustomToken = IntVar() self.optionUseAPIDCustomToken.set (0) self.tableHeaderCellSeparator = "||" self.optionTableHeaderCellSeparator = StringVar() self.optionTableHeaderCellSeparator.set (self.tableHeaderCellSeparator) self.tableCellSeparator = "||" self.optionTableCellSeparator = StringVar() self.optionTableCellSeparator.set (self.tableCellSeparator) self.wikiTextBoldMarkStart = "\'\'\'" self.optionWikiTextBoldMarkStart = StringVar() self.optionWikiTextBoldMarkStart.set (self.wikiTextBoldMarkStart) self.wikiTextBoldMarkEnd = "\'\'\'" self.optionWikiTextBoldMarkEnd = StringVar() self.optionWikiTextBoldMarkEnd.set (self.wikiTextBoldMarkEnd) self.wikiTextCRLF = "[[BR]]" self.optionWikiTextCRLF = StringVar() self.optionWikiTextCRLF.set (self.wikiTextCRLF) self.lastIDUsed = 0 self.attendeeCount = 0 self.lastAttendeeIDUsed = 0 self.attendees = {} self.agendaCount = 0 self.lastAgendaIDUsed = 0 self.agenda = {} self.issueCount = 0 self.lastDiscussionIDUsed = 0 self.discussions = {} self.decisionCount = 0 self.lastDecisionIDUsed = 0 self.decisions = {} self.actionItemCount = 0 self.lastActionPointIDUsed = 0 self.actionItems = {} self.fileName = "" self.meetingType = IntVar() self.specifiedMeetingType = StringVar() self.meetingTypeText = ["As Specified:","Meeting","Visit","Video Conference", "Proceedings", "Session", "Tele Conference"] self.documentType = IntVar() self.specifiedDocumentType = StringVar() self.documentTypeText = ["As Specified:","Minutes","Report","Record", "Summary"] self.meetingSubject = StringVar() self.meetingLocation = StringVar() self.organizerNick = StringVar() self.organizerName = StringVar() self.organizerEmail = StringVar() self.meetingDate = StringVar() self.meetingDate.set (self.skeletonDateStr) self.meetingFromTime = StringVar() self.meetingFromTime.set (self.skeletonTimeStr) self.meetingToTime = StringVar() self.meetingToTime.set (self.skeletonTimeStr) self.meetingStatus = IntVar() self.meetingDialNum = StringVar() self.meetingTimeZone = StringVar() self.meetingAccessCode = StringVar() self.meetingURL = StringVar() self.outlookCompatibleWhenExport = IntVar() self.dateInReportTitle = IntVar() self.timeInReportTitle = IntVar() self.locationInMinutes = IntVar() self.nonAttendeesInReport= IntVar() self.attendeePresenceInReport= IntVar() self.attendeePresenceInReport.set(1) self.meetingCostInReport= IntVar() self.taglineInReport= IntVar() self.taglineInReport.set (1) self.wikiFriendlyOutputInReport= IntVar() self.wikiFriendlyOutputInReport.set (0) self.markMinutesAsRevised= IntVar() self.markMinutesAsRevised.set (0) self.defaultMinutesRevisionNumber = "1" self.minutesRevisionNumber = StringVar () self.minutesRevisionNumber.set (self.defaultMinutesRevisionNumber) self.defaultMinutesRevisionText = "Changed text of a discussion for a more accurate description." self.minutesRevisionText = StringVar () self.minutesRevisionText.set (self.defaultMinutesRevisionText) self.defaultAttendeeCostUnit = "Rupees" self.attendeeCostUnitsStr = StringVar() self.attendeeCostUnitsStr.set (self.defaultAttendeeCostUnit) self.statsAgenda = StringVar () self.statsAttendee = StringVar () self.statsDiscussion = StringVar () self.statsDecision = StringVar () self.statsAction = StringVar () self.messageText = StringVar() self.pageList = {} self.tabList = {} self.currPageID = "" self.currFileName = "" if daylight == 0: self.meetingTimeZone.set (tzname[0]) else: self.meetingTimeZone.set (tzname[1]) self.entryFontDescr = Menu()["font"] #print self.entryFontDescr entryFont = tkFont.Font (font=self.entryFontDescr) #print entryFont.actual() #list = self.entryFontDescr.rsplit (" ", 1) #self.widgetFontName = list[0] #try: # self.widgetFontSize = abs(int(list[1])) #except ValueError: #print 'the font descr doesnt end with the size !' #list = self.widgetFontName.rsplit (" ", 1) #self.widgetFontName = list[0] #self.widgetFontSize = abs(int(list[1])) self.widgetFontName = entryFont.actual()['family'] self.widgetFontSize = abs(entryFont.actual()['size']) #print self.widgetFontName #print self.widgetFontSize self.minWidgetFontSize = self.widgetFontSize self.maxWidgetFontSize = 24 self.frame = Frame (master) master.title(self.yama_copyright) self.frame.grid() self.frame.rowconfigure(1, weight = 1) self.frame.columnconfigure(1, weight = 1) self.toolBar = Frame (self.frame) self.toolBar.grid(column=0,sticky=NS) self.subToolBar1 = Frame (self.toolBar, border=2) self.subToolBar1.grid(row=0,column=0,sticky=W) #self.subToolBar1.pack(fill=Y, anchor=N) self.aboutButton = Button (self.subToolBar1, relief=FLAT, text="About YaMA", command=self.commandAbout) self.aboutButton.grid(row=0, column=0, sticky=NSEW) self.aboutMeetingButton = Button (self.subToolBar1, relief=SUNKEN, text="About the Meeting", command=self.commandAboutMeeting) self.aboutMeetingButton.grid(row=1, column=0, sticky=NSEW) self.attendeesButton = Button (self.subToolBar1, relief=SUNKEN, text="Attendees", command=self.commandAttendees) self.attendeesButton.grid(row=2, column=0, sticky=NSEW) self.agendaButton = Button (self.subToolBar1, relief=SUNKEN, text="Agenda", command=self.commandAgenda) self.agendaButton.grid(row=3, column=0, sticky=NSEW) self.discussionsButton = Button (self.subToolBar1, relief=SUNKEN, text="Discussions", command=self.commandDiscussions) self.discussionsButton.grid(row=4, column=0, sticky=NSEW) self.decisionsButton = Button (self.subToolBar1, relief=SUNKEN, text="Decisions",command=self.commandDecisions) self.decisionsButton.grid(row=5, column=0, sticky=NSEW) self.actionItemsButton = Button (self.subToolBar1, relief=SUNKEN, text="Action Points",command=self.commandActionPoints) self.actionItemsButton.grid(row=6, column=0, sticky=NSEW) self.publishButton = Button (self.subToolBar1, relief=SUNKEN, text="Publish", command=self.commandPublish) self.publishButton.grid(row=7, column=0, sticky=NSEW) self.exportActionsButton = Button (self.subToolBar1, relief=SUNKEN, text="Export", command=self.commandExportActions) self.exportActionsButton.grid(row=8, column=0, sticky=NSEW) self.parseActionsButton = Button (self.subToolBar1, relief=SUNKEN, text="Parse", command=self.commandParseActions) self.parseActionsButton.grid(row=9, column=0, sticky=NSEW) self.optionsButton = Button (self.subToolBar1, relief=SUNKEN, text="Options", command=self.commandOptions) self.optionsButton.grid(row=10, column=0, sticky=NSEW) self.subToolBarDummy = Frame (self.toolBar, border=5) self.subToolBarDummy.grid(row=1,column=0,sticky=NSEW) self.separatorButton = Button (self.subToolBarDummy, text=" ", relief=FLAT, bd=1) self.separatorButton.grid (row=0, column=0) self.statisticsPanel = Frame (self.subToolBarDummy) self.statisticsPanel.grid(row=1,column=0,columnspan=2,sticky=NSEW) tmpLabel = Label (self.statisticsPanel, text="Statistics") tmpLabel.grid (row=0, column=0, columnspan=2, sticky=NSEW) tmpLabel = Label (self.statisticsPanel, text="Agenda Items") tmpLabel.grid (row=1, column=0, sticky=W) self.statsAgendaEntry = Entry (self.statisticsPanel, width=3, textvariable=self.statsAgenda, bd=1, background="light grey", font=(self.widgetFontName, self.widgetFontSize)) self.statsAgendaEntry.grid (row=1, column=1) tmpLabel = Label (self.statisticsPanel, text="Attendees") tmpLabel.grid (row=2, column=0, sticky=W) self.statsAttendeeEntry = Entry (self.statisticsPanel, width=3, textvariable=self.statsAttendee, bd=1, background="light grey", font=(self.widgetFontName, self.widgetFontSize)) self.statsAttendeeEntry.grid (row=2, column=1) tmpLabel = Label (self.statisticsPanel, text="Discussions") tmpLabel.grid (row=3, column=0, sticky=W) self.statsDiscussionEntry = Entry (self.statisticsPanel, width=3, textvariable=self.statsDiscussion, bd=1, background="light grey", font=(self.widgetFontName, self.widgetFontSize)) self.statsDiscussionEntry.grid (row=3, column=1) tmpLabel = Label (self.statisticsPanel, text="Decisions") tmpLabel.grid (row=4, column=0, sticky=W) self.statsDecisionEntry = Entry (self.statisticsPanel, width=3, textvariable=self.statsDecision, bd=1, background="light grey", font=(self.widgetFontName, self.widgetFontSize)) self.statsDecisionEntry.grid (row=4, column=1) tmpLabel = Label (self.statisticsPanel, text="Actions") tmpLabel.grid (row=5, column=0, sticky=W) self.statsActionEntry = Entry (self.statisticsPanel, width=3, textvariable=self.statsAction, bd=1, background="light grey", font=(self.widgetFontName, self.widgetFontSize)) self.statsActionEntry.grid (row=5, column=1) self.updateStatus() self.separatorButton = Button (self.subToolBarDummy, text=" ", relief=FLAT, bd=1) self.separatorButton.grid (row=2, column=0) self.subToolBar2 = Frame (self.toolBar, border=5) self.subToolBar2.grid(row=2,column=0,sticky=S) #self.subToolBar2.pack(fill=Y, anchor=S, expand=1) self.cancel = Button (self.subToolBar2, relief=RAISED, text="Font++", command=self.commandIncFont) self.cancel.grid(row=1, column=0, sticky=NSEW) self.help = Button (self.subToolBar2, relief=RAISED, text="Font--", command=self.commandDecFont) self.help.grid(row=2, column=0, sticky=NSEW) #self.help = Button (self.subToolBar2, relief=RAISED, text="Load...", command=self.commandLoad) #self.help.grid(row=3, column=0, sticky=NSEW) #self.help = Button (self.subToolBar2, relief=RAISED, text="Save...", command=self.commandSave) #self.help.grid(row=4, column=0, sticky=NSEW) self.help = Button (self.subToolBar2, relief=RAISED, text="Help", command=self.commandHelp) self.help.grid(row=5, column=0, sticky=NSEW) self.cancel = Button (self.subToolBar2, relief=RAISED, text="Quit", command=self.commandQuit) self.cancel.grid(row=6, column=0, sticky=NSEW) self.pageFrame = Frame (self.frame) self.pageFrame.grid(row=0, column=1, sticky=NSEW) wp = AboutPage(self, "About") self.pageList["About"] = wp self.tabList["About"] = self.aboutButton self.currPageID = "About" self.finalReport = "" wp.show() wp = AboutMeetingForm (self, "AboutMeeting") self.pageList["AboutMeeting"] = wp self.tabList["AboutMeeting"] = self.aboutMeetingButton wp = AttendeesForm (self, "Attendees") self.pageList["Attendees"] = wp self.tabList["Attendees"] = self.attendeesButton wp = AgendaForm (self, "Agenda") self.pageList["Agenda"] = wp self.tabList["Agenda"] = self.agendaButton wp = DiscussionsForm(self, "Discussions") self.pageList["Discussions"] = wp self.tabList["Discussions"] = self.discussionsButton wp = DecisionsForm (self, "Decisions") self.pageList["Decisions"] = wp self.tabList["Decisions"] = self.decisionsButton wp = ActionPointsForm (self, "ActionPoints") self.pageList["ActionPoints"] = wp self.tabList["ActionPoints"] = self.actionItemsButton wp = PreviewReportForm (self, "Publish") self.pageList["Publish"] = wp self.tabList["Publish"] = self.publishButton wp = ExportActionsForm (self, "ExportActions") self.pageList["ExportActions"] = wp self.tabList["ExportActions"] = self.exportActionsButton wp = ParseActionsForm (self, "ParseActions") self.pageList["ParseActions"] = wp self.tabList["ParseActions"] = self.parseActionsButton wp = OptionsForm (self, "Options") self.pageList["Options"] = wp self.tabList["Options"] = self.optionsButton self.updateMessage(None) self.message = Entry (self.frame, textvariable=self.messageText, bd=1, background="light grey", font=(self.widgetFontName, self.widgetFontSize)) self.message.grid(row=1,column=0,columnspan=2,sticky=NSEW) def updateStatus(self): self.statsAgenda.set (`self.agendaCount`) self.statsAttendee.set (`self.attendeeCount`) self.statsDiscussion.set (`self.issueCount`) self.statsDecision.set (`self.decisionCount`) self.statsAction.set (`self.actionItemCount`) def updateMessage(self, msgID, moreInfo=None): if None == moreInfo or "" == moreInfo: moreInfo = "" else: moreInfo = "\"" + moreInfo + "\"" if None == msgID or "" == msgID: self.messageText.set ("Welcome to YaMA, heres hoping you have a productive and an enjoyable experience !") elif "MSG_TMPLOCSUCC" == msgID: self.messageText.set ("Temporary Location should have opened in a separate window.") elif "MSG_HELPLOCSUCC" == msgID: self.messageText.set ("Help Location should have opened in a separate window.") elif "MSG_OSRESTRICT" == msgID: self.messageText.set ("This feature is restricted on your Operating System for security reasons.") elif "MSG_FORTUNE_ACTIONS" == msgID: self.messageText.set ("Todays Fortune: You will follow up on all Action Points to completion.") elif "MSG_FORTUNE_ABOUT" == msgID: self.messageText.set ("Todays Fortune: Your meetings will start and end on time.") elif "MSG_FORTUNE_ATTENDEES" == msgID: self.messageText.set ("Todays Fortune: You have sent out Meeting Invitations in good time and will have a full quorum.") elif "MSG_FORTUNE_AGENDA" == msgID: self.messageText.set ("Todays Fortune: Your Attendees will be well prepared to discuss your pre-circulated Agenda.") elif "MSG_FORTUNE_ISSUES" == msgID: self.messageText.set ("Todays Fortune: You will have excellent participation from all Attendees.") elif "MSG_FORTUNE_DECISIONS" == msgID: self.messageText.set ("Todays Fortune: Your team will make well thought out decisions that progress the project and benefit the customer.") elif "MSG_FORTUNE_PUBLISH" == msgID: self.messageText.set ("Todays Fortune: The comprehensive and accurate Minutes you send out will be appreciated by all recepients.") elif "MSG_FORTUNE_EXPORT" == msgID: self.messageText.set ("Todays Fortune: The project team will be positively impacted by your communication and archival of Action Points.") elif "MSG_FORTUNE_PARSE" == msgID: self.messageText.set ("Todays Fortune: You will review all past Action Points and re-assign the ones that are open.") elif "MSG_FORTUNE_OPTIONS" == msgID: self.messageText.set ("Todays Fortune: You will tailor your communication in synergy with the recipients technology expectations.") elif "ERR_FIELD_EMPTY" == msgID: self.messageText.set ("Error: The field " + moreInfo + " is empty. Please ensure it has the right data and then try again.") elif "ERR_AP_PARSE_TO_ADD" == msgID: self.messageText.set ("Error: An Action Point needs to be parsed before it can be added to the Minutes. Please try again.") elif "ERR_AP_PARSE_TO_PREVIEW" == msgID: self.messageText.set ("Error: Please select an item in the list and try again.") elif "ERR_IMPORT_FILE_OLDER_OR_CORRUPT" == msgID: self.messageText.set ("Error: Will not attempt to import the file, it's either an older version or corrupt.") def addAttendee (self, at, idStr=""): self.lastAttendeeIDUsed = self.lastAttendeeIDUsed + 1 self.attendeeCount = self.attendeeCount + 1 if idStr == "": tmpIdStr = `self.lastAttendeeIDUsed` if self.lastAttendeeIDUsed <= 9: tmpIdStr = '0' + tmpIdStr else: tmpIdStr = idStr self.attendees[tmpIdStr] = at self.updateStatus() return tmpIdStr def delAttendee (self, key): del self.attendees[key] self.attendeeCount = self.attendeeCount - 1 self.updateStatus() def addAgenda(self, ao, idStr=""): self.lastAgendaIDUsed = self.lastAgendaIDUsed + 1 self.agendaCount = self.agendaCount + 1 if idStr == "": tmpIdStr = `self.lastAgendaIDUsed` if self.lastAgendaIDUsed <= 9: tmpIdStr = '0' + tmpIdStr else: tmpIdStr = idStr self.agenda[tmpIdStr] = ao self.updateStatus() return tmpIdStr def delAgenda (self, key): del self.agenda[key] self.agendaCount = self.agendaCount - 1 self.updateStatus() def addDiscussion(self, io, idStr=""): self.lastDiscussionIDUsed = self.lastDiscussionIDUsed + 1 self.issueCount = self.issueCount + 1 if idStr == "": tmpIdStr = `self.lastDiscussionIDUsed` if self.lastDiscussionIDUsed <= 9: tmpIdStr = '0' + tmpIdStr else: tmpIdStr = idStr self.discussions[tmpIdStr] = io self.updateStatus() return tmpIdStr def delDiscussion (self, key): del self.discussions[key] self.issueCount = self.issueCount - 1 self.updateStatus() def addDecision(self, do, idStr=""): self.lastDecisionIDUsed = self.lastDecisionIDUsed + 1 self.decisionCount = self.decisionCount + 1 if idStr == "": tmpIdStr = `self.lastDecisionIDUsed` if self.lastDecisionIDUsed <= 9: tmpIdStr = '0' + tmpIdStr else: tmpIdStr = idStr self.decisions[tmpIdStr] = do self.updateStatus() return tmpIdStr def delDecision (self, key): del self.decisions[key] self.decisionCount = self.decisionCount - 1 self.updateStatus() def addActionPoint(self, aio): self.lastActionPointIDUsed = self.lastActionPointIDUsed + 1 self.actionItemCount = self.actionItemCount + 1 idStr = `self.lastActionPointIDUsed` if self.lastActionPointIDUsed <= 9: idStr = '0' + idStr self.actionItems[idStr] = aio self.updateStatus() return idStr def delActionPoint (self, key): del self.actionItems[key] self.actionItemCount = self.actionItemCount - 1 self.updateStatus() def generateActionPointID(self): self.lastIDUsed = self.lastIDUsed + 1 today = date.today() tmpStr = "" if 1 == self.optionUseAPIDPrefix.get(): tmpStr = tmpStr + self.optionAPIDPrefix.get() + "-" if 1 == self.optionUseAPIDDate.get(): tmpStr = tmpStr + today.isoformat() + "-" if 1 == self.optionUseAPIDCustomToken.get(): tmpStr = tmpStr + self.optionAPIDCustomToken.get() if self.lastIDUsed <= 9: tmpStr = tmpStr + '0' tmpStr = tmpStr + `self.lastIDUsed` return tmpStr def commandIncFont(self): if self.widgetFontSize < self.maxWidgetFontSize: self.widgetFontSize = self.widgetFontSize + 1 self.pageList["About"].changeFontSize () self.pageList["AboutMeeting"].changeFontSize () self.pageList["Attendees"].changeFontSize () self.pageList["Agenda"].changeFontSize () self.pageList["Discussions"].changeFontSize () self.pageList["Decisions"].changeFontSize () self.pageList["ActionPoints"].changeFontSize () self.pageList["Publish"].changeFontSize () self.pageList["ExportActions"].changeFontSize () self.pageList["ParseActions"].changeFontSize () self.pageList["Options"].changeFontSize () self.statsAgendaEntry.config (font=(self.widgetFontName, self.widgetFontSize)) self.statsAttendeeEntry.config (font=(self.widgetFontName, self.widgetFontSize)) self.statsDiscussionEntry.config (font=(self.widgetFontName, self.widgetFontSize)) self.statsDecisionEntry.config (font=(self.widgetFontName, self.widgetFontSize)) self.statsActionEntry.config (font=(self.widgetFontName, self.widgetFontSize)) self.message.config (font=(self.widgetFontName, self.widgetFontSize)) def commandDecFont(self): if self.widgetFontSize > self.minWidgetFontSize: self.widgetFontSize = self.widgetFontSize - 1 self.pageList["About"].changeFontSize () self.pageList["AboutMeeting"].changeFontSize () self.pageList["Attendees"].changeFontSize () self.pageList["Agenda"].changeFontSize () self.pageList["Discussions"].changeFontSize () self.pageList["Decisions"].changeFontSize () self.pageList["ActionPoints"].changeFontSize () self.pageList["Publish"].changeFontSize () self.pageList["ExportActions"].changeFontSize () self.pageList["ParseActions"].changeFontSize () self.statsAgendaEntry.config (font=(self.widgetFontName, self.widgetFontSize)) self.statsAttendeeEntry.config (font=(self.widgetFontName, self.widgetFontSize)) self.statsDiscussionEntry.config (font=(self.widgetFontName, self.widgetFontSize)) self.statsDecisionEntry.config (font=(self.widgetFontName, self.widgetFontSize)) self.statsActionEntry.config (font=(self.widgetFontName, self.widgetFontSize)) self.message.config (font=(self.widgetFontName, self.widgetFontSize)) def commandQuit(self): self.master.quit() def commandLoad(self): pass def commandSave(self): pass def switchToTab(self, pageID): self.tabList[self.currPageID].configure(relief=SUNKEN) self.pageList[self.currPageID].hide() self.currPageID = pageID self.pageList[self.currPageID].show() self.tabList[self.currPageID].configure(relief=FLAT) def commandAbout(self): if self.currPageID != "About": self.switchToTab ("About") def commandAboutMeeting(self): if self.currPageID != "AboutMeeting": self.switchToTab ("AboutMeeting") def commandAttendees(self): if self.currPageID != "Attendees": self.switchToTab ("Attendees") def commandAgenda(self): if self.currPageID != "Agenda": self.switchToTab ("Agenda") def commandDiscussions(self): if self.currPageID != "Discussions": self.switchToTab ("Discussions") def commandDecisions(self): if self.currPageID != "Decisions": self.switchToTab ("Decisions") def commandActionPoints(self): if self.currPageID != "ActionPoints": self.switchToTab ("ActionPoints") def commandDashboard(self): if self.currPageID != "DashBoard": self.switchToTab ("DashBoard") def commandPublish(self): if self.currPageID != "Publish": self.switchToTab ("Publish") def commandExportActions(self): if self.currPageID != "ExportActions": self.switchToTab ("ExportActions") def commandParseActions(self): if self.currPageID != "ParseActions": self.switchToTab ("ParseActions") def commandOptions(self): if self.currPageID != "Options": self.switchToTab ("Options") def commandHelp(self): # find a way to do this cleanly in a crossplatform manner if os.name == "nt": os.startfile ("http://yama.sourceforge.net/") self.updateMessage ("MSG_HELPLOCSUCC") else: self.updateMessage ("MSG_OSRESTRICT") pass def computeMeetingCost(self): if self.attendeeCount == 0: return 0 if "" == self.meetingToTime.get() or self.skeletonTimeStr == self.meetingToTime.get(): return 0 if "" == self.meetingFromTime.get() or self.skeletonTimeStr == self.meetingFromTime.get(): return 0 tmpFromTime = self.meetingFromTime.get() tmpToTime = self.meetingToTime.get() strlist2 = string.split (tmpFromTime, ':') fromHrs = int(strlist2[0]) fromMins = int(strlist2[1]) strlist3 = string.split (tmpToTime, ':') toHrs = int(strlist3[0]) toMins = int(strlist3[1]) diffHrs = toHrs - fromHrs if toMins < fromMins: diffMins = (60 - fromMins) + toMins diffHrs = diffHrs - 1 else: diffMins = toMins - fromMins cumulativeAttendeeHourlyCost = 0 tmpKeys = self.attendees.keys() for id in tmpKeys: obj = self.attendees[id] if obj.attendeeType in [1,2]: cumulativeAttendeeHourlyCost = cumulativeAttendeeHourlyCost + obj.attendeeCost cost = (cumulativeAttendeeHourlyCost * diffHrs) + ((cumulativeAttendeeHourlyCost * diffMins)/60) return cost def makeReport(self): self.finalReport = "" tmpAgenda = "" tmpInvite = "" tmpTitle = "" if self.documentType.get() == 0: tmpDocType = self.specifiedDocumentType.get() if tmpDocType == "": tmpDocType = "[Specified Document Type]" else: tmpDocType = self.documentTypeText[self.documentType.get()] if self.meetingType.get() == 0: tmpType = self.specifiedMeetingType.get() if tmpType == "": tmpType = "[Specified Meeting Type]" else: tmpType = self.meetingTypeText[self.meetingType.get()] tmpSubject = self.meetingSubject.get() if tmpSubject == "": tmpSubject = "[Subject]" tmpDate = self.meetingDate.get() if tmpDate == "": tmpDate = self.skeletonDateStr tmpFromTime = self.meetingFromTime.get() if tmpFromTime == "": tmpFromTime = self.skeletonTimeStr tmpToTime = self.meetingToTime.get() if tmpToTime == "": tmpToTime = self.skeletonTimeStr tmpLocation = self.meetingLocation.get() if tmpLocation == "": tmpLocation = "[Location]" if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextBoldMarkStart.get () if 1 == self.dateInReportTitle.get(): tmpInvite = tmpInvite + tmpDate + " " + "Invitation to " + tmpType + ": " + tmpSubject else: tmpInvite = tmpInvite + "Invitation to " + tmpType + ": " + tmpSubject + ", " + tmpDate if 1 == self.timeInReportTitle.get(): tmpInvite = tmpInvite + ", " + tmpFromTime + "-" + tmpToTime + " (" + self.meetingTimeZone.get() + ")" if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextBoldMarkEnd.get () tmpInvite = tmpInvite + self.optionWikiTextCRLF.get() tmpInvite = tmpInvite + "\n" if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextBoldMarkStart.get () tmpInvite = tmpInvite + "What : " if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextBoldMarkEnd.get () tmpInvite = tmpInvite + tmpSubject if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextCRLF.get() tmpInvite = tmpInvite + "\n" if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextBoldMarkStart.get () tmpInvite = tmpInvite + "When : " if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextBoldMarkEnd.get () tmpInvite = tmpInvite + tmpDate + ", " +tmpFromTime + "-" + tmpToTime + " (" + self.meetingTimeZone.get() + ")" if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextCRLF.get() tmpInvite = tmpInvite + "\n" if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextBoldMarkStart.get () tmpInvite = tmpInvite + "Where: " if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextBoldMarkEnd.get () tmpInvite = tmpInvite + tmpLocation if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextCRLF.get() tmpInvite = tmpInvite + "\n" if self.agendaCount != 0: tmpAgenda = tmpAgenda + "\n" if 1 == self.wikiFriendlyOutputInReport.get(): tmpAgenda = tmpAgenda + self.optionWikiTextBoldMarkStart.get () if 1 == self.dateInReportTitle.get(): tmpAgenda = tmpAgenda + tmpDate + " " + "Agenda for " + tmpType + ": " + tmpSubject else: tmpAgenda = tmpAgenda + "Agenda for " + tmpType + ": " + tmpSubject + ", " + tmpDate if 1 == self.timeInReportTitle.get(): tmpAgenda = tmpAgenda + ", " + tmpFromTime + "-" + tmpToTime + " (" + self.meetingTimeZone.get() + ")" + "\n" if 1 == self.wikiFriendlyOutputInReport.get(): tmpAgenda = tmpAgenda + self.optionWikiTextBoldMarkEnd.get () tmpAgenda = tmpAgenda + self.optionWikiTextCRLF.get() tmpAgenda = tmpAgenda + "\n" tmpCount = 1 tmpKeys = self.agenda.keys() tmpKeys.sort() for id in tmpKeys: obj = self.agenda[id] tmpText = `tmpCount` + ". " + obj.details if 1 == self.wikiFriendlyOutputInReport.get(): tmpText = tmpText + self.optionWikiTextCRLF.get() tmpText = tmpText + "\n" tmpCount = tmpCount + 1 tmpAgenda = tmpAgenda + tmpText nonAttendees = "" tmpText = "" if self.attendeeCount != 0: tmpKeys = self.attendees.keys() tmpKeys.sort() for id in tmpKeys: obj = self.attendees[id] if obj.attendeeType == 4: if "" != nonAttendees: nonAttendees = nonAttendees + ", " nonAttendees = nonAttendees + obj.attendeeNick elif obj.attendeeType != 1: if "" != tmpText: tmpText = tmpText + ", " tmpText = tmpText + obj.attendeeNick if 1 == self.attendeePresenceInReport.get(): if 1 == obj.attendeePresence: tmpText = tmpText + " (In Person)" else: tmpText = tmpText + " (On Phone)" if self.organizerNick.get() != "": if "" != tmpText: tmpText = tmpText + ", " tmpText = tmpText + self.organizerNick.get() tmpText = tmpText + " (Organizer)" if 1 == self.nonAttendeesInReport.get(): if "" != nonAttendees: tmpText = tmpText + "\n\n" if 1 == self.wikiFriendlyOutputInReport.get(): tmpText = tmpText + self.optionWikiTextBoldMarkStart.get () tmpText = tmpText + "Non Attendees: " if 1 == self.wikiFriendlyOutputInReport.get(): tmpText = tmpText + self.optionWikiTextBoldMarkEnd.get () tmpText = tmpText + nonAttendees if 1 == self.wikiFriendlyOutputInReport.get(): tmpText = tmpText + self.optionWikiTextCRLF.get () tmpText = tmpText + "\n" if "" == tmpText: tmpText = "[Attendee List]" if 1 == self.wikiFriendlyOutputInReport.get(): tmpText = tmpText + self.optionWikiTextCRLF.get () tmpText = tmpText + "\n" if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextBoldMarkStart.get () tmpInvite = tmpInvite + "Who : " if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextBoldMarkEnd.get () tmpInvite = tmpInvite + tmpText if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextCRLF.get() tmpInvite = tmpInvite + "\n" tmpDial = self.meetingDialNum.get() tmpAccess = self.meetingAccessCode.get() tmpURL = self.meetingURL.get() if tmpDial != "": if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextBoldMarkStart.get () tmpInvite = tmpInvite + "Dial: " if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextBoldMarkEnd.get () tmpInvite = tmpInvite + tmpDial if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextCRLF.get() tmpInvite = tmpInvite + "\n" if tmpAccess != "": if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextBoldMarkStart.get () tmpInvite = tmpInvite + "Access Code: " if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextBoldMarkEnd.get () tmpInvite = tmpInvite + tmpAccess if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextCRLF.get() tmpInvite = tmpInvite + "\n" if tmpURL != "": if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextBoldMarkStart.get () tmpInvite = tmpInvite + "URL: " if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextBoldMarkEnd.get () tmpInvite = tmpInvite + tmpURL if 1 == self.wikiFriendlyOutputInReport.get(): tmpInvite = tmpInvite + self.optionWikiTextCRLF.get() tmpInvite = tmpInvite + "\n" if 1 == self.markMinutesAsRevised.get(): self.finalReport = self.finalReport + "\n" self.finalReport = self.finalReport + "Revision " + self.minutesRevisionNumber.get() + ": " + self.minutesRevisionText.get() + "\n" if 1 == self.locationInMinutes.get(): self.finalReport = self.finalReport + "\n" if 1 == self.wikiFriendlyOutputInReport.get(): self.finalReport = self.finalReport + self.optionWikiTextBoldMarkStart.get () self.finalReport = self.finalReport + "Location: " if 1 == self.wikiFriendlyOutputInReport.get(): self.finalReport = self.finalReport + self.optionWikiTextBoldMarkEnd.get () if 0 == self.wikiFriendlyOutputInReport.get(): self.finalReport = self.finalReport + "\n---------\n" self.finalReport = self.finalReport + tmpLocation if 1 == self.wikiFriendlyOutputInReport.get(): self.finalReport = self.finalReport + self.optionWikiTextCRLF.get () self.finalReport = self.finalReport + "\n" if self.attendeeCount != 0: self.finalReport = self.finalReport + "\n" if 1 == self.wikiFriendlyOutputInReport.get(): self.finalReport = self.finalReport + self.optionWikiTextBoldMarkStart.get () self.finalReport = self.finalReport + "Attendees: " if 1 == self.wikiFriendlyOutputInReport.get(): self.finalReport = self.finalReport + self.optionWikiTextBoldMarkEnd.get () if 0 == self.wikiFriendlyOutputInReport.get(): self.finalReport = self.finalReport + "\n----------\n" self.finalReport = self.finalReport + tmpText if 1 == self.wikiFriendlyOutputInReport.get(): self.finalReport = self.finalReport + self.optionWikiTextCRLF.get () self.finalReport = self.finalReport + "\n" if self.issueCount != 0: self.finalReport = self.finalReport + "\n" if 1 == self.wikiFriendlyOutputInReport.get(): self.finalReport = self.finalReport + self.optionWikiTextBoldMarkStart.get () self.finalReport = self.finalReport + "Discussions: " if 1 == self.wikiFriendlyOutputInReport.get(): self.finalReport = self.finalReport + self.optionWikiTextBoldMarkEnd.get () if 1 == self.wikiFriendlyOutputInReport.get(): self.finalReport = self.finalReport + self.optionWikiTextCRLF.get() + self.optionWikiTextCRLF.get() self.finalReport = self.finalReport + "\n" else: self.finalReport = self.finalReport + "\n------------\n" tmpCount = 1 tmpKeys = self.discussions.keys() tmpKeys.sort() for id in tmpKeys: obj = self.discussions[id] tmpText = `tmpCount` + ". " + obj.details + "\n" tmpCount = tmpCount + 1 self.finalReport = self.finalReport + tmpText if self.decisionCount != 0: self.finalReport = self.finalReport + "\n" if 1 == self.wikiFriendlyOutputInReport.get(): self.finalReport = self.finalReport + self.optionWikiTextBoldMarkStart.get () self.finalReport = self.finalReport + "Decisions: " if 1 == self.wikiFriendlyOutputInReport.get(): self.finalReport = self.finalReport + self.optionWikiTextBoldMarkEnd.get () if 1 == self.wikiFriendlyOutputInReport.get(): self.finalReport = self.finalReport + self.optionWikiTextCRLF.get() + self.optionWikiTextCRLF.get() self.finalReport = self.finalReport + "\n" else: self.finalReport = self.finalReport + "\n----------\n" tmpCount = 1 tmpKeys = self.decisions.keys() tmpKeys.sort() for id in tmpKeys: obj = self.decisions[id] tmpText = `tmpCount` + ". " + obj.details if obj.contactNick != "": tmpText = tmpText + "Contact: " + obj.contactNick #if obj.contactEmail != "": # tmpText = tmpText + " <" + obj.contactEmail + ">" tmpText = tmpText + "\n\n" tmpCount = tmpCount + 1 self.finalReport = self.finalReport + tmpText if self.actionItemCount != 0: self.finalReport = self.finalReport + "\n" if 1 == self.wikiFriendlyOutputInReport.get(): self.finalReport = self.finalReport + self.optionWikiTextBoldMarkStart.get () self.finalReport = self.finalReport + "Action Points: " if 1 == self.wikiFriendlyOutputInReport.get(): self.finalReport = self.finalReport + self.optionWikiTextBoldMarkEnd.get () if 1 == self.wikiFriendlyOutputInReport.get(): self.finalReport = self.finalReport + self.optionWikiTextCRLF.get() + self.optionWikiTextCRLF.get() self.finalReport = self.finalReport + "\n" else: self.finalReport = self.finalReport + "\n-------------\n" tmpKeys = self.actionItems.keys() tmpKeys.sort() for id in tmpKeys: obj = self.actionItems[id] tmpText = "ID: " + obj.ID if 1 == self.wikiFriendlyOutputInReport.get(): tmpText = tmpText + self.optionWikiTextCRLF.get() tmpText = tmpText + "\n" if obj.contactNick != "": tmpText = tmpText + "Contact: " + obj.contactNick if 1 == self.wikiFriendlyOutputInReport.get(): tmpText = tmpText + self.optionWikiTextCRLF.get() tmpText = tmpText + "\n" if obj.expEndDate != "": tmpText = tmpText + "Expected Closure Date: " + obj.expEndDate if 1 == self.wikiFriendlyOutputInReport.get(): tmpText = tmpText + self.optionWikiTextCRLF.get() tmpText = tmpText + "\n" if obj.pastRef != "": tmpText = tmpText + "Past Reference: " + obj.pastRef if 1 == self.wikiFriendlyOutputInReport.get(): tmpText = tmpText + self.optionWikiTextCRLF.get() tmpText = tmpText + "\n" if obj.extRef != "": tmpText = tmpText + "External Reference: " + obj.extRef if 1 == self.wikiFriendlyOutputInReport.get(): tmpText = tmpText + self.optionWikiTextCRLF.get() tmpText = tmpText + "\n" if obj.updateID != 0: tmpText = tmpText + "Update ID: " + `obj.updateID` if 1 == self.wikiFriendlyOutputInReport.get(): tmpText = tmpText + self.optionWikiTextCRLF.get() tmpText = tmpText + "\n" if obj.percentComplete != 0: tmpText = tmpText + "Percent Complete: " + `obj.percentComplete` if 1 == self.wikiFriendlyOutputInReport.get(): tmpText = tmpText + self.optionWikiTextCRLF.get() tmpText = tmpText + "\n" if obj.actualCompletionDate != "": tmpText = tmpText + "Actual Completion Date: " + obj.actualCompletionDate if 1 == self.wikiFriendlyOutputInReport.get(): tmpText = tmpText + self.optionWikiTextCRLF.get() tmpText = tmpText + "\n" tmpText = tmpText + obj.details if 1 == self.wikiFriendlyOutputInReport.get(): tmpText = tmpText + self.optionWikiTextCRLF.get() + self.optionWikiTextCRLF.get() tmpText = tmpText + "\n" self.finalReport = self.finalReport + tmpText if self.finalReport == "": self.finalReport = "No " + tmpDocType + " of " + tmpType if 1 == self.wikiFriendlyOutputInReport.get(): tmpTitle = tmpTitle + self.optionWikiTextBoldMarkStart.get () if 1 == self.markMinutesAsRevised.get(): tmpTitle = tmpTitle + "[Revised] " if 1 == self.dateInReportTitle.get(): tmpTitle = tmpTitle + tmpDate + " " + tmpDocType + " of " + tmpType + " for " + tmpSubject else: tmpTitle = tmpTitle + tmpDocType + " of " + tmpType + " for " + tmpSubject + ", " + tmpDate if 1 == self.timeInReportTitle.get(): tmpTitle = tmpTitle + ", " + tmpFromTime + "-" + tmpToTime + " (" + self.meetingTimeZone.get() + ")" if 1 == self.wikiFriendlyOutputInReport.get(): tmpTitle = tmpTitle + self.optionWikiTextBoldMarkEnd.get () tmpTitle = tmpTitle + self.optionWikiTextCRLF.get() tmpTitle = tmpTitle + "\n" self.finalReport = tmpTitle + self.finalReport if 1 == self.meetingCostInReport.get(): tmpCost = self.computeMeetingCost() self.finalReport = self.finalReport + "\n\nCost of this " + tmpType + " was " + `tmpCost` + " " + self.attendeeCostUnitsStr.get() if 1 == self.taglineInReport.get(): self.finalReport = self.finalReport + "\n\nComposed with " + self.yama_tagline if tmpAgenda != "": self.finalReport = tmpAgenda + "\n\n" + self.finalReport self.finalReport = tmpInvite + "\n" + self.finalReport root = Tk() app = App(root) root.mainloop () print"Thanks for using YaMA. Bye"