Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Work with iPod notes without iPod connected iPod
Do you use your iPod for notes? Do you want to be able to manage your notes while your iPod isn't plugged in? Well, here's how you can manage your notes on your computer and have them appear on your iPod. What you'll need:
  • An iPod with disk use enabled.
  • A couple of AppleScripts.
Step 1: Copy the notes folder on your iPod to your home folder. So, you should have a folder at "~/Notes/". This folder should be a duplicate of the notes folder on your iPod.

Step 2: Save the following as an AppleScript:
property myipodname : "My iPod"
property shellscriptname : ""

on adding folder items to theFolder after receiving theItems
if shellscriptname is equal to "" then
if myipodname contains " " then
set shellscriptname to myipodname
set current_name to shellscriptname
set search_string to " "
set replacement_string to "\ "
set AppleScript's text item delimiters to the search_string
set the text_item_list to every text item of the current_name
set AppleScript's text item delimiters to the replacement_string
set the shellscriptname to the text_item_list as string
set AppleScript's text item delimiters to ""
end if
if myipodname contains "'" then
set shellscriptname to myipodname
set current_name to shellscriptname
set search_string to "'"
set replacement_string to "\'"
set AppleScript's text item delimiters to the search_string
set the text_item_list to every text item of the current_name
set AppleScript's text item delimiters to the replacement_string
set the shellscriptname to the text_item_list as string
set AppleScript's text item delimiters to ""
end if
end if
repeat with i in theItems
tell application "Finder"
set thename to name of i
end tell
if thename is equal to myipodname then
do shell script ("rm -r -f /Volumes/" & shellscriptname & "/Notes/")
do shell script ("cp -R -f ~/Notes/ /Volumes/" & shellscriptname & "/Notes/")
end if
end repeat
end adding folder items to
Edit the myipodname property to reflect the name of your iPod -- it has to be exact. If your iPod's name is My iPoD then you cannot enter my ipod. We'll call this script Sync Notes.scpt; save it to /Library » Scripts » Folder Action Scripts.

Step 3: Make a new folder action using the script. Launch Applications » Applescript » Folder Actions Setup.app. Click on the plus sign in the lower left hand corner. When asked for a folder, hit Command-Shift-G and type /Volumes/, then hit return. This should bring you to a folder that shows all the current volumes mounted on your computer. After selecting the volumes folder, you'll be prompted to choose a script. Select Sync Notes.scpt from the menu that appears.

Step 4: Test it out. To test it out, eject your iPod. Then, add a .txt file to ~/Notes/ on your computer and reinsert your iPod. When your iPod is mounted, the notes folder on your iPod should be the same as the notes folder on your computer. If it works, good! Move onto the next step.

Step 5: Make it so that you can edit your notes folder while the iPod is plugged in. One of the problems so far is that if you edit your ~/Notes/ folder while your iPod is plugged in, then the notes folder on your iPod won't update. To fix this, save the following as an AppleScript:
property myipodname : "MY'IPOD"
property shellscriptname : ""

on editcomputernotes()
if shellscriptname is equal to "" then
if myipodname contains " " then
set shellscriptname to myipodname
set current_name to shellscriptname
set search_string to " "
set replacement_string to "\ "
set AppleScript's text item delimiters to the search_string
set the text_item_list to every text item of the current_name
set AppleScript's text item delimiters to the replacement_string
set the shellscriptname to the text_item_list as string
set AppleScript's text item delimiters to ""
end if
if myipodname contains "'" then
set shellscriptname to myipodname
set current_name to shellscriptname
set search_string to "'"
set replacement_string to "\'"
set AppleScript's text item delimiters to the search_string
set the text_item_list to every text item of the current_name
set AppleScript's text item delimiters to the replacement_string
set the shellscriptname to the text_item_list as string
set AppleScript's text item delimiters to ""
end if
end if
set mountedvolumes to do shell script "ls /Volumes/"

if mountedvolumes contains myipodname then
do shell script ("rm -r -f /Volumes/" & shellscriptname & "/Notes/")
do shell script ("cp -R -f ~/Notes/ /Volumes/" & shellscriptname & "/Notes/")
end if
end editcomputernotes

on adding folder items to theFolder after receiving theItems
editcomputernotes()
end adding folder items to

on removing folder items from theFolder
editcomputernotes()
end removing folder items from
We'll call this AppleScript notes folder.scpt, and save it to the same Folder Action Scripts folder as we used before. Once again, make sure that you substitute the myipodname property with the exact name of your ipod.

Step 6: Set up a folder action for the ~/Notes/ folder. Go back to the Folder Actions Setup.app and make a new folder action for the notes folder in your home folder. (Hit Command-Shift-G and type ~/Notes). When prompted, select the notes folder.scpt from the possible folder action scripts.

Step 7: Test it again. Almost done. Just plug in your iPod and add something to your ~/Notes/ folder. Then, wait a second (for the script to run). You should see the Finder window your working in become unselected for a moment. Then, go to your iPod notes folder and check it out. If it is a mirror of your computer notes folder, then you have succeeded! Congratulations!

A few final notes (no pun intended):
  • This is not synchronizing the notes folder of your iPod; it is simply replacing the notes folder on your iPod with the notes folder on your computer.
  • Don't forget to change the name of your ipod in the AppleScripts! If you don't, then this won't work.
[robg adds: This hint is a slightly-edited version of the author's original blog entry. There you'll also find a YouTube video showing how the process works. I don't use notes on my iPod at all, and I haven't tested these scripts. A commenter on the blog post notes that you can do the same thing with the free Voodoo Pad Lite, and I believe there are other similar apps out there.]
    •    
  • Currently 2.30 / 5
  You rated: 5 / 5 (10 votes cast)
 
[9,261 views]  

Work with iPod notes without iPod connected | 1 comments | Create New Account
Click here to return to the 'Work with iPod notes without iPod connected' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Applescript Error
Authored by: MacTipper on Dec 06, '08 09:18:46AM

Rob, something probably got messed up when you copied it over here. This line found in the first script:

set replacement_string to "\ "

should read:

set replacement_string to "\\ "

with two forward slashes.

Thanks,
MacTipper



[ Reply to This | # ]