From 62fa4928230478b1a0955810b4d967080faee1d9 Mon Sep 17 00:00:00 2001 From: Dane Johnson Date: Fri, 11 Oct 2024 16:41:11 -0500 Subject: [PATCH] Running script, graph put in requested file location --- graph.png | Bin 2308 -> 0 bytes graphgif.scm | 20 +------------------- run.sh | 9 +++++++++ 3 files changed, 10 insertions(+), 19 deletions(-) delete mode 100644 graph.png create mode 100755 run.sh diff --git a/graph.png b/graph.png deleted file mode 100644 index 92c02efa752c1a748710f579715da4c60fb8d6af..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2308 zcmeAS@N?(olHy`uVBq!ia0y~yV4MKL985qF{<{lj11Yv7Z+91l{~)+v@AAnE3>-T> zT^vIy=DfYT*MD-Z{PBmI&lex}OkgT0N)>!wCh}3=pwPg|WYG)@Np^R3_i`pfmerld zW^6D$_+!(06PJAJhD_?}97@QAIbJ^Q!jZK2PXMRUY;=FfS$>sNMae*Ss}l^^H# z|K(;V@!rrN(ZqU0Ku6)&#e-R9v$?ssjln=%FDAom_F=30FT&XV)m87$-Wv6_>hFik zufA5TzIsdg08sdtOZ5gbGczyE$&)8*Yiq~vtGRjeW@KdK%o#H@mgeN-@Dwe(xR$4< z^IJmb>Z?Isi!WMKY`B;)C1};vR|@G;cTXLdvEt3&y2me$969pt-Mj1St+9Z zdwcuJl`8>pjdD9bot&(`zy817l&_8ZXRK~<==qj#_Wb$jL1yOW{Bn2dBUWE!yLtL* z*4D>i_v|$t(*JLp7Zk5RPEzy zYd$|a>j?6|@BbUVefu_T`t)+NDdE zUcGwNYw4xqn+`-|)_X>*3<(Pl-@a{|n7H`&ejPo%eH9-cy}7x0zFnBaG7;s5VKe*XUVcN8v` zF*ba5ZEf_oumc5O_aD|;dL?V?_xJbBrFvI~um5ND~$9K z*X~oXu`x_51A`Ah+2b$M+rJ(!zxSt5tXEd-Li@b(h`W3IH|z&W&HXC2=H30PYa$O^ z_$sg_F5MtQ%pm42+v@$DhO=0CF2WMz?|6O-!)GTVP4*DwC z+qbXo$I9k2+g}x24%-`7|K-I*{&S4~R@Am%%`mxk{d&8d;j+Uzv%Y@)>bBVM!Fl{q;fDux0idKPA8NmAYNO%Bf0H&GJ~CtBmyP{Er~U4k&X}}?eKk-d zYOUFcxOHKxWw&pNG;uKhSN;Fr-{yY*ITjmt?)>@d>+6*(R~o0E`}5=DKGSWxk%8W=Z;orjvi}#w%?2i 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