dopeoplesay-cli

Command-line interface for Do People Say it.

Usage no npm install needed!

<script type="module">
  import dopeoplesayCli from 'https://cdn.skypack.dev/dopeoplesay-cli';
</script>

README

dopeoplesay-cli

Build Status Coverage Status

A command-line interface for Do People Say it.

Usage

npm install -g dopeoplesay-cli

You can call the CLI either from dopeoplesay, dpsi or dps:

dopeoplesay <keyword>
dopeoplesay sequel to
dopeoplesay extraordinary
dpsi sequel to
dpsi extraordinary
dps sequel to
dps extraordinary

JSON output

Option -j, --json provides JSON output formatter.

dps --json epic fail
dps -j epic fail

You'll get a result like this:

{
  "definitions": [
    {
      "label": "epic fail",
      "pos": "noun",
      "definitions": [
        "Utter, total failure, especially where success should have been reasonably expected."
      ],
      "source": "Wiktionary"
    },
    ...
  ],
  "collocations": [
    "Bravo, bravo on the epic fail!",
    "So, that's an epic fail then?",
    "Not giving myself an epic fail for going wheat on",
    ...
  ]
}

This can be combined with various pipelines and workflows.

dps --json "epic fail" | jq ".collocations[0]" | pbcopy