Skip to main content

Extendable browser bookmark exporter CLI tool

Project description

bkmks - unified browser bookmark exporter

Extendable browser bookmark exporter CLI tool. Export your browser bookmark tree into a simple and unified JSON. Optionally add a whitelist to only export whitelisted bookmarks or folders.

Output example:

{
    "created": "2024-09-23T13:31:10.312132",
    "bookmarks": [
        {
            "name": "Root level bookmark",
            "url": "https://bookmark.com"
        },
        {
            "name": "Root level folder",
            "children": [
                {
                    "name": "1. level deep bookmark",
                    "url": "https://bookmark.com"
                },
                
            ]
        }
    ]
}

Installation

Via pip:

pip install bkmks

Usage

There are two ways to use the tool:

Prompts

bkmks

When running bkmks in the console after installation with no additional arguments the program will go through interactive prompts to determine how you want to use it. An example prompt conversation could look like the following:

? Select the browser you want to extract bookmarks from: brave
? Would you like to only extract whitelisted bookmarks? Yes
? Enter the path to your bookmark whitelist: /Users/nico/dev/git/bmarks-scraper/.bkmks
? Would you like to write the output to a file (will otherwise be printed to console)? Yes
? Enter the output file path: bookmarks.json

CLI Flags

bkmks --help

If you would like to skip the step by step approach and directly communicate your inputs to the program you can utilize CLI flags. All available flags can be accessed by passing the -h or --help flag when running the program. This is the output of --help:

Extract your browser bookmarks into a normalized JSON

options:
  -h, --help            show this help message and exit
  -w WHITELIST, --whitelist WHITELIST
                        Path to your bookmark whitelist (aka your ".bkmks" file)
  -b {brave,other}, --browser {brave,other}
                        The browser you want to extract bookmarks from
  -o OUTPUT, --output OUTPUT
                        Output file path

Note: --help output above generated on 23.09.2024 your results may differ slightly

Development

Prequisites

Setting up

Clone the repository

git clone https://github.com/nico-i/bkmks

Set up a virtual environment, enter venv and install dependencies

make venv
make env
make install

Contributing

PRs for the support of other browser are very much welcome! Check out the bookmark adapters directory to see which browsers are currently supported

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

bkmks-2.0.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

bkmks-2.0.0-py2.py3-none-any.whl (18.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file bkmks-2.0.0.tar.gz.

File metadata

  • Download URL: bkmks-2.0.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for bkmks-2.0.0.tar.gz
Algorithm Hash digest
SHA256 3496f544ee5baaab3eea49b4774fbfbbaa097388ce823849b88656c7e3cd3e56
MD5 f0bb86bb91309a01dee6e6d40f34de34
BLAKE2b-256 2a14108f25c98e44c75ae1a2d4ef41f2e596b712a138bd2c73eb7007eea5a8bf

See more details on using hashes here.

File details

Details for the file bkmks-2.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: bkmks-2.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for bkmks-2.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a71a40869a731a40f89981e5ca4fe0571d5bee69fa363a003c2400433fd20f2a
MD5 7ae5f8ce069dd79e96f72eab0e88271b
BLAKE2b-256 a6bb9bb287cd7cc59b63d5672d16daec116cbe40ede3da310b3f700e2b5630ba

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