PocketSense will read transactions as an OFX file for accounts held at some financial institutions, and will feed them to Microsoft Money. This is mainly for some US brokers and credit cards.
I made a function that can be used in scrubber.py that removes certain transactions that you can specify. There is a data structure that contains pairs of tags and qualifying content.
For example, you could list BUYMF, 1234567898 as an item. Then all <BUYMF>..... </BUYMF> transactions that contain 1234567898 (typically a CUSIP) would be removed. Where could this come up? Normally you expect your sweep money market not
have the buys and sells in the OFX file. If they start showing up sometimes, you might want them to be ignored. There could be other cases. The content test is pretty flexible. The important thing is that only the specified types of transactions are tested
and possibly removed.
The function could be in a different file, so the scrubber would have an appropriate include, or the function could be added to scrubber.py.
This function also contains a line to add some newlines if your ofx file is run together. That improves human readability.
I know this is of limited interest, but if you are interested, I could post the code.