summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/cover/barcode.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/utils/cover/barcode.scm b/utils/cover/barcode.scm
index b016e27..b178703 100644
--- a/utils/cover/barcode.scm
+++ b/utils/cover/barcode.scm
@@ -1,4 +1,5 @@
(import (chibi)
+ (chibi string)
(chibi sxml)
(srfi 1))
@@ -50,7 +51,7 @@
(E L G G L G L S R R R R R R E)))
(define (barcode number)
- "Get number in decima string"
+ "Get number in decimal string"
(let* ((nums (string->list number))
(digits (map (lambda (x) (string->number (list->string (list x))))
@@ -71,6 +72,8 @@
sep))))))
+(define (remove-dashes code)
+ (string-join (string-split code #\-) ""))
(define (barcode-sxml code x y scale)
@@ -84,7 +87,8 @@
(number->string width)
" "
(number->string height)))
- (encoded (barcode code)))
+ (code (remove-dashes code))
+ (encoded (barcode code)))
`(g
(@ (transform ,(string-append "translate(" (number->string x) ","
(number->string y) ")"