diff --git a/docs/Example GIF/Example GIF.gif b/docs/Example GIF/Example GIF.gif deleted file mode 100644 index d1fea10..0000000 Binary files a/docs/Example GIF/Example GIF.gif and /dev/null differ diff --git a/docs/getDateReceived.py b/docs/getDateReceived.py deleted file mode 100644 index 8728929..0000000 --- a/docs/getDateReceived.py +++ /dev/null @@ -1,16 +0,0 @@ -self.dateReceived = self.__getDateReceived() -... -def __getDateReceived(self) -> str: - """Returns time item was received in mm-dd-yy hh:mm am/pm format. - - Example: - 07-23-20 10:34 AM - - Returns: - str: time item was received in mm-dd-yy hh:mm am/pm format. - """ - timeFromHeader = self.__getMostRecentHeaderByType("Date") - parsedTimeFromHeader = time.strptime(timeFromHeader, "%a, %d %b %Y %H:%M:%S %z") - formattedTime = time.strftime("%m-%d-%y %I:%M %p ", parsedTimeFromHeader) - - return formattedTime \ No newline at end of file diff --git a/docs/parseSections.py b/docs/parseSections.py deleted file mode 100644 index 348fd51..0000000 --- a/docs/parseSections.py +++ /dev/null @@ -1,44 +0,0 @@ -def __parseSections(self) -> list: - contentStart = self.__getHeaderBoundary() + 1 - contentEnd = len(self.__rawItem) - 1 - - # Find line numbers where sections start - sectionBoundaries = [ {"start": contentStart} ] - - for lineNumber in range(contentStart, contentEnd + 1): - line = self.__rawItem[lineNumber] - if line.startswith("***") or line.startswith("===") and not line.startswith("===="): - sectionBoundaries.append({"start": lineNumber}) - sectionBoundaries.append({"start": contentEnd + 1}) - - # Set line number where section end - for boundaryIndex in range(0, len(sectionBoundaries) - 1): - sectionBoundaries[boundaryIndex]["end"] = sectionBoundaries[boundaryIndex + 1]["start"] - - # Remove End of File boundary - del sectionBoundaries[-1] - - # Make list of sections and parse content - sections = [] - delimiters = [ - {"name": "edit", "pattern": "*** Edited"}, - {"name": "status", "pattern": "*** Status"}, - {"name": "replyToUser", "pattern": "*** Replied"}, - {"name": "replyFromUser", "pattern": "=== "} - ] - - for boundary in sectionBoundaries: - line = self.__rawItem[boundary["start"]] - sectionType = None - - for delimiter in delimiters: - if line.startswith(delimiter["pattern"]): - sectionType = delimiter["name"] - - if sectionType is None: - sectionType = "initialMessage" - - sectionContent = self.__rawItem[boundary["start"] : boundary["end"]] - sections.append({"type": sectionType, "content": sectionContent}) - - return sections \ No newline at end of file