CLI tool for doing set operations (e.g. intersection, difference, union) on lines of input
Project description
kvenn
CLI Tool for doing set-operations on lines of input. Each line is treated as an item in a set. Each input is treated as a set.
Usage
usage: kvenn [-h] [-n] [-s] [-f]
[-o {+,-,x,d,union,difference,intersection,unique}]
sets [sets ...]
positional arguments:
sets Each file is a set and each line in the file is a
member of the set
optional arguments:
-h, --help show this help message and exit
-n, --non-empty non-empty values only
-s, --strip strip surrounding whitespace
-f, --filter strip and filter to non-empty
-o {+,-,x,d,union,difference,intersection,unique}, --operation {+,-,x,d,union,difference,intersection,unique}
Operation to perform on the sets [-] Subtract sets
1...N from set 0 [+] Get the union of sets 0...N [x]
Get the intersection of sets 0...N [d] Symmetric
difference (disjunctive union). Elements from all sets
which are not in any others.
Examples
Unique values in a file
kvenn <input>
Unique values in two or more files (Also --union
)
kvenn <input1> <input2> <inputN>
Values found in both files
kvenn <input1> <input2> --operation intersection
Values found in only one file
kvenn <input1> <input2> <inputN> --operation unique
Values found in only one file
kvenn <input1> <input2> <inputN> --operation unique
Subtract values in B (and C, D.. etc) from A. (Unique values from A)
kvenn <inputA> <inputB> [<inputC>] --operation subtract
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
kvenn-1.0.4.tar.gz
(2.4 kB
view details)
File details
Details for the file kvenn-1.0.4.tar.gz
.
File metadata
- Download URL: kvenn-1.0.4.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1595c881dab830df4094b801aa2962ef6103261b512f27a10bb5dd3affe024b |
|
MD5 | e45029e03c5f29d975331a2d36d65b76 |
|
BLAKE2b-256 | b87aa44b425869f6d43eda62ebad4a65b99a3d26fc18e1a6e5ca919847b2449c |