(define-module (elenq) #:use-module (sxml simple) #:use-module (ice-9 match)) (define (num x) (number->string (exact->inexact x))) (define (elenq-logo sub size rotation-deg) (sxml->xml `(svg (@ (width ,(num (* size))) (height ,(num (* size (/ 10 22)))) (viewBox ,(string-join (list (num (* size 22 -1/2)) (num (+ (* -1.4 size) (* size 10 -1/2))) (num (* size 22)) (num (* size 10))) " "))) (g (@ (id "elenq-logo") (transform ,(string-append "scale(" (num size) ")" "rotate (" (num rotation-deg) ")"))) (g (@ (transform "scale(0.33333)")) (text (@ (x 0) (y 0) (style "font-size: 30; line-height: 1.25; font-family: armata; stroke: none; text-anchor: middle")) "ElenQ") (text (@ (x 0) (y 8) (style "font-size: 10; line-height: 1.25; font-family: armata; stroke: none; text-anchor: middle;")) ,sub)))))) (match (command-line) ((name text) (elenq-logo (string-upcase text) 100 0)) (_ (format (current-error-port) "USAGE: elenq.scm NAME\n" ) (exit 1)))