Change Title to Title Case
Summary: Fixes the capitalization of the selected records’ titles.
Requires: EagleFiler
Install Location: ~/Library/Scripts/Applications/EagleFiler/
Description
This script helps you clean up titles with improper case. For example, some Web pages or PDFs have titles that are all in capital letters. This script changes the title so that only the first letter of each word is capitalized.
Download in Compiled Format · Download in Text Format
Script
tell application "EagleFiler"
set _records to selected records of browser window 1
repeat with _record in _records
set _title to _record's title
set _newTitle to my titleCase(_title)
set _record's title to _newTitle
end repeat
end tell
on titleCase(_string)
set _code to "import sys; print sys.argv[1].title()"
set _script to "/usr/bin/python -c " & _code's quoted form & " " & _string's quoted form
return do shell script _script
end titleCaseLast Modified: 2010-11-27
Running the Script
You can use AppleScript Editor (AppleScript Utility prior to Mac OS X 10.6) to enable Mac OS X’s built-in Script menu. To run the script, just select it from the menu. FastScripts provides a similar menu that supports keyboard shortcuts and other features.