#!/bin/sh
#This is a skeleton script for Velocity by Kyle Davis

#VARIABLES:
#  var      - a normal variable, no special rules
#  booleans - empty string means a variable will be FALSE, anything else is considered TRUE
#  array    - a comma seperated list of items
#
version="1.1";	#var: version of your script
name="Script Name";	#var: name that will appear in Velocity
authors="Authors";	#array: authors list (eg. "joe,mary,fred")
about="Single line containing a short description of what this script does";	#var: short description
mimetypes="x-directory/normal";	#array: list of supported MIME types (eg. "text/plain,text/x-sh,text/x-perl")
dependancies="prog1,prog2,prog3";	#array:  list of programs you need for this script
needterm="";	#boolean:  Velocity should run this script in a terminal
multiplefiles="";	#boolean:  Whether or not Velocity is allowed to send multiple files to this script
localonly="Yes";	#boolean:  If Velocity should ignore this script on non-local files
#
#NOTE:  here is a snippet to read all arguments sequentially if you want to support multiple files
#See the audio conversion scripts in ($PREFIX/share/velocity/scripts/) for a full example
#  #!/bin/sh
#  while [ $# != 0 ]; do
#     echo "$1"
#     shift
#  done
case $1 in
	--get-info)
		#DO NOT CHANGE THIS LINE, THIS IS THE VELOCITY SCRIPT CONFIG FORMAT
		echo -en "$version\n$name\n$authors\n$about\n$mimetypes\n$dependancies\n$needterm\n$multiplefiles\n$localonly"
		;;
	--execute)
		shift;windowx=$1
		shift;windowy=$1
		shift;windowwidth=$1
		shift;windowheight=$1
		shift;location=$1
		#start dependancies
		shift;dprog1=$1
		shift;dprog2=$1
		shift;dprog3=$1
		#end dependancies

		shift;file=$1
		shift;mimetype=$1
		#YOUR CODE GOES HERE!
		;;
	*)
		echo "This should only be used by Velocity."
		;;
esac
