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.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9bd0b847fbb3b49ce6d455823d1ab8a6075deac18d3e830e2dedbbedca35ce3 |
|
MD5 | 0355fc111b815468b1021cb24e7f196d |
|
BLAKE2b-256 | d26060f2be11b3e78ae1969149f1463fdf753c989244b8e17b2bbaaf91ab2a84 |
Hashes for safari_bookmarks_cli-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 008da1263126f5cdd101f371ab82157cf936851d76b71751057bc59f4a61e15e |
|
MD5 | 7168fa5e8d2b68e38eaeb90014e0d19a |
|
BLAKE2b-256 | bc3100919d833937821f7acf2ec9eacda9f627c47597910e1fb2255dc5d26449 |