summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Okay <okay@toyful.space>2019-04-15 13:31:21 -0500
committerColin Okay <cbeok@protonmail.com>2020-10-12 09:37:42 -0500
commit0a35e12dbc49067eff4c3be830e72839cd06c1b6 (patch)
treef8285be0e0e341ab16c970ea34ff849e9a6ae887
parentdadf2c0dc4df5b892a91cba30870b55bb861ed04 (diff)
Added CLI
-rwxr-xr-ximbricate.ros28
1 files changed, 18 insertions, 10 deletions
diff --git a/imbricate.ros b/imbricate.ros
index 5828da1..fbdf700 100755
--- a/imbricate.ros
+++ b/imbricate.ros
@@ -1,12 +1,12 @@
-;; #!/bin/sh
-;; #|-*- mode:lisp -*-|#
-;; #|
-;; exec ros -Q -- $0 "$@"
-;; |#
-;; (progn ;;init forms
-;; (ros:ensure-asdf)
-;; #+quicklisp(ql:quickload '(imago cl-fad) :silent t)
-;; )
+#!/bin/sh
+#|-*- mode:lisp -*-|#
+#|
+exec ros -Q -- $0 "$@"
+|#
+(progn ;;init forms
+ (ros:ensure-asdf)
+ #+quicklisp(ql:quickload '(imago cl-fad) :silent t)
+ )
(defpackage :ros.script.imbricate.3764151058
(:use :cl))
@@ -136,5 +136,13 @@
(defun main (&rest argv)
- (declare (ignorable argv)))
+ (declare (ignorable argv))
+ (destructuring-bind (path target) argv
+ (let* ((tile-stats (images-under-dir path))
+ (packlist (build-packlist tile-stats))
+ (tilesheet (pack-images packlist))
+ (tile-index (packlist->tile-index packlist)))
+ (imago:write-png tilesheet (format nil "~a.png" target))
+ (write-tile-index tile-index (format nil "~a-index.lisp" target))))
+ (format t "ALL DONE~%"))
;;; vim: set ft=lisp lisp: