eri-cli

command
v0.0.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2022 License: MIT Imports: 1 Imported by: 0

README

ERI's CLI

eri-cli -h
CLI Compagnion of ERI

Usage:
  eri-cli [command]

Available Commands:
  check       Validate email addresses
  help        Help about any command
  report      Reporting companion to check

Flags:
  -h, --help   help for eri-cli

Use "eri-cli [command] --help" for more information about a command.

Installation

With Go installed
go get -u github.com/Dynom/ERI/cmd/eri-cli
Download a release

Download from: https://github.com/Dynom/ERI/releases

Commands

check

Validates one or more e-mail addresses.

Examples
A basic run
$ eri-cli check john.doe@example.org
{
  "input": "john.doe@example.org",
  "valid": true,
  "checks_run": [
    "syntax",
    "lookup",
    "domainHasIP"
  ],
  "checks_passed": [
    "syntax",
    "lookup",
    "domainHasIP"
  ],
  "version": 2
}

Notes:

  • This result is actually incorrect and only serves as an example.
  • The version field, is for discriminating on future changes. Any change to the structure of the output will change the version number to a new unique value.
Processing a list
$ cat emails.csv | eri-cli check > result.json

Directly from a database

$ echo "copy (select email from users) to STDOUT WITH CSV" | \
    psql <connection details> | \
    eri-cli check --resolver 1.1.1.1 | \
    tee result.json | \
    eri-cli report --only-invalid

Piping through compressed

bzcat emails.bz2 | \
    eri-cli check | \
    eri-cli report --only-invalid > invalid-emails.json

report

Produces a report from a check run or previously recorded run and adds more power when it comes to reporting styles

Examples

Reading from a previous run

bzcat report.bz2 | eri-cli report

Pipe invalid results through to an external program

bzcat emails.bz2 | \
    eri-cli check --resolver 1.1.1.1 | \
    eri-cli report --only-invalid | \
    jq .email | \
    xargs ./updateStatus.sh 

Using Shell process substitution

eri-cli check --input-is-email < <( echo "john@example.org" ) | jq .valid

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL