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.
(If you're in an RSS Feed reader, then you probably don't know it, but, there's a youtube video embedded at the beginning of the post telling you how to do this. So, you can watch the video instead of reading all the text.)
What you'll need:
An iPod with disk use enabled. (See here for instructions.)
The applescripts I use can be downloaded here. (No typing!) In the download is an alias the the Folder Action Scripts folder, so, you don't have to navigate there.
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 you iPod's name is "My iPoD" then you cannot enter "my ipod". It HAS to be "My iPoD"
We'll call this script "Sync Notes.scpt". Save it to (Your_HD)>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 Cmd-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 os 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 "folder action scripts" folder. (Like we did earlier.)
Once again, make sure that you substitute the myipodname property with the EXACT name of your ipod. Not "my ipod" but "My 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 Cmd-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 sec (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):
1: 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.
2: Don't forget to change the name of your ipod in the applescripts! If you don't, then this won't work.
3: As mentioned before, you can watch the embedded youtube video to get a better idea of how to do this. (Or, go to the YouTube site.
4: Finally, if you need help, don't be afraid to email me at: mactipper@gmail.com.
That's all for now! Come back on Sunday for some more tips from the mactipper blog! (Or, your could subscribe to the RSS feed and just have it delivered to your Feed Reader every day!)
2/8/08
iPod Notes Synchronaztion
Posted by
Oliver
at
Friday, February 08, 2008
Labels: AppleScript, iPod
Subscribe to:
Post Comments (Atom)


4 comments:
Far easier than doing all of this is just to use Flying Meat's VoodooPad Lite to manage all your notes, not just on your iPod. I've been using it for years and am not affiliated with the company.
Lite is the free version, and the real VoodooPad has many more features. highly recommended.
I'm BUSTA5000 & I downloaded your Sync Notes Applescripts.zip file & it didn't I did everything I think you missed something look at my steps & tell me what I did wrong:
1) plugged ipod "BUSTA5000" & copied notes in home file "USER".
2) I renamed both scripts with the title of the device "BUSTA5000".
3) I went to folder action & enabled it & added sync script in /volumes/.
4) I added note folder script in ~/notes/.
5) I copy any file to the notes folder in "USER" examples "sample_text.txt".
6)eject ipod & insert it. Unfortunately, notes file only contained the same file it contained before "instructions" (I noticed that you don't have it should I delete it?) well other than that the file was the same nothing changed.
Did you watch the video?
Also, try doing it one script at a time. This will narrow down possible errors.
hi, I've modified your script because It won't work with ipods that don't have spaces or ' in their name. also, if you have both ' and spaces in the name, it will only change ' chars. here's the modified script (only the char checking part):
if shellscriptname is equal to "" then
set shellscriptname to myipodname
if myipodname contains " " then
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 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
Post a Comment