From ad2237c16b64b9d9934f037854f2cacfc0520716 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Mon, 16 Apr 2012 15:28:34 -0400 Subject: [PATCH] added useful gimp script, added better checking for nechung in rev control. --- scripts/gimp/batch-whiteboard-clean.scm | 16 ++++++++++++++++ .../how_to_use_whiteboard_cleaner_script.txt | 6 ++++++ scripts/rev_control/checkin.sh | 1 + scripts/rev_control/getem.sh | 1 + 4 files changed, 24 insertions(+) create mode 100644 scripts/gimp/batch-whiteboard-clean.scm create mode 100644 scripts/gimp/how_to_use_whiteboard_cleaner_script.txt diff --git a/scripts/gimp/batch-whiteboard-clean.scm b/scripts/gimp/batch-whiteboard-clean.scm new file mode 100644 index 00000000..90e597ec --- /dev/null +++ b/scripts/gimp/batch-whiteboard-clean.scm @@ -0,0 +1,16 @@ +(define (batch-whiteboard-clean pattern) + (let* ((filelist (cadr (file-glob pattern 1)))) + (while (not (null? filelist)) + (let* ((filename (car filelist)) + (image (car (gimp-file-load RUN-NONINTERACTIVE + filename filename))) + (drawable (car (gimp-image-get-active-layer image)))) + (plug-in-dog RUN-NONINTERACTIVE + image drawable 6.0 2.0 FALSE TRUE) + (plug-in-c-astretch RUN-NONINTERACTIVE + image drawable) + (gimp-file-save RUN-NONINTERACTIVE + image drawable filename filename) + (gimp-image-delete image)) + (set! filelist (cdr filelist))))) + diff --git a/scripts/gimp/how_to_use_whiteboard_cleaner_script.txt b/scripts/gimp/how_to_use_whiteboard_cleaner_script.txt new file mode 100644 index 00000000..2862cfbb --- /dev/null +++ b/scripts/gimp/how_to_use_whiteboard_cleaner_script.txt @@ -0,0 +1,6 @@ +gimp -i -b '(batch-whiteboard-clean "*.png")' -b '(gimp-quit 0)' + +# from sites: +# http://matthew.mceachen.us/blog/how-to-clean-up-photos-of-whiteboards-with-gimp-403.html +# http://registry.gimp.org/node/19822 + diff --git a/scripts/rev_control/checkin.sh b/scripts/rev_control/checkin.sh index 04badac6..df405124 100644 --- a/scripts/rev_control/checkin.sh +++ b/scripts/rev_control/checkin.sh @@ -2,6 +2,7 @@ # checks in all the folders present in the REPOSITORY_LIST variable. +source "$FEISTY_MEOW_SCRIPTS/core/functions.sh" source "$FEISTY_MEOW_SCRIPTS/rev_control/rev_control.sh" # selects the method for check-in based on where we are. diff --git a/scripts/rev_control/getem.sh b/scripts/rev_control/getem.sh index f493ddba..fb553348 100644 --- a/scripts/rev_control/getem.sh +++ b/scripts/rev_control/getem.sh @@ -2,6 +2,7 @@ # gets any updates for the repository folders present in the REPOSITORY_LIST variable. +source "$FEISTY_MEOW_SCRIPTS/core/functions.sh" source "$FEISTY_MEOW_SCRIPTS/rev_control/rev_control.sh" # trickery to ensure we can always update this file, even when the operating system has some -- 2.34.1