Version 0.47.0
·
132 commits
to master
since this release
v0.47.0
- Changed the public API for
PropertiesStoreto improve the quality of its code. The properties type is now mandatory, and the intelligence field (and the related enum) has been removed.- Additionally, the
toBytesand__bytes__methods will both generate based on the contents of this class, allowing for new properties to be created and for existing properties to be modified or removed if the class is set to writable on creation.
- Additionally, the
- Added new method
Named.getPropNameByStreamID. This method takes the ID of a stream (or property stream entry) and returns the property name (as a tuple of the property name/ID and the property set) that is stored there. ReturnsNoneif the stream is not used to store a named property. This name can be directly used (if it is notNone) to get theNamedPropertyBaseinstance associated. This method is most useful for people looking at the raw data of a stream and trying to figure out what named property it refers to. - Fixed mistake in struct definitions that caused a float to require 8 bytes to unpack.
- Added tests for
extract_msg.properties.props. - Added basic tests for
extract_msg.attachments. - Added validation tests for the
enumsandconstantssubmodule. - Removed unneeded structs.
- Fixed an issue where
PtypGuidwas being parsed by the wrong property type. Despite having a fixed size, it is still a variable length property. - Fixed all of the setters not working. I didn't know they needed to use the same name as the getter, and I swear they were working at some point with the current setup. Some sources online suggested the original form should work, which is even stranger.
- Unified all line endings to LF instead of a mix of CRLF and LF.
- Changed enums
BCTextFormatandBCLabelFormattoIntFlagenums. The values that exist are for the individual flags and not the groups of flags. - Made
FieldInfowritable, however it can no longer be directly converted to bytes since it requires additional information outside of itself to convert to bytes. It still retains atoBytesmethod, however it requires an argument for the additional data. - Fixed
UnsupportedAttachmentinverting theskipNotImplementedkeyword argument. - Fixed
DMPaperSizenot being a subclass ofEnum. - Extended values for
DMPaperSize. - Removed unneeded structs.
- Fixed exports for
extract_msg.constants.st. - Updated various parts of the documentation to improve it and make it more consistent.
- Fixed
Recipient.existsTypedPropertyandAttachmentBase.existsTypedPropertyhaving the wrong return type. - Removed "TODO" markers on
OleStreamStructand finalized it to only handle the OLEStream for embedded objects. - Fixed type annotations for
extract_msg.utils.fromTimeStamp. - Added new function
extract_msg.properties.prop.createNewProp. This function allows a new property to be created with default data based on the name. The name MUST be an 8 character hex string, the first 4 characters being the value for the property ID and the second 4 being the value for the type. - Fixed
VariableLengthProp.reservedFlagsreturning the wrong type. - Adjusted many of the property structs to make it easier to use them for packing.
- Renamed some of the property structs to be more informative.
- Fixed
ServerIDusing the wrong struct (would have thrown an exception for not having enough data). - Unified signing for integer properties. All integer properties are considered unsigned by default when read directly from the MSG file, however specific property accessors may convert to signed if the property is specifically intended to be so. This does not necessarily include properties that are stored as integers but have a value that is not an integer, like
PtypCurrency. - Changed
extract_msg.constants.NULL_DATEto be a subclass ofdatetime.datetimeinstead of just a fixed value. Functions that return null dates may end up returning distinct versions ofNullDate(the newly created subclass), however all instances ofNullDatewill register as being equal to each other. Existing equality comparisons to theNULL_DATEconstant will all function as intended, howeverischecks may fail for some null dates. - Changed currency type to return a
Decimalinstance for higher precision. - Made
FixedLengthPropandVariableLengthPropwritable. Only the propertyflagsfromPropBaseis writable. This also includes the ability to convert them to bytes based on their value. - Fixed many issues in
VariableLengthPropregarding it's calculation of sizes. - Removed
hasLenfunction. - Changed style to remove space between variable name and colon that separates the type.
- Corrected
InvaildPropertyIdErrortoInvalidPropertyIdError. - Updated to
olefileversion 0.47. - Updated
RTFDEminimum version to 0.1.1. - Changed dependency named for
compressed-rtfto remove minor typo (it should forward to the correct place regardless, but just to be safe). - Fixed issues with implementation of
OleWriterwhen it comes to large sets of data. Most issues would fail silently and only be noticeable when trying to open the file. If your file is less than 2 GB, you would likely not have notices and issues at all. This includes adding a new exception that is throw from thewritemethod,TooManySectorsError. - Fixed some issues with
OleWriterthat could cause entries to end up partially added if the data was an issue.