brianwarehime/mcrits — pull request #7 by wxsBSD (2014-12-04 19:48:37+00:00)
Title: Major re-write.

In order to make things cleaner I re-wrote everything. This PR does a bunch of things:

1. There is no longer a need to start at a specific entity. The starting point can be arbitrary. Just drag an entity on the screen, give it an ID and run your transforms. Each created entity will have the right type and ID for more transforms to be run on it.

2. The code now uses pycrits to abstract away all the fetching. Make sure you have the latest version of that installed (there currently is no releases, so just use master).

3. There is an mcrits class which everything uses, which wraps the pycrits class. This allows us to have a single place for parsing configuration files, etc and also common functions can live there. This makes most of the transforms very simple to write.

4. Values are always sanitized now. This was a problem with From addresses in emails containing characters that were interpreted as XML ("John Doe "). Also, you can now pass lists to entity fields.

5. None of this code is optimized in any way. If you fetch 1000 related emails there will be 1001 API calls, which will be slow. This is because the first fetch is to get relationships from the starting point, and the subsequent 1000 calls will be to get each related object so we can get attributes of them. This can be reconsidered in the future.