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.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0481852a22ba1a723ba53c7d1b54c790eec7de6e5e3476cd16257f887e52e3f5 |
|
MD5 | 09a93ae45b6efa89f99debfa19860b09 |
|
BLAKE2b-256 | 3be9debf10c8851a8bc3556a6918afc5de205f5341e98e010f133ff35e912a65 |
Hashes for safari_bookmarks_cli-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2c69e1812cd5fb5eaa991dceea576e09b9684cc4d0bf9b76fb126a89ee45f5e |
|
MD5 | f1c3a1c1964961231bc3f3a9473e8a69 |
|
BLAKE2b-256 | f5e60bd39f86e8ba366f631fb823b15b5fe529b539436f21614d4cd3b161c597 |