diff --git a/graph.png b/graph.png deleted file mode 100644 index 92c02ef..0000000 Binary files a/graph.png and /dev/null differ diff --git a/graphgif.scm b/graphgif.scm index 9a80dec..7a9c36f 100644 --- a/graphgif.scm +++ b/graphgif.scm @@ -24,24 +24,6 @@ ((10 . 40) (0 2 4) ,white) ((40 . 40) (1 2 3) ,white))) -(define-syntax-rule - (for x n stmt ...) - (let loop ([x 0] - [lst '()]) - (if (< x n) - (loop (1+ x) - (cons lst (stmt i))) - lst))) - -(define large-web - (let ([lst '()]) - (do (i (1+ i)) - ((> i 10)) - (do (j (1+ j)) - ((> j 10)) - (set! lst (cons `((,i . ,j) - ,(map )))))))) - (define (edge-painter cr graph) (lambda (node) (cairo-set-source cr black) @@ -84,7 +66,7 @@ surface)) (define my-surface (draw-abstract-graph more-complex-graph)) -(cairo-surface-write-to-png my-surface "graph.png") +(cairo-surface-write-to-png my-surface (cadr (command-line))) (cairo-surface-destroy my-surface) ;; Local Variables: diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..3a7f1d6 --- /dev/null +++ b/run.sh @@ -0,0 +1,9 @@ +#!/usr/bin/bash + +GRAPH_FILE=/tmp/graph.png + +set -e + +guile graphgif.scm $GRAPH_FILE +feh $GRAPH_FILE +rm $GRAPH_FILE