# bman
A command line bookmark manager.
## Installation
> Note: you need Python 3.
```sh
> pip install bman
```
After that, should have a `bman` command available.
```sh
> bman
Usage: bman [OPTIONS] COMMAND [ARGS]...
Your command line bookmark manager.
Options:
-h, --help Show this message and exit.
Commands:
add Adds a new entry
ls Lists stored entries
rm Removes an entry
```
## Usage
### Add a bookmark
The quickest way to add an url is:
```sh
> bman add https://google.com
```
But maybe you prefer to add a tiny description to the bookmark:
```sh
> bman add https://google.com "The google homepage"
```
Or, better, add some tags to help you organize all this mess:
```sh
> bman add https://google.com "The google homepage" search,homepage,faang
```
### List bookmarks
You can query all your bookmarks with the `ls` command:
```sh
> bman ls
https://github.com
Date: 2023-07-01T20:49:29.273570
Description: The github homepage
Tags: ['code', 'homepage', 'faang']
https://google.com
Date: 2023-07-01T20:51:49.173430
Description: The google homepage
Tags: ['search', 'homepage', 'faang']
```
Of course, once you start adding bookmarks is not feasible to get a dump of all entries every time you use `ls`. You can use a filter:
```sh
> bman ls goog
https://google.com
Date: 2023-07-01T20:51:49.173430
Description: The google homepage
Tags: ['search', 'homepage', 'faang']
```
The filter works on all fields.
Search by tag:
```sh
> bman ls search
https://google.com
Date: 2023-07-01T20:51:49.173430
Description: The google homepage
Tags: ['search', 'homepage', 'faang']
```
By date:
```sh
> bman ls 2023-07
https://github.com
Date: 2023-07-01T20:49:29.273570
Description: The github homepage
Tags: ['code', 'homepage', 'faang']
https://google.com
Date: 2023-07-01T20:51:49.173430
Description: The google homepage
Tags: ['search', 'homepage', 'faang']
```
The `ls` command accepts some more interesting options worth exploring:
```sh
Usage: bman ls [OPTIONS] [FILTER]
Lists stored entries
Options:
--format [only-url|full|json] Set the output format
--use-regex Treat the search filter as a regex pattern
--fields TEXT Comma separated list of fields to show (and
to apply filter to)
-h, --help Show this message and exit.
```
### Removing bookmarks
I know, I know...you rarely delete bookmarks. Neither me. But when you need to, better to have a way to do it :-)
```sh
> bman rm http://google.com
```
And that's it.
### Editing bookmarks
`bman` doesn't allow direct edition, but you can add a bookmark twice to update it's entry:
For example, returning to the previous example, if you already had `http://google.com` in your library...
```sh
> bman add http://google.com "The _don't be evil_ company"
Url already exists in the library. Please, use --force to update it with the new values.
```
As you see, you need to pass the `--force` flag:
```sh
> bman add http://google.com "The _don't be evil_ company" --force
```
## Data location
By default `bman` stores all the data under the `~/.bman/` directory. This can be overrided setting the `BMAN_ROOT_PATH` environment variable.
Under that directory, you'll find:
- `config.json` for configuration settings (there's barely anything configurable right now, to be fair)
- `library.json` with all your bookmarks.
I chose JSON for all data representation to make it easier to work with it using standard tools, if I need to.
Raw data
{
"_id": null,
"home_page": "https://github.com/luismedel/bman",
"name": "bman",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "bookmarks",
"author": "Luis Medel",
"author_email": "luis@luismedel.com",
"download_url": "https://files.pythonhosted.org/packages/7e/f0/961066ecaf9d36c59f7d483bd6090e7af9073706808f6c30461c945ad84d/bman-0.9.tar.gz",
"platform": null,
"description": "# bman\n\nA command line bookmark manager.\n\n## Installation\n\n> Note: you need Python 3.\n\n```sh\n> pip install bman\n```\n\nAfter that, should have a `bman` command available.\n\n```sh\n> bman\n\nUsage: bman [OPTIONS] COMMAND [ARGS]...\n\n Your command line bookmark manager.\n\nOptions:\n -h, --help Show this message and exit.\n\nCommands:\n add Adds a new entry\n ls Lists stored entries\n rm Removes an entry\n```\n\n## Usage\n\n### Add a bookmark\n\nThe quickest way to add an url is:\n\n```sh\n> bman add https://google.com\n```\n\nBut maybe you prefer to add a tiny description to the bookmark:\n\n```sh\n> bman add https://google.com \"The google homepage\"\n```\n\nOr, better, add some tags to help you organize all this mess:\n\n```sh\n> bman add https://google.com \"The google homepage\" search,homepage,faang\n```\n\n### List bookmarks\n\nYou can query all your bookmarks with the `ls` command:\n\n```sh\n> bman ls\n\nhttps://github.com\nDate: 2023-07-01T20:49:29.273570\nDescription: The github homepage\nTags: ['code', 'homepage', 'faang']\n\nhttps://google.com\nDate: 2023-07-01T20:51:49.173430\nDescription: The google homepage\nTags: ['search', 'homepage', 'faang']\n```\n\nOf course, once you start adding bookmarks is not feasible to get a dump of all entries every time you use `ls`. You can use a filter:\n\n```sh\n> bman ls goog\n\nhttps://google.com\nDate: 2023-07-01T20:51:49.173430\nDescription: The google homepage\nTags: ['search', 'homepage', 'faang']\n```\n\nThe filter works on all fields.\n\nSearch by tag:\n\n```sh\n> bman ls search\n\nhttps://google.com\nDate: 2023-07-01T20:51:49.173430\nDescription: The google homepage\nTags: ['search', 'homepage', 'faang']\n```\n\nBy date:\n\n```sh\n> bman ls 2023-07\n\nhttps://github.com\nDate: 2023-07-01T20:49:29.273570\nDescription: The github homepage\nTags: ['code', 'homepage', 'faang']\n\nhttps://google.com\nDate: 2023-07-01T20:51:49.173430\nDescription: The google homepage\nTags: ['search', 'homepage', 'faang']\n```\n\nThe `ls` command accepts some more interesting options worth exploring:\n\n```sh\nUsage: bman ls [OPTIONS] [FILTER]\n\n Lists stored entries\n\nOptions:\n --format [only-url|full|json] Set the output format\n --use-regex Treat the search filter as a regex pattern\n --fields TEXT Comma separated list of fields to show (and\n to apply filter to)\n -h, --help Show this message and exit.\n```\n\n### Removing bookmarks\n\nI know, I know...you rarely delete bookmarks. Neither me. But when you need to, better to have a way to do it :-)\n\n```sh\n> bman rm http://google.com\n```\n\nAnd that's it.\n\n### Editing bookmarks\n\n`bman` doesn't allow direct edition, but you can add a bookmark twice to update it's entry:\n\nFor example, returning to the previous example, if you already had `http://google.com` in your library...\n\n```sh\n> bman add http://google.com \"The _don't be evil_ company\"\n\nUrl already exists in the library. Please, use --force to update it with the new values.\n```\n\nAs you see, you need to pass the `--force` flag:\n\n```sh\n> bman add http://google.com \"The _don't be evil_ company\" --force\n```\n\n## Data location\n\nBy default `bman` stores all the data under the `~/.bman/` directory. This can be overrided setting the `BMAN_ROOT_PATH` environment variable.\n\nUnder that directory, you'll find:\n\n- `config.json` for configuration settings (there's barely anything configurable right now, to be fair)\n- `library.json` with all your bookmarks.\n\nI chose JSON for all data representation to make it easier to work with it using standard tools, if I need to.\n",
"bugtrack_url": null,
"license": "",
"summary": "Your command line bookmark manager.",
"version": "0.9",
"project_urls": {
"Homepage": "https://github.com/luismedel/bman"
},
"split_keywords": [
"bookmarks"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f165b07c903236ec9d3999d8ae9625dad0a9be88fb835988619f5d5c37786cc9",
"md5": "36099ee7cb62876ad2e4aa768b11e738",
"sha256": "f33be76dda950498f0cd2410943c0c39068c22053c41f04af5a971a6f15ec64e"
},
"downloads": -1,
"filename": "bman-0.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "36099ee7cb62876ad2e4aa768b11e738",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 16852,
"upload_time": "2023-07-01T21:25:14",
"upload_time_iso_8601": "2023-07-01T21:25:14.465968Z",
"url": "https://files.pythonhosted.org/packages/f1/65/b07c903236ec9d3999d8ae9625dad0a9be88fb835988619f5d5c37786cc9/bman-0.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7ef0961066ecaf9d36c59f7d483bd6090e7af9073706808f6c30461c945ad84d",
"md5": "4e2889491868849c96f97fc61a28ac22",
"sha256": "39abcc664e0ce964404019beb38312828a1a3953fe6e3edd86ed09416705f7b4"
},
"downloads": -1,
"filename": "bman-0.9.tar.gz",
"has_sig": false,
"md5_digest": "4e2889491868849c96f97fc61a28ac22",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 16524,
"upload_time": "2023-07-01T21:25:16",
"upload_time_iso_8601": "2023-07-01T21:25:16.639851Z",
"url": "https://files.pythonhosted.org/packages/7e/f0/961066ecaf9d36c59f7d483bd6090e7af9073706808f6c30461c945ad84d/bman-0.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-01 21:25:16",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "luismedel",
"github_project": "bman",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "bman"
}