https://github.com/dgl/go-safari-bookmarks
Read Safari's Bookmarks.plist
https://github.com/dgl/go-safari-bookmarks
go golang-library macos
Last synced: about 1 year ago
JSON representation
Read Safari's Bookmarks.plist
- Host: GitHub
- URL: https://github.com/dgl/go-safari-bookmarks
- Owner: dgl
- License: mit
- Created: 2019-03-09T10:38:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-05-26T13:37:43.000Z (about 3 years ago)
- Last Synced: 2025-03-17T19:58:55.682Z (about 1 year ago)
- Topics: go, golang-library, macos
- Language: Go
- Homepage:
- Size: 466 KB
- Stars: 13
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Safari Bookmarks plist reader
Reads Safari's `Bookmarks.plist`. This includes bookmarks as well as the
reading list.
## What, why, ...?
I wanted to be able to add stuff to the Safari reading list on iOS, then keep
track of it somewhere outside iCloud, by relying on the sync to macOS, then
reading it there.
## Set-up
Recent macOS versions won't let you read from `~/Library/Safari` (a good thing
for security), you'll see this:
$ cp Library/Safari/Bookmarks.plist /tmp
cp: Library/Safari/Bookmarks.plist: Operation not permitted
Fix it by adding the application (i.e. macOS level application, so maybe your
terminal app) to "Full Disk Access" in System Preferences > Security & Privacy, like this:

(Yes, doing this means something running in your terminal can steal your
cookies now. Be careful with your `curl ... | sh` commands again.)
## Development notes
Use `plutil -convert xml1` for a quick way to get a readable file (see also `ply` in go-plist).
No tests, will probably break when Apple change the format of the bookmarks file anyway.