File tree Expand file tree Collapse file tree 2 files changed +35
-2
lines changed Expand file tree Collapse file tree 2 files changed +35
-2
lines changed Original file line number Diff line number Diff line change 3636 out='generation/gh-pages/std-2023'
3737 mkdir -- "$out"
3838
39- gcc -E cpp23/flowchart.dot.cpp | dot -Tsvg -start=1000 > "$out"/initialization.svg
40- gcc -E cpp23/flowchart.dot.cpp | dot -Tpng -start=1000 > "$out"/initialization.png
39+ cpp23/build.sh "$out"/initialization.svg "$out"/initialization.png
4140
4241 - name : Deploy generated flowcharts to Github Pages
4342 if : github.ref == 'refs/heads/main'
Original file line number Diff line number Diff line change 1+ # !/usr/bin/env perl
2+
3+ # Based on https://biowize.wordpress.com/2011/03/11/text-wrapping-with-dot-graphviz/
4+
5+ use strict;
6+
7+ my $usage = " setdotlabelwidth [char-width] < [dotfile]" ;
8+ my $width = shift () or die (" Usage: $usage $! " );
9+
10+ while (<STDIN >)
11+ {
12+ if (m / label="((?:\\ .|[^\\ "])*)"/ )
13+ {
14+ my $labeltext = $1 ;
15+ my @words = split (/ / , $labeltext );
16+ my @newtext = ();
17+ my $newline = " " ;
18+ foreach my $word (@words )
19+ {
20+ if ( length ($newline ) > 0 and
21+ length ($newline ) + length ($word ) > $width )
22+ {
23+ push (@newtext , $newline );
24+ $newline = " " ;
25+ }
26+ $newline .= " " if ( length ($newline ) > 0 );
27+ $newline .= $word ;
28+ }
29+ push (@newtext , $newline ) if ( length ($newline ) > 0 );
30+ my $newlabel = join (" \\ n" , @newtext );
31+ s / label="((?:\\ .|[^\\ "])*)"/ label="$newlabel "/ ;
32+ }
33+ print ;
34+ }
You can’t perform that action at this time.
0 commit comments