Skip to main content

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

Metadata

Release files for bkmks 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bkmks 2.0.0
File Size Uploaded
bkmks-2.0.0.tar.gz 11.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bkmks 2.0.0
File Interpreter ABI Platform
bkmks-2.0.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 29.6 kB

Release files / bkmks-2.0.0.tar.gz

Download URL bkmks-2.0.0.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3496f544ee5baaab3eea49b4774fbfbbaa097388ce823849b88656c7e3cd3e56
BLAKE2b-256 checksum
How to use checksums
2a14108f25c98e44c75ae1a2d4ef41f2e596b712a138bd2c73eb7007eea5a8bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / bkmks-2.0.0-py2.py3-none-any.whl

Download URL bkmks-2.0.0-py2.py3-none-any.whl
Size 18.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
a71a40869a731a40f89981e5ca4fe0571d5bee69fa363a003c2400433fd20f2a
BLAKE2b-256 checksum
How to use checksums
a6bb9bb287cd7cc59b63d5672d16daec116cbe40ede3da310b3f700e2b5630ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page