Using Ant and Say Command for Notification

I use ANT to automate a lot of the work I do around the web.  Some things are so tedious I don’t want to have to do them.  Others just take a long time, and I would rather the computer spend that time instead of me.

The difficulty with that is ANT doesn’t notify you when it is done.  Sure it prints a message that it’s done in the terminal window, but unless you’re looking there, you’ll never know. I stumbled on an easy way of getting notifications that are flexible and easy to work with on OS X:

The say command

In OS X, go to your command line and type 

say hello

Your Mac should respond in creepy robotic tones “Hello.”

You can get it to say anything… Okay, get all the immature juvenile tricks out now. My personal favorite:

say "I've got the collywobbles."

Okay. You can make it say anything, so you can make it say:

say “I’m done uploading all of your files to the website.”

So make an ANT task like: 

https://gist.github.com/2776139.js?file=build1.xml

And join it with another ANT task like:

https://gist.github.com/2776139.js?file=build2.xml

Call them both from an ANT task like:

https://gist.github.com/2776139.js?file=build3.xml

And there you have it. ANT with notification. Creepy creepy robotic notifications.

What I like about this over say, sound effects, is that this method allows me to label specifically what each notification means, which helps if I run a few concurrent processes.

One thought on “Using Ant and Say Command for Notification

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s