Friday, 16 April 2010

nifty little renamer

I'm pretty stoked about a little Automator function I set up to handle a problem I deal with a lot as a web developer - bulk renaming files...

So first, the problem. I get a bunch of 15 or 50 files to use as assets online, either documents or images for a gallery or something. So, more often than not they come like this:

Points tO the KEYNOTE SPEAKER.doc
NewsLETTER version 4.0.pdf
etc

Now, spaces are bad on web, and caps are dreadful. When dealing with a unix server it's worse because you have to match the case exactly. So, mac users - fire up nifty Automator... Let's create a Service:


You'll want to click on the Service option (selected in the image) because that way you'll have your function added to any right click!









Then you'll want to do a couple of things. What I do is create an output directly, which in this case I've called "sized" on my desktop, because my original outputs were all resized images. I digress, create this directory wherever you want it.

Now, you'll see your screen divided into two halves, as indicated in this image. The left half lists functions you can use (arranged in a sort of category -> function drill down effect), and on the right is your flow.

You won't have any items in your flow section yet, so for starters, select "files or folders" in the drop down. This sets the service to expect input as files and folders.

Now, after doing that, you've told automator you're gonna give it files, you need to tell it what to do. So, for safety, start with a copy:

On the left window, in the Library under Files & Folders, find the "Copy Finder Items" task, select it, and drag it into the right-hand window.

Select your desired directory (I've checked "replace existing files").

Then find the "Rename Finder Items" task, and drag it across. Select the dropdown to "Replace Text". Enter a space into the Find: textbox. (I selected in basename only). I then entered an underscore ( _ ) in the Replace: textbox. This is now set to replace all spaces with underscores. You can change your options accordingly.

I also added another Renamer task to set the name to title case. I'll yet do another task which will set the extension to Lowercase. Wow, and save - all done. It's added to the Services menu.

Feel free to download the workflow I did here. Put it in your Services folder, in the Library folder in your user directory. [/Users/_your_username_/Library/Services].

A toaster to the person who picks up the irony in the download...

Thursday, 15 April 2010

A thought on testimony

In Deuteronomy 19:15 the LORD decrees that only by the testimony of two or three witnesses will a charge be sustained. It is a requirement of the LORD that this be so. Interestingly, a decree from the LORD is established and fulfills this requirement, there are two AND three witnesses, two witnesses in observation, three witnesses in agreement.

When the LORD said, "Let there be light" - it was declared, it was so, and it was established with two witnesses to the member of the Godhead who thus spoke, and with three witnesses in terms of agreement to the truth and validity of the speaking.

Everything the LORD does fulfills this - there is agreement, unity, and truth which is all established in any decree.

Rejection of the idea of the trinity, where the three Persons of God is One, means the falling away of the fulfilling of this requirement.

Check out John 5 where Jesus provides witnesses for his testimony - John the baptist, His own works, the Father, scripture, and Moses... that's 5 witnesses to His testimony. Everything fits! wow...