From 29bbb45decd4f867ef7cd8d458bfcef9a2bddb7b Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Sun, 6 Oct 2024 20:50:08 +0200 Subject: Use command line args for input/output files --- stickers.scm | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/stickers.scm b/stickers.scm index ca81224..eb20bee 100644 --- a/stickers.scm +++ b/stickers.scm @@ -23,9 +23,14 @@ (size path-size path-set-size!) (color path-color path-set-color!)) -; Load here the glyphs you need, the only ones that are more or less defined -; are the English ones -(load "glyphs/ru.scm") + + +(define args (cdr (command-line))) + +(define INFILE (first args)) +(define OUTFILE (second args)) + +(load INFILE) (define a4-size '(297 . 210)) (define a5-size '(210 . 148)) @@ -181,10 +186,4 @@ text { outport)) - - -(define args (cdr (command-line))) - -(if (< 0 (length args)) - (call-with-output-file (car args) dump) - (dump (current-output-port))) +(call-with-output-file OUTFILE dump) -- cgit v1.2.3