Skip to main content

A cli to manage bookmarks in the Safari web browser.

Project description

safari-bookmarks-cli

A cli to manage bookmarks in the Safari web browser.

This utility interacts with Safari's Bookmarks.plist file. When it detects changes it is reloaded without intervention.

Note macOS 10.14+ requires Full Disk Access for the application being used. ie. Terminal, iTerm, etc.

Installation

You can install safari-bookmarks-cli via pip:

pip3 install safari-bookmarks-cli

# verify installation
safari-bookmarks --version

Usage

The following assumes the default location for Safari's bookmarks, which is ~/Library/Safari/Bookmarks.plist. If this is not the case you can specify an alternate location by passing the arguments -f <elsewhere>.

For a full list of commands and options just run:

safari-bookmarks --help

To list all bookmarks run

safari-bookmarks list

To list all bookmarks in the menubar

safari-bookmarks list "BookmarksMenu"

Add a new bookmark to the menubar

safari-bookmarks add --title "New bookmark" --url "http://example.com" "BookmarksMenu"

Add a new bookmark to the menu

safari-bookmarks add --title "New folder" --list "BookmarksBar"

Move a bookmark to a different folder

safari-bookmarks move "BookmarksMenu" "New bookmark" --to "BookmarksBar" "New folder"

Remove a bookmark or folder

Note removing a folder will also remove all bookmarks and folders within it.

safari-bookmarks remove "BookmarksBar" "New folder"

Empty a folder

safari-bookmarks empty "BookmarksBar" "New folder"

Testing

Clone the repository:

git clone https://github.com/evilmarty/safari-bookmarks-cli.git

Install pytest and flake8

pip3 install pytest flake8

Run them

pytest && flake8

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

safari_bookmarks_cli-0.6.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

safari_bookmarks_cli-0.6.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file safari_bookmarks_cli-0.6.0.tar.gz.

File metadata

  • Download URL: safari_bookmarks_cli-0.6.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for safari_bookmarks_cli-0.6.0.tar.gz
Algorithm Hash digest
SHA256 732d288ad2c15ec1f80784ef04d1c7d0c8c2ecea2588c22892874ca21b8057f2
MD5 a67d79c64c16ab6e28d42c862574a4ff
BLAKE2b-256 3b6168a10b63c5b7d367ef1d8dac3a8a269ce8a9d116d345bb1bf17a6c7e0a9b

See more details on using hashes here.

File details

Details for the file safari_bookmarks_cli-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for safari_bookmarks_cli-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9585186f2b5d074d55bd82d0768e578ac3b4169f0d467ed512dd4211ec3a3076
MD5 4d530ba7b36821d43cb1088bf8d8bd0b
BLAKE2b-256 a339978cd4b24b9e91ac26fbe57b08bccd51674a4efc85dd527c0137b75c31ff

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page