View Single Post
Old 02-22-2014, 10:17 PM   #12
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by loximuthal View Post
Thanks! The particular code you suggested didn't work for me, and anyway I only want to launch one book at a time. I used this instead:
Code:
while ( $# )
	ebook-edit "$1"
	shift
end
and everything worked swimingly.

Further details, for others who might want to do this, in the Automator dialog:
Shell:/bin/csh
Pass Input: as arguments

EDIT: I should have realized, but this script will only take books dropped on it. It does not launch the program independently. That's ok for me, but you may have a different work flow.
Try this instead:

Code:
if [ "$1" != "" ]
	while [ "$1" != "" ]
		ebook-edit "$1"
		shift
	done
else
	ebook-edit
fi
So it only calls your code if arguments are passed, else it just calls ebook-edit.

DISCLAIMER: I am allowed to know this since I am a linux guy even though I'm not a Mac guy.
eschwartz is offline   Reply With Quote