# 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:
```json
{
"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:
```shell
pip install bkmks
```
## Usage
There are two ways to use the tool:
### Prompts
```shell
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:
```text
? 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
```shell
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`:
```text
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
- [Python](https://www.python.org/downloads/) (>=3.12.5)
- [ruff](https://docs.astral.sh/ruff/)
- [make](https://www.gnu.org/software/make/manual/make.html) (optional)
### Setting up
Clone the repository
```shell
git clone https://github.com/nico-i/bkmks
```
Set up a virtual environment, enter venv and install dependencies
```shell
make venv
make env
make install
```
## Contributing
PRs for the support of other browser are very much welcome! Check out the [bookmark adapters directory](./src/infrastructure/persistance/adapters/bookmark) to see which browsers are currently supported
Raw data
{
"_id": null,
"home_page": "https://github.com/nico-i/bkmks",
"name": "bkmks",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.12",
"maintainer_email": null,
"keywords": "bookmark, browser, export",
"author": "Nico Ismaili",
"author_email": "nico@ismaili.de",
"download_url": "https://files.pythonhosted.org/packages/2a/14/108f25c98e44c75ae1a2d4ef41f2e596b712a138bd2c73eb7007eea5a8bf/bkmks-2.0.0.tar.gz",
"platform": null,
"description": "# bkmks - unified browser bookmark exporter\n\nExtendable 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.\n\nOutput example:\n\n```json\n{\n \"created\": \"2024-09-23T13:31:10.312132\",\n \"bookmarks\": [\n {\n \"name\": \"Root level bookmark\",\n \"url\": \"https://bookmark.com\"\n },\n {\n \"name\": \"Root level folder\",\n \"children\": [\n {\n \"name\": \"1. level deep bookmark\",\n \"url\": \"https://bookmark.com\"\n },\n \n ]\n }\n ]\n}\n```\n\n## Installation\n\nVia pip:\n\n```shell\npip install bkmks\n```\n\n## Usage\n\nThere are two ways to use the tool:\n\n### Prompts\n\n```shell\nbkmks\n```\n\nWhen 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:\n\n```text\n? Select the browser you want to extract bookmarks from: brave\n? Would you like to only extract whitelisted bookmarks? Yes\n? Enter the path to your bookmark whitelist: /Users/nico/dev/git/bmarks-scraper/.bkmks\n? Would you like to write the output to a file (will otherwise be printed to console)? Yes\n? Enter the output file path: bookmarks.json\n```\n\n### CLI Flags\n\n```shell\nbkmks --help\n```\n\nIf 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`:\n\n```text\nExtract your browser bookmarks into a normalized JSON\n\noptions:\n -h, --help show this help message and exit\n -w WHITELIST, --whitelist WHITELIST\n Path to your bookmark whitelist (aka your \".bkmks\" file)\n -b {brave,other}, --browser {brave,other}\n The browser you want to extract bookmarks from\n -o OUTPUT, --output OUTPUT\n Output file path\n```\n\n*Note: `--help` output above generated on 23.09.2024 your results may differ slightly*\n\n## Development\n\n### Prequisites\n\n- [Python](https://www.python.org/downloads/) (>=3.12.5)\n- [ruff](https://docs.astral.sh/ruff/)\n- [make](https://www.gnu.org/software/make/manual/make.html) (optional)\n\n### Setting up\n\nClone the repository\n\n```shell\ngit clone https://github.com/nico-i/bkmks\n```\n\nSet up a virtual environment, enter venv and install dependencies\n\n```shell\nmake venv\nmake env\nmake install\n```\n\n## Contributing\n\nPRs for the support of other browser are very much welcome! Check out the [bookmark adapters directory](./src/infrastructure/persistance/adapters/bookmark) to see which browsers are currently supported\n",
"bugtrack_url": null,
"license": null,
"summary": "Extendable browser bookmark exporter CLI tool",
"version": "2.0.0",
"project_urls": {
"Bug Reports": "https://github.com/nico-i/bkmks/issues",
"Funding": "https://www.paypal.com/paypalme/ismailinico",
"Homepage": "https://github.com/nico-i/bkmks",
"Source": "https://github.com/nico-i/bkmks"
},
"split_keywords": [
"bookmark",
" browser",
" export"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a6bb9bb287cd7cc59b63d5672d16daec116cbe40ede3da310b3f700e2b5630ba",
"md5": "7ae5f8ce069dd79e96f72eab0e88271b",
"sha256": "a71a40869a731a40f89981e5ca4fe0571d5bee69fa363a003c2400433fd20f2a"
},
"downloads": -1,
"filename": "bkmks-2.0.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "7ae5f8ce069dd79e96f72eab0e88271b",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": "<4,>=3.12",
"size": 18171,
"upload_time": "2024-10-10T09:35:10",
"upload_time_iso_8601": "2024-10-10T09:35:10.136635Z",
"url": "https://files.pythonhosted.org/packages/a6/bb/9bb287cd7cc59b63d5672d16daec116cbe40ede3da310b3f700e2b5630ba/bkmks-2.0.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2a14108f25c98e44c75ae1a2d4ef41f2e596b712a138bd2c73eb7007eea5a8bf",
"md5": "f0bb86bb91309a01dee6e6d40f34de34",
"sha256": "3496f544ee5baaab3eea49b4774fbfbbaa097388ce823849b88656c7e3cd3e56"
},
"downloads": -1,
"filename": "bkmks-2.0.0.tar.gz",
"has_sig": false,
"md5_digest": "f0bb86bb91309a01dee6e6d40f34de34",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.12",
"size": 11402,
"upload_time": "2024-10-10T09:35:11",
"upload_time_iso_8601": "2024-10-10T09:35:11.735975Z",
"url": "https://files.pythonhosted.org/packages/2a/14/108f25c98e44c75ae1a2d4ef41f2e596b712a138bd2c73eb7007eea5a8bf/bkmks-2.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-10 09:35:11",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nico-i",
"github_project": "bkmks",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "pathspec",
"specs": [
[
"==",
"0.12.1"
]
]
},
{
"name": "pytest",
"specs": [
[
"==",
"8.3.3"
]
]
},
{
"name": "questionary",
"specs": [
[
"==",
"2.0.1"
]
]
}
],
"lcname": "bkmks"
}