Version 0.39.0: Advanced OLE writing
Pre-release
Pre-release
TheElementalOfDestruction
released this
18 Jan 03:49
·
452 commits
to master
since this release
This release fixed several issues while also significantly increasing the functionality of the OleWriter
class.
v0.39.0
- [TeamMsgExtractor #318] Added code to handle a standards violation (from what I can tell, anyways) caused by the attachment not having an
AttachMethod
property. The code will log a warning, attempt to detect the method, and throw aStandardViolationError
if it fails. - [TeamMsgExtractor #320] Changed the way string named properties are handled to allow for the string stream to have some errors and still be parsed. Warnings about these errors will be logged.
- [TeamMsgExtractor #324] Fixed an issues with contact saving when a list property returns
None
. - [TeamMsgExtractor #326] Fixed a bug that could cause some files to error when exporting.
- Fixed an issue where creation and modification times were not being copied to the new OLE file created by
OleWriter
. - Fixed up a few docstrings.
- Fixed a few issues in
MSGFile
regarding thefilename
keyword argument. - Added new argument
rootPath
toOleWriter.fromOleFile
for saving a specific directory from an OLE file instead of just copying the entire file. That directory will become the root of the new one. - Adjusted code for
OleWriter
to generate certain values only at save time to make them more dynamic. This allows for existing streams to be properly edited (although has issues with allowing storages to be edited). - Added new function
OleWriter.deleteEntry
to remove an entry that was already added. If the entry is a storage, all children will be removed too. - Added new function
OleWriter.editEntry
to edit an entry that was already added. - Added new function
OleWriter.addEntry
to add a new entry to the writer without anOleFileIO
instance. Properties of the entry are instead set using the same keyword arguments as described inOleWriter.editEntry
. - Changed
_DirectoryEntry
toDirectoryEntry
to make the more finalized version public. Access to the originals that theOleWriter
class creates should never happen, instead copies should be returned to ensure the behavior is as expected. - Added new function
OleWriter.getEntry
which returns a copy of theDirectoryEntry
instance for that stream or storage in the writer. Use this function to see the current internal state of an entry. - Added new function
OleWriter.renameEntry
which allows the user to rename a stream or storage (in place). This only changes it's direct name and not it's location in the new OLE file. - Added new function
OleWriter.walk
which is similar toos.walk
but for walking the structure of the new OLE file. - Added new function
OleWriter.listItems
which is functionally equivalent toolefile.OleFileIO.listdir
which returns a list of paths to every item. Optionally a user can get the paths just for streams, just for storages, or both. Requesting neither will simply return an empty list. Default is to just return streams. - Added a small amount of path validation to
inputToMsgPath
which is used in a lot of places where user input for a path is accepted. It ensures illegal characters don't exist and that the path segments (each name for a storage or stream) are less than 32 characters. This will be most helpful forOleWriter
. - Added many internal helper functions to
OleWriter
to make extensions easier and consolidate common code. Many of these involve direct access to internal data which is why they are private.