0.3.1 • Published 7 years ago
gdelt-toolkit v0.3.1
GDELT TOOLKIT
Tools for downloading, parsing, and linting GDELT data, with CLI and Module Bindings
CLI API
npm install -g gdelt-toolkit
gdelt <cmd> [args]
Commands:
gdelt download get gdelt by datetime
gdelt lint lint gdelt by datetime
gdelt clean clean cache
Download
Download GDELT file and ouput as JSON
or N3
for specified UTC datetime (ISO-8601). GDELT files are published on the hour at 15min intervals; omitting the datetime arg will download the first file of the day. Downloads are cached locally.
Default rules for parsing GDELT tsv files are defined for JSON and N3.
gdelt download [-d YYYY-MM-DD | YYYY-MM-DDThh:mm] [-f] [--cachePath]
Options:
--datetime, -d datetime [defaults to today]
--format, -f output format [choices: "json", "n3"] [default: "json"]
--cachePath path to cache [defaults to internal module cache]
Lint
Lint GDELT file for specified UTC datetime (ISO-8601), outputting linting errors as JSON
. Omitting the datetime arg will download the first file of the day.
Default linting rules are defined here.
gdelt download [-d YYYY-MM-DD | YYYY-MM-DDThh:mm] [--cachePath]
Options:
--datetime, -d datetime [default to today]
--cachePath path to cache [defaults to internal module cache]
List
List all available GDELT files, outputting a JSON
list of each file url, size, and checksum.
gdelt list [--cachePath]
Options:
--cachePath path to cache [defaults to internal module cache]
Clean Cache
Clear cache of downloaded GDELT files.
gdelt clean
clean cache [--cachePath]
Options:
--cachePath path to cache [defaults to internal module cache]