Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tanlin

macrumors newbie
Original poster
Jun 9, 2006
4
0
Does anyone know how to print one's history of viewed sites in Safari? Is this possible. I am trying to document every web site I've visited for a year but don't seem to be able to copy the history list for any given day?

help!
 
Unfortunately, in default form, Safari doesn't keep it's history for very long at all. Plus it's stored as a binary XML file, so it's not easy to print out directly, and if you did it wouldn't make much sense.

However, there seems to be 3rd party apps out there that deal with safari history. Check them out and maybe you can find what you need. Particularly "Saft" I think.

http://www.macupdate.com/search.php?keywords=safari+history&os=macosx&button.x=0&button.y=0
 
tanlin said:
Does anyone know how to print one's history of viewed sites in Safari? Is this possible. I am trying to document every web site I've visited for a year but don't seem to be able to copy the history list for any given day?

help!

I don't know, CAN YOU PRINT SAFARI HISTORY?

It's an XML file, you can copy it to a text file and then manually remove all of the crap from that if you feel so inclined.
 
skoker said:
It's an XML file, you can copy it to a text file and then manually remove all of the crap from that if you feel so inclined.

In Tiger it's a binary XML file, ot a text XML file.
 
yellow said:
In Tiger it's a binary XML file, ot a text XML file.

Yellow is correct, under tiger the History.plist file is a binary XML file. But the URL and page names can easily be extracted using the following command at the Terminal:

Code:
strings ~/Library/Safari/History.plist > ~/Desktop/strings.txt

The command above extracts the text parts of the Safari history from the History.plist file and stores the text in the file "strings.txt" on the Desktop.

A second version that also trims some of the garbage off is:

Code:
strings ~/Library/Safari/History.plist | cut -f 1 -d '[' > ~/Desktop/strings2.txt

This second version trims off some of the garbage resulting from the extraction and produces the file "strings2.txt" on your desktop.

The resulting strings.txt or strings2.txt file can be imported into your Word processor and edited to suit your needs.
 
hi and thanks very much

i'm a bit of a novice--can you tell me how to find the history.plist file?

and then once i've got it, how exactly do i use the code you've supplied to extract text? i'm not sure how to go about doing this?

thanks
 
tanlin said:
hi and thanks very much

i'm a bit of a novice--can you tell me how to find the history.plist file?

and then once i've got it, how exactly do i use the code you've supplied to extract text? i'm not sure how to go about doing this?

thanks

mrichmon (nice job, btw), gave you the path to the .plist.

Your home directory -> Library -> Safari -> History.plist

To do what he detailed above, open the Terminal.app and copy & paste what he wrote.

I might suggest using ">>" rather than ">", as ">>" will APPEND to the file "strings.txt". ">" will compeltely overwrite it everytime.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.