diff options
author | Boutade <thegoofist@protonmail.com> | 2019-04-15 13:31:21 -0500 |
---|---|---|
committer | Boutade <thegoofist@protonmail.com> | 2019-04-15 13:31:21 -0500 |
commit | 921c5a127c76c30c63451e55cbd5b0c59476a5ed (patch) | |
tree | f8285be0e0e341ab16c970ea34ff849e9a6ae887 | |
parent | dadf2c0dc4df5b892a91cba30870b55bb861ed04 (diff) |
Added CLI
-rwxr-xr-x | imbricate.ros | 28 |
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: |