tech:utiliser-git-pour-vos-logos-en-svg
Utiliser Git pour vos logos en SVG
Voir http://w.xuv.be/projects/design_with_git
Faire du diffing graphique (oui ! pas en texte) avec Git sur des images vectorielle en SVG
compare.py
#!/usr/bin/env python import sys, os inkscape = "inkscape" local = sys.argv[1] remote = sys.argv[2] tempdir = "/home/markv/gittemp/" localpng = tempdir+"local.png" remotepng = tempdir+"remote.png" if(not (remote.endswith(".svg") and (local != "/dev/null"))): os.system("xxdiff %s %s" % (local, remote)) else: os.system(inkscape+" "+local+" --export-png="+localpng+" -w600 -h900 -C -bffffff -y1.0") os.system(inkscape+" "+remote+" --export-png="+remotepng+" -w600 -h900 -C -bffffff -y1.0") os.system("compare "+localpng+" "+remotepng+" - | display") os.remove(localpng) os.remove(remotepng)
Ajoutez dans votre .gitconfig (adapter le chemin)
~/.gitconfig
[difftool "compare"] cmd = "/home/USER/bin/compare.py $LOCAL $REMOTE - | display"
Puis par exemple
git difftool -y -t compare
tech/utiliser-git-pour-vos-logos-en-svg.txt · Dernière modification : de Jean-Baptiste
