aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasaya Tojo <masaya@tojo.tokyo>2021-04-17 04:13:07 +0900
committerMasaya Tojo <masaya@tojo.tokyo>2021-04-17 04:15:28 +0900
commitd3c8d4b40548192631d4b0b9e91a8d6a8743dd82 (patch)
tree40df8bf5daf7da82018d0b70f7f7206d35a3868a
parent468dad8117b6ea978cb1ab2cefba20b791e6d07f (diff)
Cheange interfaces.
* configure.ac: Version Up. * extract-green-color.scm (show-version): Version Up. (main)[hue-minus]: Removed. [hue-plus]: Removed. [hue-red]: New local variable. [hue-blue]: New local variable. (show-usage): Change help message.
-rw-r--r--configure.ac2
-rwxr-xr-xextract-green-color.scm14
2 files changed, 8 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index a5eff4b..27b38ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([extract-green-color], [1.0.2])
+AC_INIT([extract-green-color], [2.0.0])
AC_CONFIG_SRCDIR([extract-green-color.scm])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
diff --git a/extract-green-color.scm b/extract-green-color.scm
index 2d56d6b..3f9e868 100755
--- a/extract-green-color.scm
+++ b/extract-green-color.scm
@@ -75,8 +75,8 @@
Extract green color from input-file and save to output-file.
Options:
- -m, --hue-minus hue threshold to express distance to red (default 60)
- -p, --hue-plus hue threshold to express distance to blue (default 60)
+ -r, --hue-red hue threshold to express distance to red (default 60)
+ -b, --hue-blue hue threshold to express distance to blue (default 60)
-s, --saturation saturation threshold (default 0)
-v, --value value threshold (default 0)
@@ -86,13 +86,13 @@ Options:
(define (show-version)
(format (current-error-port)
- "extract-green-color.scm 1.0~%"))
+ "extract-green-color.scm 2.0~%"))
(define (main args)
(let* ((option-spec `((version (single-char #\V))
(help (single-char #\h))
- (hue-minus (single-char #\m) (value #t) (predicate ,string->number))
- (hue-plus (single-char #\p) (value #t) (predicate ,string->number))
+ (hue-red (single-char #\r) (value #t) (predicate ,string->number))
+ (hue-blue (single-char #\b) (value #t) (predicate ,string->number))
(saturation (single-char #\s) (value #t) (predicate ,string->number))
(value (single-char #\v) (value #t) (predicate ,string->number))))
(options (getopt-long args option-spec)))
@@ -108,8 +108,8 @@ Options:
(exit 1))
(match-let (((input-file output-file) (option-ref options '() '())))
(im-save (extract-green-color (im-load input-file)
- (string->number (option-ref options 'hue-minus "60"))
- (string->number (option-ref options 'hue-plus "60"))
+ (string->number (option-ref options 'hue-red "60"))
+ (string->number (option-ref options 'hue-blue "60"))
(string->number (option-ref options 'saturation "0.0"))
(string->number (option-ref options 'value "0.0")))
output-file))))