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 details)

Uploaded Source

File details

Details for the file boompy-2.0.0.tar.gz.

File metadata

  • Download URL: boompy-2.0.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for boompy-2.0.0.tar.gz
Algorithm Hash digest
SHA256 e3eab28159754482f8b08c197b23ce161db3eec89b00190541b363cb94fb76e1
MD5 84779d0024ea39187f86d3a4ed12430a
BLAKE2b-256 4d83e087f58228f3a128cb1f087fcdff6563e163866b580c34f55a6e7da1f687

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