Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/slub/ldj-distinctvalues
output all the distinct values of a given path of given line-delimited jsonfile(s).
https://github.com/slub/ldj-distinctvalues
cli line-delimited-json python statistics
Last synced: 27 days ago
JSON representation
output all the distinct values of a given path of given line-delimited jsonfile(s).
- Host: GitHub
- URL: https://github.com/slub/ldj-distinctvalues
- Owner: slub
- License: apache-2.0
- Created: 2018-05-31T10:36:42.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-05-31T11:24:19.000Z (over 6 years ago)
- Last Synced: 2024-04-14T22:49:12.179Z (8 months ago)
- Topics: cli, line-delimited-json, python, statistics
- Language: Python
- Size: 7.81 KB
- Stars: 2
- Watchers: 8
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ldj-distinctvalues - distinct values and their occurence of line delimited json
ldj-distinctvalues is a commandline command (Python3 program) that outputs distinct values and their occurence numbers (sorted by their occurence numbers) of a path of a given line delimited json document.
It reads vom stdin and prints to stdout.
## Usage
```
ldj-distinctvalues:
required arguments:
-path the path of the value to examine in the line delimited json document. You can navigate by . (dot) into objects (into array elements is not possible yet). You can use * as a wildcard.
```* example:
```
ldj-distinctvalues -path [PATH TO EXAMINE] < [LINE DELIMITED JSON FILE] > [OUTPUT STATISTICS DOCUMENT]
```## Requirements
No special requirements. It uses the Python standard libraries json, sys and argparse.### Install system-wide via pip
* via pip:
```
sudo -H pip3 install --upgrade [ABSOLUTE PATH TO YOUR LOCAL GIT REPOSITORY OF LDJ-DISTINCTVALUES]
```
(which provides you ```ldj-distinctvalues``` as a system-wide commandline command)