PSP Hacks: Tips & Tools for Your Mobile Gaming and Entertainment Handheld

Hack 25. Automate Mac OS X File Transfers

If you're running Mac OS X Tiger, then you can set up Automator to move all your media files onto your PSP.

I spent a little time in Automator (located in the Applications folder) and put together some basic applications to move my files from my Mac to my PSP. I'll walk you through each of them. Each of these can be saved as either an Automator action or a standalone application. Please excuse the cheesy names I've given to these little apps.

3.6.1. PSP Playlist2PSP

The first and easiest of these little apps is built with just a few actions, but you have to set it up first. Open iTunes and create a Playlist called "Transfer to PSP." On your PSP, create a folder inside the Music folder (located inside the PSP folder), and name this folder "from iTunes."

Open up Automator. Choose iTunes from the Application pane and drag the Find iTunes Items action over to the workflow. Under Find, choose Songs and under Whose, choose "Playlist," then "Is" and "Transfer to PSP." Now, choose Finder in the Application pane and drag the Move Finder Items over to the workflow. Under To: set the location to the "from iTunes" folder you created on your PSP and check the Replacing Existing Files box. Figure 3-16 shows the completed workflow.

That's it. Save as either a workflow or application. Make sure that your PSP is connected and mounted and that the songs in the "Transfer to PSP" playlist are in PSP-compatible formats before you run it.

Figure 3-16. PSP Playlist2PSP workflow

3.6.2. Movies2PSP

Now, the previous Automator workflow was dead-on simple. This one is about the same. This time, open up Automator and choose Spotlight from the Application pane. Drag the Find Finder Items action over to the workflow. Under Where, choose your Movies folder and under Whose, choose "Name" and "Ends With," and enter .MP4 in the field.

Choose Finder in the Application pane and drag the Move Finder Items action to the workflow. Set To: to the 101MNV01 folder inside the MP_ ROOT folder on your Memory Stick and check the Replacing Existing Files box. See Figure 3-17.

That's it. Save as either a workflow or application and make sure you have your PSP connected and mounted before you run it.

Figure 3-17. Movies2PSP workflow

3.6.3. Audiobook2PSP

Here's something slightly more complex to automate the processes discussed in "Convert Text to Audio for Your PSP" [Hack #24]. This will be a three-part workflow: it will first prompt the user to select a text file; it will then read the text file to AIFF and convert it to MP3; and it will finish by moving the created audiobook to the proper place on your PSP.

3.6.3.1. Choose a text file.

Open Automator and select the Finder from the Applications pane. Drag the "Ask for Finder Items" action and the "Open Finder Items" action into your workflow. In the first action, set "Type:" to Files and "Start at:" to Desktop, then type Choose a text file to convert to MP3: in the "Prompt:" field. Leave the Allow Multiple Selection box unchecked. This part of the workflow will open up a dialog prompting the user to select a text file for conversion to MP3 and then pass that text file along to the next action.

In the second action, set "Open with:" to TextEdit. The text file selected in the first part of the action will open in TextEdit. That's it for the first section of this workflow (see Figure 3-18).

Figure 3-18. Choosing a text file to open in TextEdit

3.6.3.2. Convert the text file to an MP3.

Next, select TextEdit in the Automator Application pane. Drag the "Get Contents of TextEdit…" action into the workflow. This action simply scrapes the text from the front-most page (the page that the first part of this workflow just opened) in TextEdit and passes this text along to the next action.

Next, drag the "Text to Audio File" action over to the workflow. Here you can choose whichever System Voice you prefer; it will default to whatever voice you have set in System Preferences Speech Text to Speech. Whatever name you give the audio file under the Save As: field will be the same name (minus the audiobook.aiff, but feel free to name your track whatever you like. Set Where: to the Desktop.

Select iTunes in the Application pane of Automator and drag the Import Audio File, Start iTunes Playing, and Pause iTunes actions into the workflow. Make sure you set the Import Audio File action to use MP3 Encoder and check the "Delete source files after encoding" box to neatly remove the audiobook.aiff file that was created on the desktop in the previous step. The next two actions simply ensure that the recently encoded audiobook.mp3 file is the file currently selected in iTunes before going on to the next section of the workflow. Figure 3-19 shows the completed workflow.

Figure 3-19. Converting text to MP3

3.6.3.3. Move the MP3 to your PSP.

Drag the "Get the Current Song" action from iTunes over to the workflow. This simple action grabs the track currently set to play in iTunes and passes it along to the next action.

Choose Finder in the Application pane of Automator and drag Move Finder Items over to the workflow. Set the To: option to the MUSIC folder located inside the PSP folder on your Memory Stick and leave the Replacing existing files box unchecked (Figure 3-20).

When you run this complete action, it will prompt you for a text file, which it will then launch in TextEdit and write to an AIFF file on your desktop. Once this file is fully created, iTunes will launch and import the file, converting it to MP3, and then it will pass the track along to the Finder, which will place the file on your Memory Stick. Enjoy.

Figure 3-20. Moving the current song to the /PSP/MUSIC/ folder

3.6.4. Hacking the Hack

Now, what's good about these workflows is that they play nicely together. You could easily slap all three of them together into one PSP media management application, either by performing all the same commands in a row with one longer workflow, or by saving them as three separate actions that you call on at different points in a more program-like interface with a dialog prompt asking you what you want to do: move Movies or Audio, or make an Audiobook? If you just want to improve on the Movies2PSP action, you could first convert your movies into the proper format for PSP playback [Hack #22] and then move the converted files to your PSP.

Категории