This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi Jamison, Thanks again! For your info, here, what you proposed does not work: #!/bin/sh # -*- mode: scheme; coding: utf-8 -*- exec java -Dkawa.command.name="$0" kawa.repl --script3 "$0" "$@" (let ((cl (command-line))) (format #t "Hello from \"~a\"~%My arguments were:~%~{~a~%~}" (car cl) (cdr cl))) -> david@capac:~/lpdi/projects/kawa 329 $ ./test a b c d=3 Error: Could not find or load main class kawa.repl This works: #!/bin/sh # -*- mode: scheme; coding: utf-8 -*- exec kawa --script4 "$0" "$@" !# (let ((cl (command-line))) (format #t "Hello from \"~a\"~%My arguments were:~%~{~a~%~}" (car cl) (cdr cl))) -> david@capac:~/lpdi/projects/kawa 331 $ ./test a b c d=3 Hello from "/opt/bin/kawa --script4 ./test" My arguments were: a b c d=3 Now, here is a small but complete kawa/imagej snipset which works as well _but_ iif I use (exit): I don't know why, presumably because of imagej? not important I thought I'd share ... #!/bin/sh # -*- mode: scheme; coding: utf-8 -*- export CLASSPATH=\ /usr/lpdi/projects/kawa:\ /usr/lpdi/projects/kawa/jars/ij.jar:\ /usr/lpdi/projects/kawa/jars/nl-mean.jar exec kawa -Dplugins.dir=/usr/lpdi/projects/kawa/jars --script8 "$0" "$@" !# ;;;; ;;;; Copyright (C) 2015 ;;;; David Pirotte <david at altosw dot be> ;;;; This module is part of a set of image processing modules and ;;;; scripts written using Kawa and ImageJ. ;;;; This module is free software: you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published ;;;; by the Free Software Foundation, either version 3 of the License, ;;;; or (at your option) any later version. ;;;; It is distributed in the hope that it will be useful, but WITHOUT ;;;; ANY WARRANTY; without even the implied warranty of ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;;;; General Public License for more details. ;;;; You should have received a copy of the GNU General Public License ;;;; along with this s/w. If not, see <http://www.gnu.org/licenses/>. ;;;; ;;; Commentary: ;;; Code: (import (utils) (ij-core) (ij-nl-mean)) (let* ((cmd (command-line)) (dir (list-ref cmd 1)) (im-name (list-ref cmd 2)) (im-type (list-ref cmd 3)) (im-out (list-ref cmd 4)) (sigma (string->number (list-ref cmd 5))) (im-filename (string-append dir "/" im-name "." im-type)) (iplus (ij-open im-filename))) (ij-nl-mean iplus sigma) (ij-save iplus (string-append dir "/" im-out "." im-type)) (exit)) #| ./nl-mean . images/nlm-small png images/nlm-out 30 |#
Attachment:
pgpWZDMIF9GsF.pgp
Description: OpenPGP digital signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |