New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus • Advice and insight from world-class Apple enthusiasts • Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
Running Windows (or anything else) on your Mac Discussion of Classic or running Windows, Linux and other OSes on the Mac.

Safari bookmarks - Windows


Post Reply New Thread Subscribe

 
Thread Tools
AnalogXP

 
Member Since: Oct 16, 2010
Posts: 5
AnalogXP is on a distinguished road

AnalogXP is offline
Hi!

Please tell me how I can import Safari bookmarks into my program. I don't know this file format.
(Windows platform)

Thank you.
QUOTE Thanks
chscag

 
chscag's Avatar
 
Member Since: Jan 23, 2008
Location: Fort Worth, Texas
Posts: 38,488
chscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond repute
Mac Specs: 27" iMac i5, 3.2 GHz, iPad 3, iPhone 5c, 3 iPods, OS X Mavericks

chscag is offline
Just click on the File menu (top) when Safari is running. Click the export selection and give it a path where you want it saved. (Best to save it on your desktop.) The file will be saved as "Safari Bookmarks.html". Copy the file to a flash drive and then copy it to your Windows desktop. The html file can then be imported to Internet Explorer or Firefox for Windows.
QUOTE Thanks
AnalogXP

 
Member Since: Oct 16, 2010
Posts: 5
AnalogXP is on a distinguished road

AnalogXP is offline
Quote:
Originally Posted by chscag View Post
Just click on the File menu (top) when Safari is running. Click the export selection and give it a path where you want it saved. (Best to save it on your desktop.) The file will be saved as "Safari Bookmarks.html". Copy the file to a flash drive and then copy it to your Windows desktop. The html file can then be imported to Internet Explorer or Firefox for Windows.
Thanks for you reply but I am a developer. I need to parse this file and import bookmarks into my program, not into a browsers.
QUOTE Thanks
chscag

 
chscag's Avatar
 
Member Since: Jan 23, 2008
Location: Fort Worth, Texas
Posts: 38,488
chscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond reputechscag has a reputation beyond repute
Mac Specs: 27" iMac i5, 3.2 GHz, iPad 3, iPhone 5c, 3 iPods, OS X Mavericks

chscag is offline
Since it's an html file, you should be able to open it and parse the information you need. That's the only way to export bookmarks from Safari. (html)
QUOTE Thanks
AnalogXP

 
Member Since: Oct 16, 2010
Posts: 5
AnalogXP is on a distinguished road

AnalogXP is offline
'Bookmarks.plist' is not a HTML file.

See attached file
Attached Files
File Type: zip Bookmarks.zip (4.6 KB, 2 views)
QUOTE Thanks
IvanLasston

 
IvanLasston's Avatar
 
Member Since: Feb 26, 2010
Location: Rocky Mountain High, Colorado
Posts: 2,116
IvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to behold
Mac Specs: 1.8 GHz i7 MBA 11" OSX 10.8.2

IvanLasston is offline
I just tried Safari on Windows - and it put out a html file. Alt-F -> export bookmarks just as chscag said.

With 3 posts - putting a zipfile with a plist is a little shady.
QUOTE Thanks
AnalogXP

 
Member Since: Oct 16, 2010
Posts: 5
AnalogXP is on a distinguished road

AnalogXP is offline
Quote:
Originally Posted by IvanLasston View Post
I just tried Safari on Windows - and it put out a html file. Alt-F -> export bookmarks just as chscag said.

With 3 posts - putting a zipfile with a plist is a little shady.
Look at the 'Bookmarks.plist' with Notepad. It is not a HTML file.
Quote:
bplist00Ф
V@XChildrenUTitle_WebBookmarkType_WebBookmarkUUID¤ ђ ћФ Ћ V Џ§ ! & XФ
YURLString]URIDictionary_http://www.apple.com/Т
PUtitleUApple_WebBookmarkTypeLeaf_$A9BBE87D-66A5-624D-B74F-87F46ED0294BФ
_http://www.yahoo.com/Т
VYahoo!_$955F1277-B439-0446-8C38-CCCFCD5D67A6Ф
_http://maps.google.com/Т
[Google Maps_$FBB8D758-D5FC-FD48-AF34-F39226B2C032Ф
_http://www.youtube.com/Т
WYouTube_$A26852CF-DE5F-0C43-BD3D-6E765FEE7404Ф
" # %_http://www.wikipedia.org/Т
" $YWikipedia_$D6665C3A-2A66-AA4A-94F2-F239482D4726Ф ' U V W© ( - 2 7 < A F K PФ
) * ,_http://www.cnn.com/Т
) +SCNN_$3722A501-F79A-5740-BD66-85E748CEA567Ф
. / 1_http://www.nytimes.
...
QUOTE Thanks
IvanLasston

 
IvanLasston's Avatar
 
Member Since: Feb 26, 2010
Location: Rocky Mountain High, Colorado
Posts: 2,116
IvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to behold
Mac Specs: 1.8 GHz i7 MBA 11" OSX 10.8.2

IvanLasston is offline
That does look like a binary plist. I don't know what to tell you but here is the (partial cut and paste) html file I get when I say export bookmarks from Safari on windows.

Code:
<!DOCTYPE NETSCAPE-Bookmark-file-1>
        <HTML>
        <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
        <Title>Bookmarks</Title>
        <H1>Bookmarks</H1>
        <DT><H3 FOLDED>Bookmarks Bar</H3>
        <DL><p>
                <DT><A HREF="http://www.apple.com/">Apple</A>
                <DT><A HREF="http://www.yahoo.com/">Yahoo!</A>
                <DT><A HREF="http://maps.google.com/">Google Maps</A>
                <DT><A HREF="http://www.youtube.com/">YouTube</A>
                <DT><A HREF="http://www.wikipedia.org/">Wikipedia</A>
                <DT><H3 FOLDED>News</H3>
                <DL><p>
                        <DT><A HREF="http://www.cnn.com/">CNN</A>
                        <DT><A HREF="http://www.nytimes.com/">The New York Times</A>
                        <DT><A HREF="feed://news.google.com/?output=rss">Google News</A>
                        <DT><A HREF="http://www.news.com/">CNET News.com</A>
                        <DT><A HREF="http://espn.go.com/">ESPN</A>
                        <DT><A HREF="http://www.latimes.com/">Los Angeles Times</A>
                        <DT><A HREF="http://news.bbc.co.uk/">BBC News</A>
                        <DT><A HREF="http://www.npr.org/">NPR</A>
                        <DT><A HREF="http://www.usatoday.com/">USA Today</A>
                </DL><p>
                <DT><H3 FOLDED>Popular</H3>
                <DL><p>
                        <DT><A HREF="http://www.ebay.com/">eBay</A>
                        <DT><A HREF="http://www.amazon.com/">Amazon</A>
                        <DT><A HREF="http://www.flickr.com/">Flickr</A>
                        <DT><A HREF="http://www.expedia.com/">Expedia Travel</A>
                        <DT><A HREF="http://www.orbitz.com/">Orbitz</A>
                        <DT><A HREF="http://www.facebook.com/">Facebook</A>
                        <DT><A HREF="http://www.monster.com/">Monster Jobs</A>
                        <DT><A HREF="http://www.careerbuilder.com/">CareerBuilder</A>
                        <DT><A HREF="http://disney.go.com/">Disney</A>
                        <DT><A HREF="http://www.craigslist.org/">craigslist</A>
                </DL><p>
        </DL><p>
        <DT><H3 FOLDED>Bookmarks Menu</H3>
        <DL><p>
        </DL><p>
QUOTE Thanks
AnalogXP

 
Member Since: Oct 16, 2010
Posts: 5
AnalogXP is on a distinguished road

AnalogXP is offline
If I export bookmarks using Safari browser, I will get a HTML file. It is true. But I need to work only with 'Bookmarks.plist' file without browser.
I need to get 'Bookmarks.plist' by using my program, parse this file and import bookmarks into my program to view.
If it is not corresponding forum, please tell me where I can get info about this 'Bookmarks.plist' file format?
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,678
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is online now
Plist files can be xml or binary format. I would assume from what you've shown that the Windows plist for Safari bookmarks is in fact a binary one.

If you're working on a Mac, you can try converting the binary version to an xml one using plutil. Call that from your app and you should have what you need. Once you have the xml version, you should be able to easily parse it. If you're using Python, it has a plist library (see here) but it looks to only work with xml ones.

More reading on plists.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Personal Twitter
QUOTE Thanks

Post Reply New Thread Subscribe


« Major boot camp issue. | boot camping win7(x86) networking... »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Importing Safari Bookmarks from Mac to Mac deanobeano OS X - Apps and Games 1 08-06-2009 03:16 PM
Move Safari Bookmarks? ghsusaxa75 OS X - Apps and Games 2 09-01-2008 05:58 PM
Running Windows on a Mac: A Switcher's Guide UncSki1218 Running Windows (or anything else) on your Mac 80 06-10-2008 10:34 PM
syncing safari and Mozilla bookmarks supenguin Switcher Hangout 2 04-12-2004 01:36 PM

All times are GMT -4. The time now is 01:36 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?