I'll probably start with a sql2replog.py and probably build from there.
You can also use the module ldap.modlist for diffing existing entries.
Ciao, Michael.