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
Add a new bookmark to the menubar
safari-bookmarks add --title "New bookmark" --url "http://example.com" --to BookmarksMenu
Add a new bookmark to the menu
safari-bookmarks add --title "New folder" --list --to BookmarksBar
Move a bookmark to a different folder
safari-bookmarks move --title "New bookmark" --to "New folder"
Remove a bookmark or folder
Note removing a folder will also remove all bookmarks and folders within it.
safari-bookmarks remove "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
Built Distribution
Hashes for safari_bookmarks_cli-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4eed1f23d5e6a1097879cbea42dcc8193c213d3cb76c77c0411caa9065a6e491 |
|
MD5 | d1058d5e6d38101f021bff0587072fd5 |
|
BLAKE2b-256 | 8e3ff0082d22ecb425817629af2fb78ec5fc40fe592370ed3e68b1a47bceaf9b |
Hashes for safari_bookmarks_cli-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | deaed4f4c534689f25488102d7f3bab9248bf551a3ca44aaa95fd543299ee863 |
|
MD5 | e193b818f90168175c6fb37c1616524d |
|
BLAKE2b-256 | 4b914f771d76f6fd924fcb6b4360461d7649bfc8b4ff57ec81f0e0d55c462616 |