Skip to main content

Simple command line bookmark and/or tagging utility.

Project description

Description
===========

Simple command line bookmark and/or tagging utility.

In order to help using it to tag files and directories as well as urls, it
recognises if the URL given is that of an existing file. If so, the absolute
path is substituted to help scripting by piping the output and to escape
ambiguity. This behaviour can be stopped by using the "--no-path-subs" option.

One way to see this program is to consider it a simple hashmap utility for
bash that associates a set of strings (the tags) to another one (the url).
Feel free to find other ways to use this program!

Msgpack is used as is it highly portable, language agnostic and yet highly
efficient.

This script is written using python3.


THIS VERSION IS STABLE.


Documentation
=============

Usage: bm [options] [-r] URL TAG...
bm [options] -d URL
bm [options] -l [TAG]...
bm [options] -L TAG...
bm [options] URL
bm [options] -t

Arguments:
URL The url to bookmark
If alone, print the tags associated with URL
If the url corresponds to an existing file,
the absolute path is substituted to URL
If URL is '-', then the program looks for a list of URL
comming from the standard input.
TAG The tags to use with the url.

Options:
-h, --help Print this help and exit
-r, --remove Remove TAG from URL
-d, --delete Delete an url from the database
-l, --list-any List the urls with any of TAG
If no tag is given, list all urls
-L, --list-every List the urls with every of TAG
-f, --file FILE Use FILE as the database
Default is ~/.bookmarks
-t, --tags List every tag present in the database
-n, --no-path-subs Disable file path substitution

Example
=======

$ bm "http://duckduckgo.com" bad search engine

$ bm "http://google.com" bad search engine

$ bm -l search engine
http://duckduckgo.com
http://google.com

$ bm -r "http://duckduckgo.com" bad

$ bm "http://duckduckgo.com" cool

$ bm "http://duckduckgo.com"
cool
engine
search

$ bm -L search engine
http://duckduckgo.com
http://google.com

$ bm -L bad search engine
http://google.com

$ bm -l
cool
engine
search
bad

$ cat urls | bm - atag


Installation
============

The simplest method is to use:

pip install bm

Otherwise, you can do when in this directory

python3 setup install

This should install the dependancies as well.


Dependencies
============

docopt https://github.com/docopt/docopt or "pip install docopt"
msgpack http://msgpack.org/ or "pip install msgpack-python"

License
=======

This program is under the GPLv3 License.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

Contact
=======

Main developper: Cédric Picard
Email: cedric.picard@efrei.net
Twitter: @Cym13
GPG: 383A 76B9 D68D 2BD6 9D2B 4716 E3B9 F4FE 5CED 42CB

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

bm-1.0.1.tar.gz (3.9 kB view details)

Uploaded Source

File details

Details for the file bm-1.0.1.tar.gz.

File metadata

  • Download URL: bm-1.0.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for bm-1.0.1.tar.gz
Algorithm Hash digest
SHA256 57b48dcdf7621b1121c80eb7ec9dc267a41acecee64e879d5882400c5b6c58a8
MD5 7037c7c1530d2557fd60321660e3b924
BLAKE2b-256 9a56730e63fe929b152eb5e000a44bc736c479c3ae03168761eef2ae5073a7b9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page