Re: How to export documentation bookmarks? SOLVED
Re: How to export documentation bookmarks? SOLVED
- Subject: Re: How to export documentation bookmarks? SOLVED
- From: Bill Cheeseman <email@hidden>
- Date: Thu, 1 Jul 2010 13:32:35 -0400
On Jun 29, 2010, at 11:01 AM, Bill Cheeseman wrote: On Jun 29, 2010, at 8:39 AM, Jean-Daniel Dupas wrote:
You may try to copy them from the Xcode preferences (in ~/Library/Preferences/com.apple.Xcode.plist, there is an array of bookmarks under the key kDSMBookmarkManagerAllBookmarksUserDefaultsKey).
Le 29 juin 2010 à 13:30, Bill Cheeseman a écrit :
Is there any way to export or save Xcode documentation bookmarks for backup or for installation on a second computer?
I have an extensive collection of bookmarks on my main development machine, and I rely on them constantly. It would be a great convenience to be able to use them on my laptop on the rare occasions when I use it for development.
Thanks, that looks promising. Maybe I'll do a simple AppleScript to save it and restore it.
Here are AppleScript scripts to archive and restore Xcode bookmarks. Tested only on Mac OS X 10.6.4 and Xcode 3.2.3. I successfully archived 79 bookmarks from one machine and restored them on another machine.
-- Xcode Bookmarks-Archive -- Version 1.0 Bill Cheeseman 2010-07-01
property xcodePrefsPath : (path to preferences as string) & "com.apple.Xcode.plist" property bookmarksKey : "kDSMBookmarkManagerAllBookmarksUserDefaultsKey"
tell application "Finder" to set bookmarksFile to choose file name with prompt "Archive Xcode bookmarks to:" default name "Xcode Bookmarks" default location (path to desktop) set fileRef to open for access bookmarksFile with write permission try tell application "System Events" to set bookmarks to value of property list item bookmarksKey of property list file xcodePrefsPath write bookmarks to fileRef close access fileRef on error close access fileRef end try
-- Xcode Bookmarks-Restore -- Version 1.0 Bill Cheeseman 2010-07-01
property xcodePrefsPath : (path to preferences as string) & "com.apple.Xcode.plist" property bookmarksKey : "kDSMBookmarkManagerAllBookmarksUserDefaultsKey"
if running of application "Xcode" then tell application "Finder" to display alert "Xcode is running" message "Quit Xcode and run the Restore Xcode Bookmarks script again" buttons {"OK"} default button "OK" return end if tell application "Finder" to set bookmarksFile to choose file with prompt "Restore Xcode bookmarks from:" default location (path to desktop) set fileRef to open for access bookmarksFile try set bookmarks to read fileRef as list tell application "System Events" to set value of property list item bookmarksKey of property list file xcodePrefsPath to bookmarks close access fileRef on error close access fileRef end try |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden