From the category archives:
Automator
Ever Fresh Desktop Pictures
Ever Fresh Desktop Pictures
Mac Tip #328, 05 March 2008
I love it when readers suggest Tips, as Peter did recently. Thanks to Peter I’ve discovered the many wonderful photos available at the National Geographic Photo of the Day and a quick and easy way to use these photos as the desktop picture on my Mac. I really want to share this delight with you.
Download the photos manually
Go to the Photo of the Day page and you see the current pick.
Click the Wallpaper link at the bottom of the photo. A new page appears where you can click on a link to download a copy of the photo at your preferred size.
Now use the instructions in OS X and Desktop Pictures, FBAMac Tip #113/06-Aug-2003 to set up your Desktop Pictures.
The screenshot shows my screen as I write this Tip: a gorgeous image of bison at Yellowstone Park.
Automate the downloads
A much easier way to do this though is to visit Maxwell Duncan’s site and download a small Automator script.
Double click the script each day to download the current Photo of the Day to your pictures folder without visiting the web page.
Automate the automation
Even better is to use iCal to automatically run the script each day, so you don’t have to remember. Duncan explains how.
My thanks to Duncan for this wonderful script, and Peter for drawing it to my attention and suggesting this Tip.
Popularity: 28% [?]
{ No comments yet }
Rename batches of files
Rename batches of files
Mac Tip #281/21-March-2007
Last week’s Automator tip showed how to resize photos, but Automator is useful for a great deal more than that.
Another task I often need to do is to rename loads of files. For example, I sometimes prepare a batch of about 20 photos for the Karori Wildlife Sanctuary’s website. I receive the photos with long names, such as: 17a Wetapunga release 11-2-07 AB D28F5394.JPG.
That’s way too long. Moreover, it’s better if filenames for photos going on the web are all lowercase and don’t contain spaces. I need to rename the photos with that in mind.
Add actions to the workflow
Select the photos in the Finder, open Automator, and follow the first two steps from last week’s Tip: In the Library column on the left select Finder. From the Action column in the middle select ‘Get Selected Finder Items’ and drag the action into the large, empty Workflow area on the right.
Copy items as a safeguard
With Finder still selected in the Library column on the left drag Rename Finder Items to the Workflow. As explained last week, an alert appears offering to duplicate the photos. If you decide to Add the Copy Finder Items step two actions are added to the Workflow, rather than just one.
For the Copy Finder Items action choose the destination for the copied files. They need to be copied to a different folder from the folder containing the source files you’re working with. I have a folder called ‘renamed’ that I choose as the destination.
Rename options
The Rename Finder Items action has many options, so choose Change Case to lowercase, including the extension, if you want the .JPG extension to change to .jpg too.
To remove spaces I need another instance of the Rename Finder Items action, so I drag another copy of it to the workflow. This time there’s no alert, as I’m already copying my photos in a previous step.
I choose the Replace Text option, enter a space in the Find box and Replace with a hyphen. This replaces the spaces in the filename with a hyphen.
View results
Finally, so I can check what happened after running the workflow I select Automator in the Library column, and drag ‘View Results’ from the Actions column to be the last step in the Workflow.
Then I run the Workflow. Afterwards I check my ‘renamed’ folder and see that indeed I have a second copy of my photo; the filename has been changed to lowercase and spaces have been replaced by hyphens.
Truncate filenames
There is still one problem remaining: the filename is too long. This is an area where Automator has shortcomings: I couldn’t find a way to automatically chop off anything after about the first 10 characters.
A Better Finder Rename
Since renaming batches of files is something I do very often, I actually invested years ago in a magnificent piece of software called A Better Finder Rename (US$20). It has dozens of options for renaming, and paid for itself in one use.
Note: on checking the price I see there’s a special offer on for the month of March 2007. If you often rename files you should check the web page right away.
Popularity: 16% [?]
{ No comments yet }
Resize images with Automator
Resize images with Automator
Mac Tip #280/14-March-2007
A friend recently complained of tedious amounts of time spent resizing photos and screenshots, which led me to explain how Automator can help. I mentioned Automator back in Automate It, Tip #195/11-May-2005.
I have a Finder folder of photos from my digital camera. In my case, each image is 2 or 3 megabytes, and maybe 3,888*2,952 pixels.
If I want to add some of these to my blog they need to be resized to more like 640*480 pixels and a much smaller file size.
Set up the action
Because I only ever work on copies of photos, and never the originals, I first copy the ones I want to resize to another folder and select them.
Set up the Automator workflow
To resize selected photos open Automator (in the Applications folder). In the Library column on the left select Finder. From the Action column in the middle select ‘Get Selected Finder Items’ and drag the action into the large, empty Workflow area on the right.
Next select Preview in the Library column, and drag ‘Scale Images’ from the Actions column to the Workflow area. Make sure it goes below the ‘Get selected Finder Items’ action: actions occur in the order they appear in the workflow.
When you use ‘Scale Images’ an alert will appear asking if you wish to make a copy of the selected items before you change the image files.
I had already made a copy of my files so I chose ‘Don’t Add’, but ‘Add’ is always a safe choice.
After the ‘Scale Images’ action is added to the Workflow, enter the size in pixels of the desired longer side for your resized photos.
View results is a good check
The next step is optional, but useful. Select Automator in the Library column, and drag ‘View Results’ from the Actions column to be the last step in the Workflow.
Run the workflow
Finally, click the Run button. Automator resizes all the selected photos and reports the results in the ‘View Results’ area.
The resulting photos
The photos have been resized and each is now about 100Kb. This is a larger filesize than a dedicated (and expensive) program such as Photoshop would create, but this is a quick and free action.
Many actions are available
There are many other actions you can use, including changing filenames to lowercase, and opening the images in Preview. Explore Automator’s Actions list to find other actions you may wish to add to your workflow.
Save a workflow
If you think you may want to use this workflow again, choose Save from Automator’s File menu and save it to your computer. Tip: make the filename expressive: I called my workflow ‘resize-to-640′. Next time you want to resize a batch of photos in that same way double-click the workflow, select photos in the Finder and click Run in the Automator window.
Download my Resize images workflow here. It’s a 3Kb zipped file, and includes an action to change the filename to lower case: My workflow as a zipped file (3Kb).
Coming soon: more Automator tips.
Popularity: 69% [?]
{ 6 comments }















