So last weekend I started digging into this finding a way how can i save my time by pushing the latest commit of my git branch and emailing the colleague i work with the colour diff, lately last weekend I also discovered that there is already a command that do part of it , git send-email I thought I could use that, but unfortunately I was disappointed that it doesn't send diffs in colour, then I found a package on pypi ansi2HTML and thought my problem is solved and to my astonishment I discovered that I cannot use git send-email in conjunction with ansi2HTML since ansi2HTML embeds styles in head tag in HTML <style > for colour formatting and gmail doesn't support <styles> tag within the message body. So I kept going, and just yesterday I came up with a way to convert simple diff to HTML colour diff, then I used smtplib python module to send email. manually tested and all working fine. Code reviewed here
Blog, Website Content, VFX Showreel work & Tools & Scripts by Sanjeev Kumar is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.