git repository from here: https://gitlab.com/sansupercool/git-maildiff
So last weekend I started digging into this finding a way how I can save my time by pushing the latest commit of my git branch and emailing the diff to my colleague of my work with the colour diff, 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, having diff in colour easily lets pick up where the changes have been made, 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 digging, 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 the diff through email. manually tested and all working fine.
git repository from here: https://gitlab.com/sansupercool/git-maildiff
0 Comments
Even I didn't thought that it would be this simple, and for a programmer their is really no need of downloading ansi2html or pygmentaize modules to generate colour diffs. While working on a home weekend projects I do to level up my skills I came up with simple method to which you just pass normal diff data as argument and it will output HTML of colour diff keeping the tabs intact. I hope you like it !!!
all git commands are stored here: /usr/local/git/libexec/git-core alright, started with GIT a while back, and since GIT is also how I manage my code at office, it is indispensable thing I must know. So here are few git commands I learnt so far. if you don't want to use terminal for git command you can use sourceTree or magit on emacs
|
![]()
Custom Search
Other Blogs & PagesGit Commands Animation & VFX SitesA MUST READ for Ani/VFX Artistsawakened by thoughts,
|