From 13f1e411416920a11d8d124a61cf80450694ba80 Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Thu, 26 Aug 2010 11:04:26 -0400 Subject: [PATCH] Added BeyondCompare scripts, Open Terminal Here and Resize script to resize a directory of images to 250x250 using mogrify --- bc/compare | 3 +++ bc/compare_to_selected | 4 ++++ bc/select_for_compare | 3 +++ open_terminal_here | 3 +++ resize_250x250 | 3 +++ 5 files changed, 16 insertions(+) create mode 100755 bc/compare create mode 100755 bc/compare_to_selected create mode 100755 bc/select_for_compare create mode 100755 open_terminal_here create mode 100755 resize_250x250 diff --git a/bc/compare b/bc/compare new file mode 100755 index 0000000..eff8345 --- /dev/null +++ b/bc/compare @@ -0,0 +1,3 @@ +#!/bin/sh +quoted=$(echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | awk 'BEGIN { FS = "\n" } { printf "\"%s\" ", $1 }' | sed -e s#\"\"##) +bcompare $quoted \ No newline at end of file diff --git a/bc/compare_to_selected b/bc/compare_to_selected new file mode 100755 index 0000000..92b2acb --- /dev/null +++ b/bc/compare_to_selected @@ -0,0 +1,4 @@ +#!/bin/sh +arg2=$(cat $HOME/.beyondcompare/nautilus) +arg1=$(echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | awk 'BEGIN { FS = "\n" } { printf "\"%s\" ", $1 }' | sed -e s#\"\"##) +bcompare $arg1 $arg2 \ No newline at end of file diff --git a/bc/select_for_compare b/bc/select_for_compare new file mode 100755 index 0000000..b85bf43 --- /dev/null +++ b/bc/select_for_compare @@ -0,0 +1,3 @@ +#!/bin/sh +quoted=$(echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | awk 'BEGIN { FS = "\n" } { printf "\"%s\" ", $1 }' | sed -e s#\"\"##) +echo "$quoted" > $HOME/.beyondcompare/nautilus \ No newline at end of file diff --git a/open_terminal_here b/open_terminal_here new file mode 100755 index 0000000..a69e846 --- /dev/null +++ b/open_terminal_here @@ -0,0 +1,3 @@ +#!/bin/sh +cd $NAUTILUS_SCRIPT_CURRENT_URI +gnome-terminal diff --git a/resize_250x250 b/resize_250x250 new file mode 100755 index 0000000..9448155 --- /dev/null +++ b/resize_250x250 @@ -0,0 +1,3 @@ +#!/bin/sh +cd $NAUTILUS_SCRIPT_CURRENT_URI +mogrify -resize 250x250 *.*