Skip to main content

make things go boom

Project description


Simple data manipulation tool with a bang.


pip install bombchu --user


❯ # break on a delimiter 
❯ echo "d,d,b,a,a,b,c,d,d,e" | bombchu -d','
['d', 'd', 'b', 'a', 'a', 'b', 'c', 'd', 'd', 'e']

❯ # same thing, but sort unique
❯ echo "d,d,b,a,a,b,c,d,d,e" | bombchu -d',' -s -u
['a', 'b', 'c', 'd', 'e']

❯ # now output it with a delimiter 
❯ echo "d,d,b,a,a,b,c,d,d,e" | bombchu -d',' -s -u -o'; '
a; b; c; d; e

❯ # i got some csv data that looks like this...
❯ head -n 2 foo.csv
"2022-04-10 06:00:10",,51111

❯ # let's extract all the unique ips and put them on new lines
❯ cat foo.csv | bombchu -c ip -u -n

❯ # i gotta put this data in to splunk now in term format
❯ cat foo.csv | bombchu -c ip -u -t

❯ # now i got some json data that looks like this...
❯ cat foo.json
    "foo": {
        "id": 1234
    "foo2": {
        "id": 1337
    "foo3": {
        "id": 1111

❯ # i need all these ids sorted
❯ cat foo.json | bombchu -j id -s
[1111, 1234, 1337]

❯ # now i got some log file that looks like this...
❯ head -n 2 foo.log
{"name": "joe", "id": 4242, "action": "bleh"}
{"name": "bob", "id": 1337, "action": "blah"}

❯ # let's see the users in these logs
❯ cat foo.log | bombchu -jl name -o", "
joe, bob, bob, bob, bob, john, john, bob, bob, susan, susan, bob

❯ # i need these sorted unique and ready to go into splunk
❯ cat tests/foo.log | bombchu -jl name -s -u -sp
("bob", "joe", "john", "susan")

❯ # now throw that on my clipboard
❯ cat tests/foo.log | bombchu -jl name -s -u -sp -cp
("bob", "joe", "john", "susan")

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

bombchu-0.1.0.tar.gz (2.8 kB view hashes)

Uploaded source

Built Distribution

bombchu-0.1.0-py3.9.egg (4.1 kB view hashes)

Uploaded 0 1 0

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page