colligere | ||
tests | ||
.gitignore | ||
LICENSE | ||
Makefile | ||
pyproject.toml | ||
README.md | ||
requirements.txt |
π₯ Book Metadata Tool βοΈ
Herramienta para metadatos en JSON Lines
Tool for metadata in JSON Lines
Uso / Usage
Analizer
$ python colligere/analizer.py metadata.jsonl
[0:00:00][0%][6i][57k] Fragmina verborum Titivillus colligit horum
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β βββββββββββββββββββββββββββββββββββββ
β βββββββββββββββ β
β ββ β 50k
β ββ β
β ββ β
β ββ β 40k
β ββ β
β ββ β
β ββ β 30k
βββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
1i 2i 3i 4i 5i 6i
$ python colligere/analizer.py -h
usage: Analizer [-h] [-i SAMPLE_LEN] [-k KEY] [-ky KEY] [-d DIR] [--debug] [-q] jsonl
Analize keys and values from JSON lines.
positional arguments:
jsonl JSON lines file
options:
-h, --help show this help message and exit
-i SAMPLE_LEN, --items SAMPLE_LEN
random sample items size; 1000 by default
-k KEY, --key KEY key value to analize
-ky KEY, --key-axis KEY
like -k, but its values are used for y-axis
-d DIR, --directory DIR
CSV output directory; CWD by default
--debug stop on exception for debugging
-q, --quiet avoid prints; ignored by --debug
$ python colligere/analizer.py -k metadata.record.catalogingLanguage metadata.jsonl
β³πΊππΊπβ³
$ cat res.metadata.record.catalogingLanguage.csv | head
key,len,freq
eng,664,0.35622
und,99,0.05311
fre,90,0.04828
spa,65,0.03487
ger,133,0.07135
ara,10,0.00536
zxx,23,0.01234
heb,6,0.00322
jpn,20,0.01073
Desarrollo / Development
ConfiguraciΓ³n inicial / Initial setup:
virtualenv .venv
source .venv/bin/activate
pip install -r requirements.txt
Pruebas / Tests:
make test
AnΓ‘lisis y formateador / Lint:
make lint
Empaquetamiento / Packaging:
make package