X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=site_scons%2Flib%2Fdot-munge.pl;fp=site_scons%2Flib%2Fdot-munge.pl;h=263b44e24a328803aad6997ba4e16ba9e97104d9;hb=42f4a13c65272fe04b84831dd3dee3c0be401ec7;hp=0000000000000000000000000000000000000000;hpb=089c4afe6d7ccd9c586557a2d574cc6a20db4aab;p=senf.git diff --git a/site_scons/lib/dot-munge.pl b/site_scons/lib/dot-munge.pl new file mode 100755 index 0000000..263b44e --- /dev/null +++ b/site_scons/lib/dot-munge.pl @@ -0,0 +1,38 @@ +#!/usr/bin/perl -i -n + +# Reduce fontsize and change font +s/fontsize=10/fontsize=8/g; +s/fontname="FreeSans.ttf"/fontname="Verdana"/g; + +# Wrap long labels (templates and pathnames) +if (/label=\"([^"]{48,})\"/) { #"])){ # To make emacs happy ... + $pre=$`; + $post=$'; #'; # To make emacs happy ... + $label=$1; + + # Break at each komma or / + $label=~s{[,/]}{$&\\r\\ \\ \\ \\ \\ \\ \\ \\ }g; + + # If more than one '<' is in the label, break after each '<' + if (($label=~tr/1) { + $label=~s/