Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 0.35.0 #276

Merged
merged 68 commits into from
Jul 11, 2022
Merged

Version 0.35.0 #276

merged 68 commits into from
Jul 11, 2022

Conversation

TheElementalOfDestruction
Copy link
Collaborator

@TheElementalOfDestruction TheElementalOfDestruction commented Jul 11, 2022

v0.35.0

  • [TeamMsgExtractor #206] Implemented full support for Post objects, including the ability to save them.
  • [TeamMsgExtractor #212] Implemented full support for Task objects, including the ability to save them. This also includes TaskRequest objects.
  • [TeamMsgExtractor #110] Implemented full support for Contact objects, including the ability to save them.
  • [TeamMsgExtractor #143] Rewrote the system used for Appointment objects to include all of the objects specified in [MS-OXOCAL]. Name changed to AppointmentMeeting. Completed support for Appointment objects, including the ability to save them.
  • [TeamMsgExtractor #243] Added optional dependency mimetype-magic (installable using the mime extra) which helps to identify attachments that do not give a mime-type.
  • [TeamMsgExtractor #274] Apparently the properties stream can have random garbage at the end of it (outlook generate the file that showed this) so code was added to ensure it wouldn't break everything.
  • [TeamMsgExtractor #274] Made sure that the save function would report if it failed to find or generate a valid body. Specifically, if you were just trying to use the plain text body but it didn't exist (the stream didn't exist, not that the stream was empty) it would silently pass, which was bad behavior. Additionally, allowFallback will change the message to specify that current options were not usable for getting a valid body.
  • [TeamMsgExtractor #207] Changed behavior for max date. Apparently it looks like it is supposed to be August 31, 4500 at 11:59 PM. However, in case this needs to change, we have created a constant called extract_msg.constants.NULL_DATE to represent this that you can use in your code to not have to worry about changing your code if we check it.
  • Moved a few more minor constants to enums.
  • Added support for many internal data structures, specifically Entry ID structures.
  • Refactored classes from extract_msg.data to submodule extract_msg.structures.
  • Added python_requires to setup.py as I noticed that it was missing.
  • Due to new saving requirements, adjusted the way header injection worked all around. Functions are now built-in to MessageBase. getSaveXBody functions have also been moved down to be defined in MessageBase. If the extension class needs to specify custom behaviors for creating the save bodies, these functions will need to be overridden.
    • For saving, MessageBase (being the lowest one to currently contain bodies) has a few new properties. These properties represent the injection strings that will be injected into the bodies for the header, with an additional property to specify what properties map to what part of the format string. See MessageBase.headerFormatProperties for more information and an example of how to implement this in your own class.
    • Injection strings in constants have been removed in favor of dynamic generation, which only creates what is needed. No you will no longer see an empty Bcc field in your messages when you save them.
    • Plain text bodies now also use this injection, making it easy to change the header in all bodies by overwriting a single property that tells the program what data to put where.
  • Fixed issue in encapsulated RTF header that caused the "To" field to not be present. I had to write them by hand, so it was bound to happen. They are now dynamically generated by each instance, so these fields should always appear.
  • All save code has been moved down from Message into MessageBase for convenience. Message exists now for specific checking and for future specializations. This also means that anything that is a MessageBase now has the entire framework for saving built-in, with easy way to change details.
  • Fixed bad property in Contact.
  • Created save function for Contact. Saving, though it exists, is rather minimal and is limited to plain text and HTML.
  • Significantly extended the Contact class's properties.
  • Adjusted the naming of a few Contact properties to better match the microsoft names.
    • firstName -> givenName.
    • lastName -> surname.
    • businessPhone -> businessTelephoneNumber
    • Etc.
  • Changed existing fax properties to give a dictionary of the properties they actually contain rather than just the number. This makes them behave like the newly added email properties.
  • Fixed issues with Task properties being incorrect.
  • Added implementation for PtypErrorCode.
  • Changed behavior of Properties.date to only return the submit time. This is to ensure messages that were never sent do not have a sent date.
  • Changed behavior of MessageBase.date to only return a send date if the message has been sent. For messages with no flags, it assumes True.
  • Generally brought saving behavior closer to the way outlook handles it.
  • Made SignedAttachment and BaseAttachment more similar by adding properties to each that are shared. BaseAttachment now have a name property and SignedAttachment now have longFilename and shortFilename.
  • Fixed issue in HTML saving that would cause some characters to be dropped when rendering them due to how the header injection worked.
  • Removed __init__ methods from MSG classes that don't change it. This ensures notes are easily passed down.
  • Correction to last comment, one max date was supposed to be at that date, but another max date is at a different date of the same year.
  • Changed the way that PtypTime is handled, making it a single function in utils.
  • Upgraded dependencies to newer versions (some really need to be newer, like tzlocal, for best results). Included dependencies are beautifulsoup4 and tzlocal.
  • Fixed an issue where zip file naming conflicts always failed in zip files for attachments. Both the embedded msg and the plain attachments would fail.
  • Actually fixed the issue that would break the main loop.
  • MSGFile no longer inherits directly from OleFileIO. While I would prefer to do that, the __init__ method for it is rather expensive, and allowing embedded msg files to directly share each other's instances of OleFileIO would improve speed immensely.
  • Fixed attachments not being preemptively loaded when delayAttachments was False.
  • utils.openMsg now delays attachments while loading the file to get the class type. This means all time for attachments is cut in half as they are only ever loaded once. It also means that files that won't open due to attachments will error a little later, but this shouldn't be a problem.
  • Changed named properties Guid back to constants. This has to do with the next entry.
  • Fixed a major issue in named properties. Apparently the ID is not enough and you must have the GUID as well, as multiple properties can share the exact same ID.
  • Added option --no-folders to the command line allowing you to save all attachments from a set of MSG files into a single folder.
  • Added option --skip-embedded to the command line to skip saving embedded MSG files.
  • Added option skipEmbedded to Attachment.save (and all other related save methods that call it) to skip saving an embedded MSG file.
  • Changed __main__ so that it opens the zip file there instead of relying on everything it calls to do it again and again.
  • Changed the behavior of --verbose to allow it to be stacked for more verboseness. Specifying it once turns on warnings, twice for info, and three times for debug. Not specifying it only turns on error logging.

@TheElementalOfDestruction TheElementalOfDestruction merged commit 0b58ed4 into master Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant