Skip to main content

Simple command line snippets.

Project description

https://img.shields.io/pypi/v/boompy.svg

boom.py is a simple command line utiilty for storing text snippets under simple, memorable key names. It is conceptually similar to boom by Zach Holman.

Installation

The easiest way to install boom.py is via pip:

pip install boompy

You can also install it the old-fashioned way, if that’s more your speed:

git clone https://github.com/epochblue/boom.py
cd boom.py
python setup.py install

Usage

To create a new snippet, provide both the key name and a value for the key.

$> boom new_key new_value
'new_key' is now 'new_value'.

To retrieve the value for a key once it’s been set, simply provide the key name. The value will be automatically copied to the system clipboard.

$> boom new_key
'new_key' successfully copied to clipboard.

If you attempt to set a value for an existing key, boom.py will return with an error.

$> boom new_key new_value
Error: Key 'new_key' already exists.

If you’d like to update an existing key, use the --overwrite or -o flag:

$> boom --overwrite new_key updated_value
'new_key' is now 'updated_value'.

And if you’d like to delete a key/value pair, use the --delete or -d flag.

$> boom --delete new_key
'new_key' has been removed.

By default, boom.py stores its “database” in a file located at $HOME/.config/boom/boomdb. If you’d like to save your snippets to a different location, you can use the -db or --database flag:

$> boom --database ./snip.db new_key new_value
'new_key' is now 'new_value'

If you provide no argument or options to boom.py, it will print all the currently-stored records to the screen.

$> boom
new_key     new_value
new_key2    new_value2
example     example_value

It’s not much, but that’s all there is to boom.py.

License

boom.py is MIT licensed. Please see the included LICENSE file.

Authors

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

boompy-2.0.0.tar.gz (4.7 kB view hashes)

Uploaded Source

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