Tidy up your HTML
If you write HTML by hand, you may already be familiar with Tidy, an open-source program that checks your code; tells you where there are errors; and, in some cases, corrects them. Tidy is available for many platforms, and it’s included in certain text editors, such as Bare Bones Software’s $125
OS X 10.4 includes a command-line version of Tidy, located at /usr/bin/tidy. You can use it to generate cleaned-up versions of HTML, XML, and XHTML files, and you can even convert files between these formats. For example, here’s the command you’d type in Terminal (/Applications/Utilities) to convert HTML to XML and output the results to a new file (press control-D after the output is finished). You would, of course, replace
with the name of your original file and the name of the one you’d like to create:
test.html -output new.xml
If you just wanted to display errors and quit, you’d use this command:
tidy -errors test.html
If you wanted to change all your tags to upper case, you’d enter:
For more on using the command-line version of Tidy, type
in Terminal. If you don’t want to use the command line, and don’t work with BBEdit or another text editor that includes Tidy, you can install
, which adds Tidy’s functionality to your Services menu, for use with Cocoa applications.
However you use it, Tidy will help you not only write correct HTML code but also clean up any unnecessary tags. It can save you time and make your Web pages better and more efficient.
Spotlight on Spotlight
One of OS X 10.4’s most touted features is Spotlight, a constantly updated index of pretty much everything on your Mac. When you first install OS X, Spotlight begins creating its index, and then it updates that index regularly as you add new files to your system. It also indexes
or data about data—for example, the date a picture was taken, the shutter speed used, and so on.
Access Spotlight by pressing 1-spacebar. A search field drops down from the top right corner of the screen. Spotlight goes to work as soon as you begin to type here—even before you press return. Alternatively, you can press 1-option-spacebar to bring up a larger Spotlight search window.
You can find nearly any file, as long as you can remember something about it—say, the title or a key phrase it contains. The more words you’re able to give Spotlight, the more accurate the matches will be. Search for
and you’ll probably get thousands of results. Search for
the yellow submarine,
though, and your results will be much more specific. Spotlight can search iChat transcripts, Mail and Entourage e-mail messages, Address Book contacts, iCal calendar files, Word and Excel documents, and PDF files. It can also search for information in JPEG, PNG, TIFF, and GIF images; MP3 and AAC audio files; and QuickTime movies.
Seek Friendly Programs
Some particularly Spotlight-friendly applications do some work behind the scenes to make it possible to search their files’ content. Take, for example, Delicious Monster’s $40 book- and media-management tool
). After you create your library, you can search for anything in it via Spotlight. A quick search for
Warner Home Video
on my Mac, for instance, found the 23 movies from that studio that I have. If you have a choice, choose programs that help you in this way.
Here’s a list
of more than 50.
Simplify Your Index
Does your Mac contain some things that you don’t want Spotlight to index? For example, I keep a backup of my Current Projects folder on my second internal hard drive. If left alone, Spotlight will find two matches for anything in that folder—one for the original and one for the backup. To tell Spotlight to ignore something, go to Spotlight’s preference pane, click on the Privacy tab, click on the plus sign (+), and navigate to the folder you’d like to exclude.
Jump through Spotlight’s Results As Spotlight finds matches for your search terms, it displays them in a drop-down window below the search box. The results are organized into categories, and you can use the up- and down-arrow keys to move from item to item. To move around in a hurry, though, use 1 and the up- or down-arrow key: pressing 1-down arrow will jump to the first entry in the next category; 1-up arrow will do the same in the previous category. To open a highlighted item, press return.
Customize Spotlight’s Search Data
If you use an application launcher, such as Peter Maurer’s free Butler, Objective Development’s $20 LaunchBar, or Blacktree’s free Quicksilver (see
Launch Your Productivity
), you don’t need to use Spotlight to look for your programs. Take advantage of this fact to eliminate these matches from your search results and speed up Spotlight. Similarly, if you don’t want Spotlight to search your iTunes library (something that launchers do very well), disable those results. Go to Spotlight’s preference pane, click on the Search Results tab, and deselect items you don’t want in your results.