[
  {
    "path": ".ci/build-cargo-make.ps1",
    "content": "#!/usr/bin/env powershell\n\n<#\n.SYNOPSIS\nBuilds cargo-make into a dedicated directory for caching\n\n.DESCRIPTION\nThe script will run `cargo install <PLUGIN>` to target a non-default directory,\nallowing a user to cache the installation directory for caching in a CI\ncontext. The executables in the `bin` directory are linked back into\n`$env:CARGO_HOME\\bin` so that no further PATH manipulation is necessary.\n\n.EXAMPLE\n.\\build-cargo-make.ps1\n#>\n\nparam (\n)\n\nfunction main() {\n    if (Test-Path env:CARGO_HOME) {\n        $dest = \"$env:CARGO_HOME\"\n    } elseif (Test-Path env:USERPROFILE) {\n        $dest = \"$env:USERPROFILE\\.cargo\"\n    } elseif (Test-Path env:HOME) {\n        $dest = \"$env:HOME\\.cargo\"\n    } else {\n        throw \"cannot determine CARGO_HOME\"\n    }\n\n    Install-CargoMake \"$dest\"\n}\n\nfunction Install-CargoMake([string]$Dest) {\n    $plugin = \"cargo-make\"\n\n    Write-Output \"--- Building $plugin in $Dest\"\n\n    if (-Not (Test-Path \"$Dest\")) {\n        New-Item -Type Directory \"$Dest\" | Out-Null\n    }\n    rustup install stable\n    cargo +stable install --root \"$Dest\\opt\\$plugin\" --force --verbose \"$plugin\"\n\n    # Create symbolic links for all execuatbles into $env:CARGO_HOME\\bin\n    Get-ChildItem \"$Dest\\opt\\$plugin\\bin\\*.exe\" | ForEach-Object {\n        $dst = \"$Dest\\bin\\$($_.Name)\"\n\n        if (-Not (Test-Path \"$dst\")) {\n            Write-Debug \"Symlinking $_ to $dst\"\n            New-Item -Path \"$dst\" -Type SymbolicLink -Value \"$_\" | Out-Null\n        }\n    }\n}\n\nmain\n"
  },
  {
    "path": ".ci/build-cargo-make.sh",
    "content": "#!/usr/bin/env sh\n# shellcheck shell=sh disable=SC2039\n\nprint_usage() {\n  local program=\"$1\"\n\n  echo \"$program\n\n    Builds cargo-make into a dedicated directory for caching\n\n    USAGE:\n        $program [FLAGS] [--] <PLUGIN>\n\n    FLAGS:\n        -h, --help      Prints help information\n\n    ARGS:\n        <PLUGIN>  Name of the Cargo plugin\n    \" | sed 's/^ \\{1,4\\}//g'\n}\n\nmain() {\n  set -eu\n  if [ -n \"${DEBUG:-}\" ]; then set -v; fi\n  if [ -n \"${TRACE:-}\" ]; then set -xv; fi\n\n  local program\n  program=\"$(basename \"$0\")\"\n\n  OPTIND=1\n  while getopts \"h-:\" arg; do\n    case \"$arg\" in\n      h)\n        print_usage \"$program\"\n        return 0\n        ;;\n      -)\n        case \"$OPTARG\" in\n          help)\n            print_usage \"$program\"\n            return 0\n            ;;\n          '')\n            # \"--\" terminates argument processing\n            break\n            ;;\n          *)\n            print_usage \"$program\" >&2\n            die \"invalid argument --$OPTARG\"\n            ;;\n        esac\n        ;;\n      \\?)\n        print_usage \"$program\" >&2\n        die \"invalid argument; arg=-$OPTARG\"\n        ;;\n    esac\n  done\n  shift \"$((OPTIND - 1))\"\n\n  local dest\n  if [ -n \"${CARGO_HOME:-}\" ]; then\n    dest=\"$CARGO_HOME\"\n  elif [ -n \"${HOME:-}\" ]; then\n    dest=\"$HOME/.cargo\"\n  else\n    die \"cannot determine CARGO_HOME\"\n  fi\n\n  install_cargo_make \"$dest\"\n}\n\ninstall_cargo_make() {\n  local dest=\"$1\"\n  local plugin=\"cargo-make\"\n\n  echo \"--- Building $plugin in $dest\"\n\n  mkdir -p \"$dest\"\n  rustup install stable\n  cargo +stable install --root \"$dest/opt/$plugin\" --force --verbose \"$plugin\"\n\n  # Create symbolic links for all execuatbles into $CARGO_HOME/bin\n  ln -snf \"$dest/opt/$plugin/bin\"/* \"$dest/bin/\"\n}\n\ndie() {\n  echo \"\" >&2\n  echo \"xxx $1\" >&2\n  echo \"\" >&2\n  return 1\n}\n\nmain \"$@\"\n"
  },
  {
    "path": ".ci/build-checksums.ps1",
    "content": "#!/usr/bin/env powershell\n\n<#\n.SYNOPSIS\nGenerates checksum digests for a file\n\n.DESCRIPTION\nThe script generates a SHA256 and MD5 digest, similar to that of shasum -a 256.\n\n.EXAMPLE\n.\\build-checksums.ps1 file\n#>\n\nParam(\n    # An input file\n    [Parameter(Mandatory=$True)]\n    [String[]]\n    $File\n)\n\n\nfunction main([string]$File) {\n    Write-Host \"--- Generating checksums for '$File'\"\n\n    Build-Sha256 \"$File\"\n    Build-Md5 \"$File\"\n}\n\nfunction Build-Sha256([string]$File) {\n    Write-Host \"  - Generating SHA256 checksum digest\"\n\n    Get-FileHash \"$File\" -Algorithm SHA256 `\n        | ForEach-Object { \"$($_.Hash.ToLower())  $(Split-Path $_.Path -Leaf)\" } `\n        > \"$File.sha256\"\n}\n\nfunction Build-Md5([string]$File) {\n    Write-Host \"  - Generating MD5 checksum digest\"\n\n    Get-FileHash \"$File\" -Algorithm MD5 `\n        | ForEach-Object { \"$($_.Hash.ToLower())  $(Split-Path $_.Path -Leaf)\" } `\n        > \"$File.md5\"\n}\n\nmain \"$File\"\n"
  },
  {
    "path": ".ci/build-checksums.sh",
    "content": "#!/usr/bin/env sh\n# shellcheck shell=sh disable=SC2039\n\nprint_usage() {\n  local program=\"$1\"\n\n  echo \"$program\n\n    Generates a checksum digests for a file\n\n    USAGE:\n        $program [FLAGS] [--] <FILE>\n\n    FLAGS:\n        -h, --help      Prints help information\n\n    ARGS:\n        <FILE>  An input file\n    \" | sed 's/^ \\{1,4\\}//g'\n}\n\nmain() {\n  set -eu\n  if [ -n \"${DEBUG:-}\" ]; then set -v; fi\n  if [ -n \"${TRACE:-}\" ]; then set -xv; fi\n\n  local program\n  program=\"$(basename \"$0\")\"\n\n  OPTIND=1\n  while getopts \"h-:\" arg; do\n    case \"$arg\" in\n      h)\n        print_usage \"$program\"\n        return 0\n        ;;\n      -)\n        case \"$OPTARG\" in\n          help)\n            print_usage \"$program\"\n            return 0\n            ;;\n          '')\n            # \"--\" terminates argument processing\n            break\n            ;;\n          *)\n            print_usage \"$program\" >&2\n            die \"invalid argument --$OPTARG\"\n            ;;\n        esac\n        ;;\n      \\?)\n        print_usage \"$program\" >&2\n        die \"invalid argument; arg=-$OPTARG\"\n        ;;\n    esac\n  done\n  shift \"$((OPTIND - 1))\"\n\n  if [ -z \"${1:-}\" ]; then\n    print_usage \"$program\" >&2\n    die \"missing <FILE> argument\"\n  fi\n  local file=\"$1\"\n  shift\n  if [ ! -f \"$file\" ]; then\n    print_usage \"$program\" >&2\n    die \"file '$file' not found\"\n  fi\n\n  need_cmd basename\n  need_cmd dirname\n\n  local basename\n  basename=\"$(basename \"$file\")\"\n\n  echo \"--- Generating checksums for '$file'\"\n  cd \"$(dirname \"$file\")\"\n  build_md5 \"$basename\"\n  build_sha256 \"$basename\"\n}\n\nbuild_sha256() {\n  local file=\"$1\"\n\n  need_cmd uname\n\n  echo \"  - Generating SHA256 checksum digest\"\n  {\n    case \"$(uname -s)\" in\n      FreeBSD)\n        need_cmd sed\n        need_cmd sha256\n        sha256 \"$file\" | sed -E 's/^.*\\(([^)]+)\\) = (.+)$/\\2  \\1/'\n        ;;\n      Linux)\n        need_cmd sha256sum\n        sha256sum \"$file\"\n        ;;\n      Darwin)\n        need_cmd shasum\n        shasum -a 256 \"$file\"\n        ;;\n      *)\n        die \"unsupported platform '$(uname -s)'\"\n        ;;\n    esac\n  } >\"$file.sha256\"\n}\n\nbuild_md5() {\n  local file=\"$1\"\n\n  need_cmd uname\n\n  echo \"  - Generating MD5 checksum digest\"\n  {\n    case \"$(uname -s)\" in\n      FreeBSD)\n        need_cmd md5\n        need_cmd sed\n        md5 \"$file\" | sed -E 's/^.*\\(([^)]+)\\) = (.+)$/\\2  \\1/'\n        ;;\n      Linux)\n        need_cmd md5sum\n        md5sum \"$file\"\n        ;;\n      Darwin)\n        need_cmd md5\n        need_cmd sed\n        md5 \"$file\" | sed -E 's/^.*\\(([^)]+)\\) = (.+)$/\\2  \\1/'\n        ;;\n      *)\n        die \"unsupported platform '$(uname -s)'\"\n        ;;\n    esac\n  } >\"$file.md5\"\n}\n\ndie() {\n  echo \"\" >&2\n  echo \"xxx $1\" >&2\n  echo \"\" >&2\n  return 1\n}\n\nneed_cmd() {\n  if ! command -v \"$1\" >/dev/null 2>&1; then\n    die \"Required command '$1' not found on PATH\"\n  fi\n}\n\nmain \"$@\"\n"
  },
  {
    "path": ".ci/build-docker-image.sh",
    "content": "#!/usr/bin/env sh\n# shellcheck shell=sh disable=SC2039\n\nprint_usage() {\n  local program=\"$1\"\n\n  echo \"$program\n\n    Builds a Docker image\n\n    USAGE:\n        $program [FLAGS] [--] <IMG> <VERSION> <REPO> <AUTHOR> <LICENSE> <BIN> <ARCHIVE>\n\n    FLAGS:\n        -h, --help          Prints help information\n\n    ARGS:\n        <ARCHIVE> Tarball archive [example: names-x86_64-linux-musl.tar.gz]\n        <AUTHOR>  Author names [example: Jane Doe <jdoe@example.com]\n        <BIN>     Name of the program [example: names]\n        <IMG>     Name of Docker Hub image [example: jdoe/names]\n        <LICENSE> License for project [example: MPL-2.0]\n        <REPO>    Name of GitHub repository [example: jdoe/names-rs]\n        <VERSION> Version to install and tag [example: 1.0.1]\n    \" | sed 's/^ \\{1,4\\}//g'\n}\n\nmain() {\n  set -eu\n  if [ -n \"${DEBUG:-}\" ]; then set -v; fi\n  if [ -n \"${TRACE:-}\" ]; then set -xv; fi\n\n  local program img version repo author license bin archive\n  program=\"$(basename \"$0\")\"\n\n  OPTIND=1\n  while getopts \"h-:\" arg; do\n    case \"$arg\" in\n      h)\n        print_usage \"$program\"\n        return 0\n        ;;\n      -)\n        case \"$OPTARG\" in\n          help)\n            print_usage \"$program\"\n            return 0\n            ;;\n          '')\n            # \"--\" terminates argument processing\n            break\n            ;;\n          *)\n            print_usage \"$program\" >&2\n            die \"invalid argument --$OPTARG\"\n            ;;\n        esac\n        ;;\n      \\?)\n        print_usage \"$program\" >&2\n        die \"invalid argument; arg=$arg\"\n        ;;\n    esac\n  done\n  shift \"$((OPTIND - 1))\"\n\n  if [ -z \"${1:-}\" ]; then\n    print_usage \"$program\" >&2\n    die \"missing <IMG> argument\"\n  fi\n  img=\"$1\"\n  shift\n  if [ -z \"${1:-}\" ]; then\n    print_usage \"$program\" >&2\n    die \"missing <VERSION> argument\"\n  fi\n  version=\"$1\"\n  shift\n  if [ -z \"${1:-}\" ]; then\n    print_usage \"$program\" >&2\n    die \"missing <REPO> argument\"\n  fi\n  repo=\"$1\"\n  shift\n  if [ -z \"${1:-}\" ]; then\n    print_usage \"$program\" >&2\n    die \"missing <AUTHOR> argument\"\n  fi\n  author=\"$1\"\n  shift\n  if [ -z \"${1:-}\" ]; then\n    print_usage \"$program\" >&2\n    die \"missing <LICENSE> argument\"\n  fi\n  license=\"$1\"\n  shift\n  if [ -z \"${1:-}\" ]; then\n    print_usage \"$program\" >&2\n    die \"missing <BIN> argument\"\n  fi\n  bin=\"$1\"\n  shift\n  if [ -z \"${1:-}\" ]; then\n    print_usage \"$program\" >&2\n    die \"missing <ARCHIVE> argument\"\n  fi\n  archive=\"$1\"\n  shift\n\n  if [ ! -f \"$archive\" ]; then\n    print_usage \"$program\" >&2\n    die \"archive file does not exist: '$archive'\"\n  fi\n  if [ ! -f \"$archive.sha256\" ]; then\n    print_usage \"$program\" >&2\n    die \"archive checksum file does not exist: '$archive.sha256'\"\n  fi\n\n  build_docker_image \\\n    \"$img\" \"$version\" \"$repo\" \"$author\" \"$license\" \"$bin\" \"$archive\"\n}\n\nbuild_docker_image() {\n  local img=\"$1\"\n  local version=\"$2\"\n  local repo=\"$3\"\n  local author=\"$4\"\n  local license=\"$5\"\n  local bin=\"$6\"\n  local archive=\"$7\"\n\n  need_cmd basename\n  need_cmd date\n  need_cmd dirname\n  need_cmd docker\n  need_cmd git\n  need_cmd grep\n  need_cmd shasum\n  need_cmd tar\n\n  local full_name\n  full_name=\"$(basename \"$archive\")\"\n  full_name=\"${full_name%%.tar.gz}\"\n\n  echo \"--- Building a Docker image $img:$version for '$bin'\"\n\n  local workdir\n  workdir=\"$(mktemp -d 2>/dev/null || mktemp -d -t tmp)\"\n  setup_traps \"cleanup $workdir\"\n\n  local revision created\n  revision=\"$(git show -s --format=%H)\"\n  created=\"$(date -u +%FT%TZ)\"\n\n  cd \"$(dirname \"$archive\")\"\n  echo \"  - Verifying $archive\"\n  shasum -a 256 -c \"$archive.sha256\"\n\n  cd \"$workdir\"\n  echo \"  - Extracting $bin from $archive\"\n  tar xf \"$archive\"\n  mv \"$full_name\" \"$bin\"\n\n  echo \"  - Generating image metadata\"\n  cat <<-END >image-metadata\n\timg=\"$img\"\n\tversion=\"$version\"\n\tsource=\"http://github.com/$repo.git\"\n\trevision=\"$revision\"\n\tcreated=\"$created\"\n\tEND\n\n  echo \"  - Generating Dockerfile\"\n  cat <<-END >Dockerfile\n\tFROM scratch\n  LABEL \\\n    name=\"$img\" \\\n    org.opencontainers.image.version=\"$version\" \\\n    org.opencontainers.image.authors=\"$author\" \\\n    org.opencontainers.image.licenses=\"$license\" \\\n    org.opencontainers.image.source=\"http://github.com/$repo.git\" \\\n    org.opencontainers.image.revision=\"$revision\" \\\n    org.opencontainers.image.created=\"$created\"\n\tADD $bin /$bin\n\tADD image-metadata /etc/image-metadata\n\tENTRYPOINT [\"/$bin\"]\n\tEND\n\n  echo \"  - Building image $img:$version\"\n  docker build -t \"$img:$version\" .\n  if echo \"$version\" | grep -q -E '^\\d+\\.\\d+.\\d+$'; then\n    docker tag \"$img:$version\" \"$img:latest\"\n  fi\n}\n\n# See: https://git.io/JtdlJ\nsetup_traps() {\n  local trap_fun\n  trap_fun=\"$1\"\n\n  local sig\n  for sig in HUP INT QUIT ALRM TERM; do\n    trap \"\n      $trap_fun\n      trap - $sig EXIT\n      kill -s $sig \"'\"$$\"' \"$sig\"\n  done\n\n  if [ -n \"${ZSH_VERSION:-}\" ]; then\n    eval \"zshexit() { eval '$trap_fun'; }\"\n  else\n    # shellcheck disable=SC2064\n    trap \"$trap_fun\" EXIT\n  fi\n}\n\ncleanup() {\n  local workdir=\"$1\"\n\n  if [ -d \"$workdir\" ]; then\n    echo \"  - Cleanup up Docker context $workdir\"\n    rm -rf \"$workdir\"\n  fi\n}\n\ndie() {\n  echo \"\" >&2\n  echo \"xxx $1\" >&2\n  echo \"\" >&2\n  exit 1\n}\n\nneed_cmd() {\n  if ! command -v \"$1\" >/dev/null 2>&1; then\n    die \"Required command '$1' not found on PATH\"\n  fi\n}\n\nmain \"$@\"\n"
  },
  {
    "path": ".ci/cirrus-release.sh",
    "content": "#!/usr/bin/env sh\n# shellcheck disable=SC3043\n\nmain() {\n  set -eu\n  if [ -n \"${DEBUG:-}\" ]; then set -v; fi\n  if [ -n \"${TRACE:-}\" ]; then set -xv; fi\n\n  local subcmd\n  subcmd=\"$1\"\n  shift\n\n  \"$subcmd\" \"$@\"\n}\n\nchangelog_section() {\n  local changelog_file=\"$1\"\n  local tag=\"$2\"\n  local version=\"${tag#v}\"\n\n  need_cmd awk\n\n  awk -v version_header_pat=\"^## \\\\\\[$version\\\\\\] - \" '\n    BEGIN {\n      version_section = 0\n      urls_section = 0\n    }\n\n    # Start printing when the version section is found including the section\n    # header\n    $0 ~ version_header_pat {\n      version_section = 1\n      print\n      next\n    }\n    # Stop printing when the next version section is found or when the urls\n    # section is found\n    version_section == 1 && (/^## \\[/ || /^<!-- next-url -->$/) {\n      version_section = 0\n    }\n    # Print lines while in the version section\n    version_section == 1 {\n      print\n    }\n    # Start printing when the urls section is found, including the section\n    # comment\n    /^<!-- next-url -->$/ {\n      urls_section = 1\n      print\n      next\n    }\n    # Print lines while in the urls section\n    urls_section == 1 {\n      print\n    }\n  ' \"$changelog_file\"\n\n}\n\nci_download() {\n  local artifact=\"$1\"\n  shift\n\n  need_cmd basename\n  need_cmd curl\n\n  if [ -z \"${CIRRUS_BUILD_ID:-}\" ]; then\n    die \"missing required environment variable: CIRRUS_BUILD_ID\"\n  fi\n\n  local dest\n  dest=\"$(basename \"$artifact\")\"\n\n  echo \"--- Downlading Cirrus artifact '$artifact' to '$dest'\" >&2\n\n  curl \\\n    --fail \\\n    -X GET \\\n    --output \"$dest\" \\\n    \"https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/$artifact\" \\\n    \"${@:---}\"\n}\n\ngh_create_release() {\n  local repo=\"$1\"\n  local tag=\"$2\"\n  local name=\"$3\"\n  local body=\"$4\"\n  local draft=\"$5\"\n  local prerelease=\"$6\"\n\n  need_cmd jo\n  need_cmd jq\n  need_cmd sed\n\n  local payload\n  payload=\"$(\n    jo \\\n      tag_name=\"$tag\" \\\n      name=\"$name\" \\\n      body=\"$body\" \\\n      draft=\"$draft\" \\\n      prerelease=\"$prerelease\"\n  )\"\n\n  local response\n  if ! response=\"$(\n    gh_rest POST \"/repos/$repo/releases\" --data \"$payload\"\n  )\"; then\n    echo \"!!! Failed to create a release for tag $tag\" >&2\n    return 1\n  fi\n\n  echo \"$response\" | jq -r .upload_url | sed -E 's,\\{.+\\}$,,'\n}\n\ngh_create_version_release() {\n  local repo=\"$1\"\n  local tag=\"$2\"\n\n  gh_delete_release \"$repo\" \"$tag\"\n\n  local prerelease\n  if echo \"${tag#v}\" | grep -q -E '^\\d+\\.\\d+.\\d+$'; then\n    prerelease=false\n  else\n    prerelease=true\n  fi\n\n  echo \"--- Creating GitHub *draft* release '$tag' for '$repo'\" >&2\n\n  gh_create_release \\\n    \"$repo\" \\\n    \"$tag\" \\\n    \"$tag\" \\\n    \"Release ${tag#v}\" \\\n    true \\\n    \"$prerelease\"\n}\n\ngh_delete_release() {\n  local repo=\"$1\"\n  local tag=\"$2\"\n\n  local release_ids rid\n  release_ids=\"$(gh_release_id_for_tag \"$repo\" \"$tag\" 2>/dev/null)\"\n\n  if [ -n \"$release_ids\" ]; then\n    for rid in $release_ids; do\n      echo \"--- Deleting GitHub pre-existing release '$tag' ($rid)\" >&2\n      if ! gh_rest DELETE \"/repos/$repo/releases/$rid\" >/dev/null; then\n        echo \"!!! Failed to delete a pre-existing release '$tag' ($rid)\" >&2\n        return 1\n      fi\n    done\n  fi\n}\n\ngh_download() {\n  local repo=\"$1\"\n  shift\n  local tag=\"$1\"\n  shift\n  local asset=\"$1\"\n  shift\n\n  need_cmd curl\n  need_cmd jq\n\n  if ! gh_rest GET \"/repos/$repo/releases/tags/$tag\" >/tmp/response; then\n    echo \"!!! Failed to find a release for tag $tag\" >&2\n    return 1\n  fi\n\n  local dl_url\n  dl_url=\"$(\n    jq -r \".assets[] | select(.name == \\\"$asset\\\") | .browser_download_url\" \\\n      </tmp/response\n  )\"\n\n  echo \"--- Downlading GitHub asset '$asset' from '$repo' ($tag)\" >&2\n\n  curl \\\n    --fail \\\n    -X GET \\\n    --location \\\n    --output \"$asset\" \\\n    \"$dl_url\" \\\n    \"${@:---}\"\n}\n\ngh_publish_release() {\n  local repo=\"$1\"\n  local tag=\"$2\"\n  local changelog_file=\"$3\"\n\n  need_cmd jo\n  need_cmd jq\n\n  local release_id\n  release_id=\"$(gh_release_id_for_tag \"$repo\" \"$tag\")\"\n\n  local body\n  if [ \"$tag\" = \"nightly\" ]; then\n    body=\"\"\n  else\n    local changelog_section\n    changelog_section=\"$(changelog_section \"$changelog_file\" \"$tag\")\"\n\n    body=\"$changelog_section\"\n  fi\n\n  local payload\n  payload=\"$(\n    jo \\\n      draft=false \\\n      name=\"Release ${tag#v}\" \\\n      body=\"$body\"\n  )\"\n\n  echo \"--- Publishing GitHub release '$tag' for '$repo'\" >&2\n\n  local response\n  if ! response=\"$(\n    gh_rest POST \"/repos/$repo/releases/$release_id\" --data \"$payload\"\n  )\"; then\n    echo \"!!! Failed to update a release for tag $tag\" >&2\n    return 1\n  fi\n}\n\ngh_release_id_for_tag() {\n  local repo=\"$1\"\n  local tag=\"$2\"\n\n  need_cmd jq\n\n  if ! gh_rest GET \"/repos/$repo/releases\" >/tmp/response; then\n    echo \"!!! Failed to find a release for tag $tag\" >&2\n    return 1\n  fi\n\n  jq \".[] | select(.tag_name == \\\"$tag\\\") | .id\" </tmp/response\n}\n\ngh_release_upload_url_for_tag() {\n  local repo=\"$1\"\n  local tag=\"$2\"\n\n  need_cmd jq\n  need_cmd sed\n\n  if ! gh_rest GET \"/repos/$repo/releases/tags/$tag\" >/tmp/response; then\n    echo \"!!! Failed to find a release for tag $tag\" >&2\n    return 1\n  fi\n\n  jq -r .upload_url </tmp/response | sed -E 's,\\{.+\\}$,,'\n}\n\ngh_rest() {\n  local method=\"$1\"\n  shift\n  local path=\"$1\"\n  shift\n\n  gh_rest_raw \"$method\" \"https://api.github.com$path\" \"$@\"\n}\n\ngh_rest_raw() {\n  local method=\"$1\"\n  shift\n  local url=\"$1\"\n  shift\n\n  need_cmd curl\n\n  if [ -z \"${GITHUB_TOKEN:-}\" ]; then\n    die \"missing required environment variable: GITHUB_TOKEN\"\n  fi\n\n  curl \\\n    --fail \\\n    --header \"Authorization: token $GITHUB_TOKEN\" \\\n    --header \"Accept: application/vnd.github.v3+json\" \\\n    -X \"$method\" \\\n    \"$url\" \\\n    \"${@:---}\"\n}\n\ngh_update_tag() {\n  local repo=\"$1\"\n  local tag=\"$2\"\n\n  need_cmd git\n  need_cmd jo\n\n  local sha\n  sha=\"$(git show -s --format=%H)\"\n\n  if gh_rest GET \"/repos/$repo/git/refs/tags/$tag\" >/dev/null 2>&1; then\n    echo \"--- Updating Git tag reference for '$tag'\" >&2\n    local payload\n    payload=\"$(\n      jo \\\n        sha=\"$sha\" \\\n        force=true\n    )\"\n    if ! gh_rest PATCH \"/repos/$repo/git/refs/tags/$tag\" --data \"$payload\" >/dev/null; then\n      echo \"!!! Failed to update Git tag reference for '$tag'\" >&2\n      return 1\n    fi\n  else\n    echo \"--- Creating Git tag reference for '$tag'\" >&2\n    local payload\n    payload=\"$(\n      jo \\\n        sha=\"$sha\" \\\n        ref=\"refs/tags/$tag\"\n    )\"\n    if ! gh_rest POST \"/repos/$repo/git/refs\" --data \"$payload\" >/dev/null; then\n      echo \"!!! Failed to create Git tag reference for '$tag'\" >&2\n      return 1\n    fi\n  fi\n}\n\ngh_upload() {\n  local url=\"$1\"\n  local artifact_file=\"$2\"\n\n  need_cmd basename\n\n  if [ ! -f \"$artifact_file\" ]; then\n    echo \"!!! Artifact file '$artifact_file' not found, cannot upload\" >&2\n    return 1\n  fi\n\n  local artifact content_type\n  artifact=\"$(basename \"$artifact_file\")\"\n  content_type=\"application/octet-stream\"\n\n  echo \"--- Publishing artifact '$artifact' to $url\" >&2\n\n  gh_rest_raw POST \"$url?name=$artifact\" \\\n    --header \"Content-Type: $content_type\" \\\n    --data-binary \"@$artifact_file\"\n}\n\ngh_upload_all() {\n  local url=\"$1\"\n  local dir=\"$2\"\n\n  find \"$dir\" -type f | while read -r artifact_file; do\n    if ! gh_upload \"$url\" \"$artifact_file\"; then\n      echo \"!!! Failed to upload '$artifact_file'\" >&2\n      return 1\n    fi\n  done\n}\n\ndie() {\n  echo \"\" >&2\n  echo \"xxx $1\" >&2\n  echo \"\" >&2\n  exit 1\n}\n\nneed_cmd() {\n  if ! command -v \"$1\" >/dev/null 2>&1; then\n    die \"Required command '$1' not found on PATH\"\n  fi\n}\n\nmain \"$@\"\n"
  },
  {
    "path": ".ci/install-cargo-make.ps1",
    "content": "#!/usr/bin/env powershell\n\n<#\n.SYNOPSIS\nInstalls cargo-make\n\n.DESCRIPTION\nThe script will download and extract a version of `cargo-make` into\na destination path\n\n.EXAMPLE\n.\\install-cargo-make.ps1\n#>\n\nparam (\n    # The version to install which overrides the default of latest\n    [string]$Version = \"\",\n    # Prints the latest version of cargo-make\n    [switch]$PrintLatest = $false\n)\n\nfunction main() {\n    if (Test-Path env:CARGO_HOME) {\n        $dest = \"$env:CARGO_HOME\\bin\"\n    } elseif (Test-Path env:USERPROFILE) {\n        $dest = \"$env:USERPROFILE\\.cargo\\bin\"\n    } elseif (Test-Path env:HOME) {\n        $dest = \"$env:HOME\\.cargo\\bin\"\n    } else {\n        throw \"cannot determine CARGO_HOME\"\n    }\n\n    if ($Version.Length -gt 0) {\n        $version = \"$Version\"\n    } else {\n        $version = Get-LatestCargoMakeVersion\n    }\n\n    if ($PrintLatest) {\n        Write-Host \"$version\"\n    } else {\n        Install-CargoMake \"$version\" \"$dest\"\n    }\n}\n\nfunction Get-LatestCargoMakeVersion() {\n    $crate = \"cargo-make\"\n\n    (cargo search --limit 1 --quiet \"$crate\" | Select-Object -First 1).\n        Split('\"')[1]\n}\n\nfunction Install-CargoMake([string]$Version, [string]$Dest) {\n    $fileBase = \"cargo-make-v$Version-x86_64-pc-windows-msvc\"\n    $url = \"https://github.com/sagiegurari/cargo-make/releases/download/$Version\"\n    $url = \"$url/$fileBase.zip\"\n\n    Write-Output \"--- Installing cargo-make $Version to $Dest\"\n\n    $archive = New-TemporaryFile\n    Rename-Item \"$archive\" \"$archive.zip\"\n    $archive = \"$archive.zip\"\n    $tmpdir = New-TemporaryDirectory\n\n    if (-Not (Test-Path \"$Dest\")) {\n        New-Item -Type Directory \"$Dest\" | Out-Null\n    }\n\n    try {\n        Write-Output \"  - Downloading $url to $archive\"\n        (New-Object System.Net.WebClient).DownloadFile($url, $archive)\n        Expand-Archive -LiteralPath \"$archive\" -DestinationPath \"$tmpdir\"\n        Write-Output \"  - Extracting cargo-make.exe to $Dest\"\n        Copy-Item \"$tmpdir\\cargo-make.exe\" -Destination \"$Dest\"\n    } finally {\n        Remove-Item \"$archive\" -Force\n        Remove-Item \"$tmpdir\" -Force -Recurse\n    }\n}\n\nfunction New-TemporaryDirectory {\n    $parent = [System.IO.Path]::GetTempPath()\n    [string]$name = [System.Guid]::NewGuid()\n    New-Item -ItemType Directory -Path (Join-Path $parent $name)\n}\n\nmain\n"
  },
  {
    "path": ".ci/install-cargo-make.sh",
    "content": "#!/usr/bin/env sh\n# shellcheck shell=sh disable=SC2039\n\nprint_usage() {\n  local program=\"$1\"\n\n  echo \"$program\n\n    Installs cargo-make\n\n    USAGE:\n        $program [FLAGS] [--] [<VERSION>]\n\n    FLAGS:\n        -h, --help          Prints help information\n            --print-latest  Prints the latest version of cargo-make\n\n    ARGS:\n        <VERSION>  Version to install which overrides the default of latest\n    \" | sed 's/^ \\{1,4\\}//g'\n}\n\nmain() {\n  set -eu\n  if [ -n \"${DEBUG:-}\" ]; then set -v; fi\n  if [ -n \"${TRACE:-}\" ]; then set -xv; fi\n\n  local program version print_latest\n  program=\"$(basename \"$0\")\"\n  version=\"\"\n  print_latest=\"\"\n\n  OPTIND=1\n  while getopts \"h-:\" arg; do\n    case \"$arg\" in\n      h)\n        print_usage \"$program\"\n        return 0\n        ;;\n      -)\n        case \"$OPTARG\" in\n          help)\n            print_usage \"$program\"\n            return 0\n            ;;\n          print-latest)\n            print_latest=true\n            ;;\n          '')\n            # \"--\" terminates argument processing\n            break\n            ;;\n          *)\n            print_usage \"$program\" >&2\n            die \"invalid argument --$OPTARG\"\n            ;;\n        esac\n        ;;\n      \\?)\n        print_usage \"$program\" >&2\n        die \"invalid argument; arg=$arg\"\n        ;;\n    esac\n  done\n  shift \"$((OPTIND - 1))\"\n\n  local dest\n  if [ -n \"${CARGO_HOME:-}\" ]; then\n    dest=\"$CARGO_HOME/bin\"\n  elif [ -n \"${HOME:-}\" ]; then\n    dest=\"$HOME/.cargo/bin\"\n  else\n    die \"cannot determine CARGO_HOME\"\n  fi\n\n  if [ -n \"${1:-}\" ]; then\n    version=\"$1\"\n    shift\n  else\n    version=\"$(latest_cargo_make_version)\"\n  fi\n\n  if [ -n \"$print_latest\" ]; then\n    echo \"$version\"\n  else\n    install_cargo_make \"$version\" \"$dest\"\n  fi\n}\n\nlatest_cargo_make_version() {\n  local crate=\"cargo-make\"\n\n  cargo search --limit 1 --quiet \"$crate\" | head -n 1 | awk -F'\"' '{print $2}'\n}\n\ninstall_cargo_make() {\n  local version dest platform target file_base url archive\n  version=\"$1\"\n  dest=\"$2\"\n\n  echo \"--- Installing cargo-make $version to $dest\"\n\n  platform=\"$(uname -s)\"\n  case \"$platform\" in\n    Darwin) target=\"x86_64-apple-darwin\" ;;\n    Linux) target=\"x86_64-unknown-linux-musl\" ;;\n    *) die \"Platform '$platform' is not supported\" ;;\n  esac\n  archive=\"$(mktemp 2>/dev/null || mktemp -t tmp)\"\n  file_base=\"cargo-make-v${version}-${target}\"\n  url=\"https://github.com/sagiegurari/cargo-make/releases/download/$version\"\n  url=\"$url/$file_base.zip\"\n\n  mkdir -p \"$dest\"\n  echo \"  - Downloading $url to $archive\"\n  curl -sSfL \"$url\" -o \"$archive\"\n  echo \"  - Extracting cargo-make into $dest\"\n  unzip -jo \"$archive\" \"$file_base/cargo-make\" -d \"$dest\"\n  rm -f \"$archive\"\n}\n\ndie() {\n  echo \"\" >&2\n  echo \"xxx $1\" >&2\n  echo \"\" >&2\n  exit 1\n}\n\nmain \"$@\"\n"
  },
  {
    "path": ".ci/names.manifest.txt",
    "content": "darwin-x86_64\tnames-x86_64-apple-darwin.zip\nfreebsd-x86_64\tnames-x86_64-unknown-freebsd.tar.gz\nlinux-aarch64\tnames-aarch64-unknown-linux-gnu.tar.gz\nlinux-arm\tnames-arm-unknown-linux-gnueabihf.tar.gz\nlinux-i686\tnames-i686-unknown-linux-musl.tar.gz\nlinux-x86_64\tnames-x86_64-unknown-linux-musl.tar.gz\nlinuxgnu-i686\tnames-i686-unknown-linux-gnu.tar.gz\nlinuxgnu-x86_64\tnames-x86_64-unknown-linux-gnu.tar.gz\nwindows-x86_64\tnames-x86_64-pc-windows-msvc.zip\n"
  },
  {
    "path": ".cirrus.yml",
    "content": "---\n# BEGIN: cirrus-anchors.yml\nanchors:\n  - &install_cargo_make_unix\n    install_cargo_make_script: ./.ci/install-cargo-make.sh\n\n  - &install_cargo_make_windows\n    install_cargo_make_script: .\\.ci\\install-cargo-make.ps1\n\n  - &build_cargo_make_unix\n    build_cargo_make_cache:\n      folder: $CARGO_HOME/opt/cargo-make\n      fingerprint_script: |\n        echo \"$CIRRUS_OS\"\n        echo \"${CI_CACHE_BUST:-}\"\n        echo \"$RUST_VERSION\"\n        ./.ci/install-cargo-make.sh --print-latest\n      populate_script: ./.ci/build-cargo-make.sh\n    link_cargo_make_script: ln -snf \"$CARGO_HOME\"/opt/*/bin/* \"$CARGO_HOME\"/bin/\n\n  - &build_cargo_make_windows\n    build_cargo_make_cache:\n      folder: $CARGO_HOME\\opt\\cargo-make\n      fingerprint_script: |\n        $env:CIRRUS_OS\n        $env:CI_CACHE_BUST\n        $env:RUST_VERSION\n        .\\.ci\\install-cargo-make.ps1 -PrintLatest\n      populate_script: .\\.ci\\build-cargo-make.ps1\n    link_cargo_make_script: |\n      Get-ChildItem \"$env:CARGO_HOME\\opt\\*\\bin\\*.exe\" | ForEach-Object {\n        $dst = \"$env:CARGO_HOME\\bin\\$($_.Name)\"\n\n        if (-Not (Test-Path \"$dst\")) {\n          New-Item -Path \"$dst\" -Type SymbolicLink -Value \"$_\" | Out-Null\n        }\n      }\n\n  - &base_unix\n    env:\n      CARGO_HOME: /usr/local/cargo\n      PATH: /usr/local/cargo/bin:$PATH\n    install_rustup_script: |\n      curl -sSfL https://sh.rustup.rs | sh -s -- \\\n        -y --default-toolchain none --profile minimal --no-modify-path\n    install_rust_script: rustup default \"$RUST_VERSION\"\n    registry_cache:\n      folder: $CARGO_HOME/registry\n      fingerprint_script: |\n        if [ ! -f Cargo.lock ]; then\n          cargo generate-lockfile --quiet\n        fi\n        echo \"${CI_CACHE_BUST:-}\"\n        echo \"${CIRRUS_OS}\"\n        cat Cargo.lock\n    target_cache:\n      folder: target\n      fingerprint_script: |\n        if [ ! -f Cargo.lock ]; then\n          cargo generate-lockfile --quiet\n        fi\n        echo \"${CI_CACHE_BUST:-}\"\n        echo \"$CIRRUS_TASK_NAME\"\n        rustc --verbose --version\n        cat Cargo.lock\n\n  - &base_linux\n    install_dependencies_script: |\n      if command -v yum >/dev/null; then\n        yum install -y unzip\n      else\n        apt-get install -y unzip\n      fi\n    <<: *base_unix\n    <<: *install_cargo_make_unix\n\n  - &base_macos\n    <<: *base_unix\n    env:\n      CARGO_HOME: $HOME/.cargo\n      PATH: $HOME/.cargo/bin:$PATH\n    <<: *install_cargo_make_unix\n\n  - &base_freebsd\n    <<: *base_unix\n    <<: *build_cargo_make_unix\n\n  - &base_windows\n    env:\n      CIRRUS_SHELL: powershell\n      CARGO_HOME: $USERPROFILE\\.cargo\n      PATH: $USERPROFILE\\.cargo\\bin;$PATH\n\n    install_rustup_script: |\n      & ([scriptblock]::Create((New-Object System.Net.WebClient).\n        DownloadString('https://gist.github.com/fnichol/699d3c2930649a9932f71bab8a315b31/raw/rustup-init.ps1')\n        )) -y --default-toolchain none --profile minimal\n    install_rust_script: rustup default \"$env:RUST_VERSION\"\n    registry_cache:\n      folder: $CARGO_HOME\\registry\n      fingerprint_script: |\n        if (-Not (Test-Path \"Cargo.lock\")) {\n          cargo \"+$env:RUST_VERSION\" generate-lockfile --quiet\n        }\n        $env:CI_CACHE_BUST\n        $env:CIRRUS_OS\n        Get-Content Cargo.lock\n    target_cache:\n      folder: target\n      fingerprint_script: |\n        if (-Not (Test-Path \"Cargo.lock\")) {\n          cargo \"+$env:RUST_VERSION\" generate-lockfile --quiet\n        }\n        $env:CI_CACHE_BUST\n        $env:CIRRUS_TASK_NAME\n        rustc --verbose --version\n        Get-Content Cargo.lock\n    <<: *install_cargo_make_windows\n\n  - &install_target_unix\n    install_rustup_target_script: rustup target install \"$TARGET\"\n\n  - &install_target_windows\n    install_rustup_target_script: rustup target install \"$env:TARGET\"\n\n  - &build_bin_unix\n    build_script: |\n      if [ \"${CIRRUS_TAG:-}\" = \"nightly\" ]; then\n        export NIGHTLY_BUILD=\"$(date -u +%F)\"\n      fi\n      cargo make build-release \"--bin=$BIN\" \"--target=$TARGET\"\n    strip_script: $STRIP \"target/$TARGET/release/$BIN\"\n    rename_script: cp \"target/$TARGET/release/$BIN\" \"${BIN}-${TARGET}\"\n\n  - &build_lib_unix\n    build_script: |\n      args=\"\"\n      if [ -n \"${FEATURES:-}\" ]; then\n        args=\"--features $FEATURES\"\n      fi\n      if [ -n \"${NO_DEFAULT_FEATURES:-}\" ]; then\n        args=\"$args --no-default-features\"\n      fi\n      if [ -n \"${ALL_FEATURES:-}\" ]; then\n        args=\"$args --all-features\"\n      fi\n      cargo make build-release \"--lib=$LIB\" \"--target=$TARGET\" $args\n\n  - &build_bin_windows\n    build_script: |\n      if (\"$env:CIRRUS_TAG\" -eq \"nightly\") {\n        $env:NIGHTLY_BUILD = $(Get-Date ([datetime]::UtcNow) -UFormat %Y-%m-%d)\n      }\n      cargo make build-release \"--bin=$env:BIN\" \"--target=$env:TARGET\"\n    rename_script: |\n      Copy-Item \"target\\$env:TARGET\\release\\$env:BIN.exe\" \"$env:BIN-$env:TARGET.exe\"\n\n  - &build_lib_windows\n    build_script: |\n      $args = \"\"\n      if (\"$env:FEATURES\") {\n        $args = \"--features $env:FEATURES\"\n      }\n      if (\"$env:NO_DEFAULT_FEATURES\") {\n        $args = \"$args --no-default-features\"\n      }\n      if (\"$env:ALL_FEATURES\") {\n        $args = \"$args --all-features\"\n      }\n      cargo make build-release \"--bin=$env:BIN\" \"--target=$env:TARGET\" $args\n\n  - &cleanup_before_upload_cache_unix\n    cleanup_before_upload_cache_script: rm -rf \"$CARGO_HOME/registry/index\"\n\n  - &cleanup_before_upload_cache_windows\n    cleanup_before_upload_cache_script: |\n      if (Test-Path \"$env:USERPROFILE\\.cargo\\registry\\index\") {\n        Remove-Item -Recurse -Force \"$env:USERPROFILE\\.cargo\\registry\\index\"\n      }\n# END: cirrus-anchors.yml\n#\n#\nenv:\n  RUST_VERSION: stable\n  MIN_SUPPORTED_RUST_VERSION: 1.54.0 # Due to clap v3\n\ncheck_task:\n  name: check\n  only_if:\n    $CIRRUS_BRANCH !=~ \".*\\.tmp\" && $CIRRUS_BRANCH != $CIRRUS_DEFAULT_BRANCH\n  container:\n    image: rust:latest\n  <<: *base_linux\n  lint_script: cargo make check-lint\n  format_script: cargo make check-format\n\ntest_task:\n  name: test-${RUST_VERSION}-${TARGET}\n  alias: tests\n  only_if:\n    $CIRRUS_BRANCH !=~ \".*\\.tmp\" && $CIRRUS_BRANCH != $CIRRUS_DEFAULT_BRANCH\n  env:\n    matrix:\n      - RUST_VERSION: stable\n      - RUST_VERSION: nightly\n      - RUST_VERSION: $MIN_SUPPORTED_RUST_VERSION\n  allow_failures: $RUST_VERSION == 'nightly'\n  matrix:\n    - matrix:\n        - env:\n            TARGET: x86_64-unknown-linux-gnu\n          container:\n            image: rust:latest\n          <<: *base_linux\n        - env:\n            TARGET: x86_64-apple-darwin\n          osx_instance:\n            image: catalina-base\n          <<: *base_macos\n        - env:\n            TARGET: x86_64-unknown-freebsd\n          freebsd_instance:\n            image_family: freebsd-12-2\n          <<: *base_freebsd\n      <<: *install_target_unix\n      test_bin_script: cargo make test-bin \"--target=$TARGET\"\n      test_lib_script: cargo make test-lib \"--target=$TARGET\"\n      <<: *cleanup_before_upload_cache_unix\n    - env:\n        TARGET: x86_64-pc-windows-msvc\n      windows_container:\n        image: fnichol/windowsservercore:ltsc2019-vs2019-vctools\n      <<: *base_windows\n      <<: *install_target_windows\n      test_bin_script: cargo make test-bin \"--target=$env:TARGET\"\n      test_lib_script: cargo make test-lib \"--target=$env:TARGET\"\n      <<: *cleanup_before_upload_cache_windows\n\nbuild_bin_task:\n  name: build-bin-${BIN}-${TARGET}.${EXT}\n  alias: build-bins\n  only_if:\n    $CIRRUS_TAG != '' || $CIRRUS_BRANCH == 'staging' || $CIRRUS_BRANCH ==\n    'trying'\n  env:\n    BIN: names\n    RUST_BACKTRACE: \"1\"\n  matrix:\n    - matrix:\n        - env:\n            matrix:\n              - TARGET: arm-unknown-linux-gnueabihf\n                STRIP: arm-linux-gnueabihf-strip\n              - TARGET: aarch64-unknown-linux-gnu\n                STRIP: aarch64-linux-gnu-strip\n              - TARGET: i686-unknown-linux-gnu\n                STRIP: x86_64-linux-gnu-strip\n              - TARGET: i686-unknown-linux-musl\n                STRIP: i686-linux-musl-strip\n              - TARGET: x86_64-unknown-linux-gnu\n                STRIP: strip\n              - TARGET: x86_64-unknown-linux-musl\n                STRIP: x86_64-linux-musl-strip\n            EXT: tar.gz\n          container:\n            image: rustembedded/cross:$TARGET\n          depends_on:\n            - check\n            - test-stable-x86_64-unknown-linux-gnu\n          <<: *base_linux\n          <<: *install_target_unix\n          <<: *build_bin_unix\n          archive_script: tar czf \"$BIN-$TARGET.$EXT\" \"$BIN-$TARGET\"\n        - env:\n            TARGET: x86_64-apple-darwin\n            STRIP: strip\n            EXT: zip\n          osx_instance:\n            image: catalina-base\n          depends_on:\n            - check\n            - test-stable-x86_64-apple-darwin\n          <<: *base_macos\n          <<: *install_target_unix\n          <<: *build_bin_unix\n          archive_script: zip \"$BIN-$TARGET\" \"$BIN-$TARGET\"\n        - env:\n            TARGET: x86_64-unknown-freebsd\n            STRIP: strip\n            EXT: tar.gz\n          freebsd_instance:\n            image_family: freebsd-12-2\n          depends_on:\n            - check\n            - test-stable-x86_64-unknown-freebsd\n          <<: *base_freebsd\n          <<: *install_target_unix\n          <<: *build_bin_unix\n          archive_script: tar czf \"$BIN-$TARGET.$EXT\" \"$BIN-$TARGET\"\n      checksums_script: ./.ci/build-checksums.sh \"$BIN-$TARGET.$EXT\"\n      binaries_artifacts:\n        path: \"$BIN-$TARGET.$EXT*\"\n      <<: *cleanup_before_upload_cache_unix\n    - env:\n        TARGET: x86_64-pc-windows-msvc\n        EXT: zip\n      windows_container:\n        image: fnichol/windowsservercore:ltsc2019-vs2019-vctools\n      depends_on:\n        - check\n        - test-stable-x86_64-pc-windows-msvc\n      <<: *base_windows\n      <<: *install_target_windows\n      <<: *build_bin_windows\n      archive_script: |\n        Compress-Archive \"$env:BIN-$env:TARGET.exe\" \"$env:BIN-$env:TARGET.$env:EXT\"\n      checksums_script:\n        .\\.ci\\build-checksums.ps1 \"$env:BIN-$env:TARGET.$env:EXT\"\n      binaries_artifacts:\n        path: \"$BIN-$TARGET.$EXT*\"\n      <<: *cleanup_before_upload_cache_windows\n\nci_finished_task:\n  name: ci-finished\n  depends_on:\n    - check\n    - tests\n    - build-bins\n  container:\n    image: alpine:3\n  clone_script: mkdir -p \"$CIRRUS_WORKING_DIR\"\n  success_script: /bin/true\n\ncreate_github_release_task:\n  name: create-github-release\n  only_if: $CIRRUS_TAG != ''\n  depends_on:\n    - build-bins\n  container:\n    image: alpine:3\n  env:\n    BIN: names\n    GITHUB_TOKEN: ENCRYPTED[9be96903fa85656e590b3336e1a7d1f9c05ad5b1f1881acd47038451fc554f28568fc9a539617180cbd01d08d16f8d73]\n  install_dependencies_script: apk add curl git jo jq\n  create_github_release_script: |\n    if ! upload_url=\"$(\n      ./.ci/cirrus-release.sh gh_create_version_release \\\n        \"$CIRRUS_REPO_FULL_NAME\" \\\n        \"$CIRRUS_TAG\"\n    )\"; then\n      echo \"xxx Failed to create release\" >&2\n      exit 1\n    fi\n    echo \"$upload_url\" > /tmp/upload_url\n  download_cirrus_artifacts_script: |\n    cr=\"$(readlink -f ./.ci/cirrus-release.sh)\"\n    manifest=\"$(readlink -f \".ci/$BIN.manifest.txt\")\"\n    mkdir -p /tmp/release\n    cd /tmp/release\n    awk '{ print $2 }' \"$manifest\" | while read -r a; do\n      \"$cr\" ci_download \"build-bin-$a/binaries/$a\"\n      \"$cr\" ci_download \"build-bin-$a/binaries/$a.md5\"\n      \"$cr\" ci_download \"build-bin-$a/binaries/$a.sha256\"\n    done\n    cp \"$manifest\" .\n    ls -l \"$BIN\"*\n  upload_github_release_artifacts_script: |\n    url=\"$(cat /tmp/upload_url)\"\n    ./.ci/cirrus-release.sh gh_upload_all \"$url\" /tmp/release\n\nbuild_docker_image_docker_builder:\n  name: build-docker-image-${BIN}\n  alias: build-docker-images\n  only_if: $CIRRUS_TAG != ''\n  depends_on:\n    - build-bins\n    - create-github-release\n  env:\n    AUTHOR: Fletcher Nichol <fnichol@nichol.ca>\n    LICENSE: MIT\n    BIN: names\n    REPO: fnichol/$BIN\n    IMG: $REPO\n    TARGET: x86_64-unknown-linux-musl\n    EXT: tar.gz\n    ARCHIVE: $BIN-$TARGET.$EXT\n    DOCKER_USERNAME: ENCRYPTED[8a1752e5e975bfdb57a81e88dac08c6a31f909acd6a82e213b4d362a57f8b090767641662bab840d76ef26de38588451]\n    DOCKER_PASSWORD: ENCRYPTED[12bfff137d45a5dfb76671cbd072338ef04c54cf0f6b7076eccb8eaee28812e412c1eaacb612312a535b7b255ab18a93]\n  download_cirrus_artifacts_script: |\n    cr=\"$(readlink -f ./.ci/cirrus-release.sh)\"\n    mkdir -p /tmp/artifacts\n    cd /tmp/artifacts\n    \"$cr\" ci_download \"build-bin-$ARCHIVE/binaries/$ARCHIVE\"\n    \"$cr\" ci_download \"build-bin-$ARCHIVE/binaries/$ARCHIVE.sha256\"\n  build_script: |\n    ./.ci/build-docker-image.sh \\\n      \"$IMG\" \"${CIRRUS_TAG#v}\" \"$REPO\" \"$AUTHOR\" \"$LICENSE\" \"$BIN\" \\\n      \"/tmp/artifacts/$ARCHIVE\"\n  login_script: |\n    echo \"$DOCKER_PASSWORD\" \\\n      | docker login --username \"$DOCKER_USERNAME\" --password-stdin\n  push_script: |\n    docker push \"$IMG:${CIRRUS_TAG#v}\"\n    if echo \"${CIRRUS_TAG#v}\" | grep -q -E '^\\d+\\.\\d+.\\d+$'; then\n      docker push \"$IMG:latest\"\n    fi\n\npublish_crate_task:\n  name: publish-crate-${CRATE}\n  alias: publish-crates\n  only_if: $CIRRUS_TAG =~ 'v.*'\n  depends_on:\n    - create-github-release\n    - build-docker-images\n  env:\n    CRATE: names\n    CRATES_IO_TOKEN: ENCRYPTED[c3770979566d3fd0c7ba135250e2404db106867855055972b40c3ea37762a0ddc2115c03b1e97ad0de7ed9f99c2f0097]\n  container:\n    image: rust:latest\n  <<: *base_linux\n  login_script: echo \"$CRATES_IO_TOKEN\" | cargo login\n  publish_script: cargo publish\n\npublish_github_release_task:\n  name: publish-github-release\n  only_if: $CIRRUS_TAG != ''\n  depends_on:\n    - create-github-release\n    - build-docker-images\n    - publish-crates\n  container:\n    image: alpine:3\n  env:\n    GITHUB_TOKEN: ENCRYPTED[9be96903fa85656e590b3336e1a7d1f9c05ad5b1f1881acd47038451fc554f28568fc9a539617180cbd01d08d16f8d73]\n  install_dependencies_script: apk add curl jo jq\n  publish_release_script: |\n    ./.ci/cirrus-release.sh gh_publish_release \\\n      \"$CIRRUS_REPO_FULL_NAME\" \"$CIRRUS_TAG\" CHANGELOG.md\n\nrelease_finished_task:\n  name: release-finished\n  only_if: $CIRRUS_TAG != ''\n  depends_on:\n    - create-github-release\n    - build-docker-images\n    - publish-crates\n    - publish-github-release\n  container:\n    image: alpine:3\n  clone_script: mkdir -p \"$CIRRUS_WORKING_DIR\"\n  success_script: /bin/true\n\ntrigger_nightly_release_task:\n  name: trigger-nightly-release\n  only_if: $CIRRUS_CRON == 'nightly'\n  container:\n    image: alpine:3\n  env:\n    GITHUB_TOKEN: ENCRYPTED[9be96903fa85656e590b3336e1a7d1f9c05ad5b1f1881acd47038451fc554f28568fc9a539617180cbd01d08d16f8d73]\n  install_dependencies_script: apk add curl git jo jq\n  trigger_release_script:\n    ./.ci/cirrus-release.sh gh_update_tag \"$CIRRUS_REPO_FULL_NAME\" nightly\n"
  },
  {
    "path": ".gitattributes",
    "content": ".ci/** linguist-vendored\n.github/** linguist-vendored\n"
  },
  {
    "path": ".github/bors.toml",
    "content": "status = [\"ci-finished\"]\ncommit_title = \"merge: ${PR_REFS}\"\n"
  },
  {
    "path": ".gitignore",
    "content": "target/\n"
  },
  {
    "path": ".prettierrc.yml",
    "content": "proseWrap: always\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Changelog\n\n<!-- next-header -->\n\n## [Unreleased] - ReleaseDate\n\n## [0.14.0] - 2022-06-28\n\n### Changed\n\n- upgrade to `regex` 1.5.6\n\n## [0.13.0] - 2022-03-05\n\n### Changed\n\n- upgrade to `clap` version 3\n- update other dependencies via `cargo update`\n\n## [0.12.0] - 2021-09-12\n\n> **Breaking Change Upgrade Note For Library Users**\n>\n> Due to the collapsing of a library crate and a binary/CLI crate into one\n> crate, there is now a Cargo feature called `\"application\"` which is included\n> in the default features. This allows for a clean `cargo install names`,\n> resulting in a compilation and installation of the names CLI without any\n> further options or flags. When using names as a library crate however, it is\n> advised to now add `default-features = false` to the crate dependency in\n> `Cargo.toml`. For example:\n>\n> ```toml\n> [dependencies]\n> names = { version = \"0.12.0\", default-features = false }\n> ```\n>\n> This will exclude the `clap` crate when being used in library/crate mode.\n\n### Changed\n\n- **(breaking):** collapse library and binary into 1 dual-purpose crate which\n  enables `cargo install names` to install the binary CLI\n- **(breaking):** upgrade minimum supported Rust version to 1.46.0\n- upgrade to `rand` 0.8.4\n- upgrade to `clap` 3.0.0-beta.2\n- update codebase to Rust 2018 edition and idioms\n\n### Added\n\n- cross platform matrix testing\n- binary artifacts on each release for Linux, macOS, Windows, & FreeBSD systems\n- nightly releases\n\n## [0.11.0] - 2016-04-29\n\n### Changed\n\n- **(breaking):** move adjectives const to `names::ADJECTIVES`\n- **(breaking):** move nouns const to `names::NOUNS`\n- inline adjective and noun data from plaintext files\n\n### Added\n\n- (cli): add color and suggestions features\n\n## [0.10.0] - 2015-11-01\n\n### Changed\n\n- **(breaking):** use `Default` trait for Generator & Name types\n- (cli): update usage output\n\n## [0.9.0] - 2015-09-15\n\nThe initial release.\n\n<!-- next-url -->\n\n[unreleased]: https://github.com/fnichol/names/compare/v0.14.0...HEAD\n\n[0.14.0]: https://github.com/fnichol/names/compare/v0.13.0...v0.14.0\n\n[0.13.0]: https://github.com/fnichol/names/compare/v0.12.0...v0.13.0\n\n[0.12.0]: https://github.com/fnichol/names/compare/v0.11.0...v0.12.0\n\n[0.11.0]: https://github.com/fnichol/names/compare/v0.10.0...v0.11.0\n[0.10.0]: https://github.com/fnichol/names/compare/v0.9.0...v0.10.0\n[0.9.0]: https://github.com/fnichol/names/compare/f852f53...v0.9.0\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to make participation in our project and\nour community a harassment-free experience for everyone, regardless of age, body\nsize, disability, ethnicity, sex characteristics, gender identity and expression,\nlevel of experience, education, socio-economic status, nationality, personal\nappearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment\ninclude:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or\n  advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic\n  address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n  professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies within all project spaces, and it also applies when\nan individual is representing the project or its community in public spaces.\nExamples of representing a project or community include using an official\nproject e-mail address, posting via an official social media account, or acting\nas an appointed representative at an online or offline event. Representation of\na project may be further defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported by contacting the project team at fnichol@nichol.ca. All\ncomplaints will be reviewed and investigated and will result in a response that\nis deemed necessary and appropriate to the circumstances. The project team is\nobligated to maintain confidentiality with regard to the reporter of an incident.\nFurther details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good\nfaith may face temporary or permanent repercussions as determined by other\nmembers of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,\navailable at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html\n\n[homepage]: https://www.contributor-covenant.org\n\nFor answers to common questions about this code of conduct, see\nhttps://www.contributor-covenant.org/faq\n\n"
  },
  {
    "path": "Cargo.toml",
    "content": "[package]\nname = \"names\"\nversion = \"0.14.1-dev\"\nauthors = [\"Fletcher Nichol <fnichol@nichol.ca>\"]\nedition = \"2018\"\nlicense = \"MIT\"\nreadme = \"README.md\"\nrepository = \"https://github.com/fnichol/names\"\ndocumentation = \"https://docs.rs/names\"\nhomepage = \"https://github.com/fnichol/names\"\nkeywords = [\"name\", \"random\"]\ncategories = [\"command-line-utilities\"]\ndescription = \"\"\"\nA random name generator with names suitable for use in container\ninstances, project names, application instances, etc.\n\"\"\"\n\n[features]\ndefault = [\"application\"]\n\n# Required for building the `names` CLI. Should be disabled when depending on\n# names as a library. For example, to use as a library in a Cargo.toml:\n# `names = { version = \"...\", default-features = false }`\napplication = [\"clap\"]\n\n[dependencies]\nclap = { version = \"3.1.5\", optional = true, features = [\"derive\"] }\nrand = \"0.8.4\"\n\n[dev-dependencies]\nversion-sync = \"0.9.1\"\n\n[package.metadata.docs.rs]\nno-default-features = true\n"
  },
  {
    "path": "LICENSE.txt",
    "content": "Copyright (c) 2015 Fletcher Nichol\n\nPermission is hereby granted, free of charge, to any\nperson obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the\nSoftware without restriction, including without\nlimitation the rights to use, copy, modify, merge,\npublish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software\nis furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice\nshall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF\nANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\nSHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR\nIN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "Makefile.toml",
    "content": "extend = \"./vendor/cargo-make/Makefile.common.toml\"\n\n[tasks.install-sh-upgrade-libsh]\ndescription = \"Upgrades the inserted version of libsh in install.sh\"\nscript = '''\n\tcurl --proto '=https' --tlsv1.2 -sSf \\\n\t\thttps://fnichol.github.io/libsh/install.sh \\\n\t\t| sh -s -- --mode=insert --target=install.sh --distribution=full-minified\n'''\n"
  },
  {
    "path": "README.md",
    "content": "<h1 align=\"center\">\n  <br/>\n  names\n  <br/>\n</h1>\n\n<h4 align=\"center\">\n  Random name generator for Rust\n</h4>\n\n|                  |                                                                                          |\n| ---------------: | ---------------------------------------------------------------------------------------- |\n|               CI | [![CI Status][badge-ci-overall]][ci]<br /> [![Bors enabled][badge-bors]][bors-dashboard] |\n|   Latest Version | [![Latest version][badge-version]][crate]                                                |\n|    Documentation | [![Documentation][badge-docs]][docs]                                                     |\n|  Crate Downloads | [![Crate downloads][badge-crate-dl]][crate]                                              |\n| GitHub Downloads | [![Github downloads][badge-github-dl]][github-releases]                                  |\n|     Docker Pulls | [![Docker pulls][badge-docker-pulls]][docker]                                            |\n|          License | [![Crate license][badge-license]][github]                                                |\n\n<details>\n<summary><strong>Table of Contents</strong></summary>\n\n<!-- toc -->\n\n- [CLI](#cli)\n  - [Usage](#usage)\n  - [Installation](#installation)\n    - [install.sh (Pre-Built Binaries)](#installsh-pre-built-binaries)\n    - [GitHub Releasees (Pre-Built Binaries)](#github-releasees-pre-built-binaries)\n    - [Docker Image](#docker-image)\n    - [Cargo Install](#cargo-install)\n    - [From Source](#from-source)\n- [Library](#library)\n  - [Usage](#usage-1)\n  - [Examples](#examples)\n    - [Example: painless defaults](#example-painless-defaults)\n    - [Example: with custom dictionaries](#example-with-custom-dictionaries)\n- [CI Status](#ci-status)\n  - [Build (main branch)](#build-main-branch)\n  - [Test (main branch)](#test-main-branch)\n  - [Check (main branch)](#check-main-branch)\n- [Code of Conduct](#code-of-conduct)\n- [Issues](#issues)\n- [Contributing](#contributing)\n- [Release History](#release-history)\n- [Authors](#authors)\n- [License](#license)\n\n<!-- tocstop -->\n\n</details>\n\n## CLI\n\n### Usage\n\nSimple! Run without any parameters, you get a name:\n\n```console\n> names\nselfish-change\n```\n\nNeed more? Tell it how many:\n\n```console\n> names 10\nrustic-flag\nnondescript-crayon\npicayune-map\nelderly-cough\nskinny-jeans\nneat-rock\naware-sponge\npsychotic-coast\nbrawny-event\ntender-oatmeal\n```\n\nNot random enough? How about adding a 4-number pad:\n\n```console\n> names --number 5\nimported-rod-9680\nthin-position-2344\nhysterical-women-5647\nvolatile-pen-9210\ndiligent-grip-4520\n```\n\nIf you're ever confused, at least there's help:\n\n```console\n> names --help\nnames 0.11.0\nFletcher Nichol <fnichol@nichol.ca>\n\nA random name generator with results like \"delirious-pail\"\n\nUSAGE:\n    names [FLAGS] [AMOUNT]\n\nARGS:\n    <AMOUNT>    Number of names to generate [default: 1]\n\nFLAGS:\n    -h, --help       Prints help information\n    -n, --number     Adds a random number to the name(s)\n    -V, --version    Prints version information\n```\n\n### Installation\n\n#### install.sh (Pre-Built Binaries)\n\nAn installer is provided at <https://fnichol.github.io/names/install.sh> which\ninstalls a suitable pre-built binary for common systems such as Linux, macOS,\nWindows, and FreeBSD. It can be downloaded and run locally or piped into a shell\ninterpreter in the \"curl-bash\" style as shown below. Note that if you're opposed\nto this idea, feel free to check some of the alternatives below.\n\nTo install the latest release for your system into `$HOME/bin`:\n\n```sh\ncurl -sSf https://fnichol.github.io/names/install.sh | sh\n```\n\nWhen the installer is run as `root` the installation directory defaults to\n`/usr/local/bin`:\n\n```sh\ncurl -sSf https://fnichol.github.io/names/install.sh | sudo sh\n```\n\nA [nightly] release built from `HEAD` of the main branch is available which can\nalso be installed:\n\n```sh\ncurl -sSf https://fnichol.github.io/names/install.sh \\\n    | sh -s -- --release=nightly\n```\n\nFor a full set of options, check out the help usage with:\n\n```sh\ncurl -sSf https://fnichol.github.io/names/install.sh | sh -s -- --help\n```\n\n#### GitHub Releasees (Pre-Built Binaries)\n\nEach release comes with binary artifacts published in [GitHub\nReleases][github-releases]. The `install.sh` program downloads its artifacts\nfrom this location so this serves as a manual alternative. Each artifact ships\nwith MD5 and SHA256 checksums to help verify the artifact on a target system.\n\n#### Docker Image\n\nA minimal image ships with each release (including a [nightly] built version\nfrom `HEAD` of the main branch) published to [Docker Hub][docker]. The\nentrypoint invokes the binary directly, so any arguments to `docker run` will be\npassed to the program. For example, to display the full help usage:\n\n```sh\ndocker run fnichol/names --help\n```\n\n#### Cargo Install\n\nIf [Rust](https://rustup.rs/) is installed on your system, then installing with\nCargo is straight forward with:\n\n```sh\ncargo install names\n```\n\n#### From Source\n\nTo install from source, you can clone the Git repository, build with Cargo and\ncopy the binary into a destination directory. This will build the project from\nthe latest commit on the main branch, which may not correspond to the latest\nstable release:\n\n```console\n> git clone https://github.com/fnichol/names.git\n> cd names\n> cargo build --release\n> cp ./target/release/names /dest/path/\n```\n\n---\n\n## Library\n\nThis crate provides a generate that constructs random name strings suitable for\nuse in container instances, project names, application instances, etc.\n\nThe name `Generator` implements the `Iterator` trait so it can be used with\nadapters, consumers, and in loops.\n\n### Usage\n\nThis crate is [on crates.io](https://crates.io/crates/names) and can be used by\nadding `names` to your dependencies in your project's `Cargo.toml` file:\n\n```toml\n[dependencies]\nnames = { version = \"0.14.0\", default-features = false }\n```\n\n### Examples\n\n#### Example: painless defaults\n\nThe easiest way to get started is to use the default `Generator` to return a\nname:\n\n```rust\nuse names::Generator;\n\nlet mut generator = Generator::default();\nprintln!(\"Your project is: {}\", generator.next().unwrap());\n// #=> \"Your project is: rusty-nail\"\n```\n\nIf more randomness is required, you can generate a name with a trailing 4-digit\nnumber:\n\n```rust\nuse names::{Generator, Name};\n\nlet mut generator = Generator::with_naming(Name::Numbered);\nprintln!(\"Your project is: {}\", generator.next().unwrap());\n// #=> \"Your project is: pushy-pencil-5602\"\n```\n\n#### Example: with custom dictionaries\n\nIf you would rather supply your own custom adjective and noun word lists, you\ncan provide your own by supplying 2 string slices. For example, this returns\nonly one result:\n\n```rust\nuse names::{Generator, Name};\n\nlet adjectives = &[\"imaginary\"];\nlet nouns = &[\"roll\"];\nlet mut generator = Generator::new(adjectives, nouns, Name::default());\n\nassert_eq!(\"imaginary-roll\", generator.next().unwrap());\n```\n\n## CI Status\n\n### Build (main branch)\n\n| Operating System | Target                        | Stable Rust                                                                     |\n| ---------------: | ----------------------------- | ------------------------------------------------------------------------------- |\n|          FreeBSD | `x86_64-unknown-freebsd`      | [![FreeBSD Build Status][badge-ci-build-x86_64-unknown-freebsd]][ci-staging]    |\n|            Linux | `arm-unknown-linux-gnueabihf` | [![Linux Build Status][badge-ci-build-arm-unknown-linux-gnueabihf]][ci-staging] |\n|            Linux | `aarch64-unknown-linux-gnu`   | [![Linux Build Status][badge-ci-build-aarch64-unknown-linux-gnu]][ci-staging]   |\n|            Linux | `i686-unknown-linux-gnu`      | [![Linux Build Status][badge-ci-build-i686-unknown-linux-gnu]][ci-staging]      |\n|            Linux | `i686-unknown-linux-musl`     | [![Linux Build Status][badge-ci-build-i686-unknown-linux-musl]][ci-staging]     |\n|            Linux | `x86_64-unknown-linux-gnu`    | [![Linux Build Status][badge-ci-build-x86_64-unknown-linux-gnu]][ci-staging]    |\n|            Linux | `x86_64-unknown-linux-musl`   | [![Linux Build Status][badge-ci-build-x86_64-unknown-linux-musl]][ci-staging]   |\n|            macOS | `x86_64-apple-darwin`         | [![macOS Build Status][badge-ci-build-x86_64-apple-darwin]][ci-staging]         |\n|          Windows | `x86_64-pc-windows-msvc`      | [![Windows Build Status][badge-ci-build-x86_64-pc-windows-msvc]][ci-staging]    |\n\n### Test (main branch)\n\n| Operating System | Stable Rust                                                               | Nightly Rust                                                                |\n| ---------------: | ------------------------------------------------------------------------- | --------------------------------------------------------------------------- |\n|          FreeBSD | [![FreeBSD Stable Test Status][badge-ci-test-stable-freebsd]][ci-staging] | [![FreeBSD Nightly Test Status][badge-ci-test-nightly-freebsd]][ci-staging] |\n|            Linux | [![Linux Stable Test Status][badge-ci-test-stable-linux]][ci-staging]     | [![Linux Nightly Test Status][badge-ci-test-nightly-linux]][ci-staging]     |\n|            macOS | [![macOS Stable Test Status][badge-ci-test-stable-macos]][ci-staging]     | [![macOS Nightly Test Status][badge-ci-test-nightly-macos]][ci-staging]     |\n|          Windows | [![Windows Stable Test Status][badge-ci-test-stable-windows]][ci-staging] | [![Windows Nightly Test Status][badge-ci-test-nightly-windows]][ci-staging] |\n\n**Note**: The\n[Minimum Supported Rust Version (MSRV)](https://github.com/rust-lang/rfcs/pull/2495)\nis also tested and can be viewed in the [CI dashboard][ci-staging].\n\n### Check (main branch)\n\n|        | Status                                                |\n| ------ | ----------------------------------------------------- |\n| Lint   | [![Lint Status][badge-ci-check-lint]][ci-staging]     |\n| Format | [![Format Status][badge-ci-check-format]][ci-staging] |\n\n## Code of Conduct\n\nThis project adheres to the Contributor Covenant [code of\nconduct][code-of-conduct]. By participating, you are expected to uphold this\ncode. Please report unacceptable behavior to fnichol@nichol.ca.\n\n## Issues\n\nIf you have any problems with or questions about this project, please contact us\nthrough a [GitHub issue][issues].\n\n## Contributing\n\nYou are invited to contribute to new features, fixes, or updates, large or\nsmall; we are always thrilled to receive pull requests, and do our best to\nprocess them as fast as we can.\n\nBefore you start to code, we recommend discussing your plans through a [GitHub\nissue][issues], especially for more ambitious contributions. This gives other\ncontributors a chance to point you in the right direction, give you feedback on\nyour design, and help you find out if someone else is working on the same thing.\n\n## Release History\n\nSee the [changelog] for a full release history.\n\n## Authors\n\nCreated and maintained by [Fletcher Nichol][fnichol] (<fnichol@nichol.ca>).\n\n## License\n\nLicensed under the MIT license ([LICENSE.txt][license]).\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the MIT license, shall be\nlicensed as above, without any additional terms or conditions.\n\n[badge-bors]: https://bors.tech/images/badge_small.svg\n[badge-ci-build-x86_64-unknown-freebsd]:\n  https://img.shields.io/cirrus/github/fnichol/names/staging?style=flat-square&task=build-bin-names-x86_64-unknown-freebsd.tar.gz\n[badge-ci-build-arm-unknown-linux-gnueabihf]:\n  https://img.shields.io/cirrus/github/fnichol/names/staging?style=flat-square&task=build-bin-names-arm-unknown-linux-gnueabihf.tar.gz\n[badge-ci-build-aarch64-unknown-linux-gnu]:\n  https://img.shields.io/cirrus/github/fnichol/names/staging?style=flat-square&task=build-bin-names-aarch64-unknown-linux-gnu.tar.gz\n[badge-ci-build-i686-unknown-linux-gnu]:\n  https://img.shields.io/cirrus/github/fnichol/names/staging?style=flat-square&task=build-bin-names-i686-unknown-linux-gnu.tar.gz\n[badge-ci-build-i686-unknown-linux-musl]:\n  https://img.shields.io/cirrus/github/fnichol/names/staging?style=flat-square&task=build-bin-names-i686-unknown-linux-musl.tar.gz\n[badge-ci-build-x86_64-unknown-linux-gnu]:\n  https://img.shields.io/cirrus/github/fnichol/names/staging?style=flat-square&task=build-bin-names-x86_64-unknown-linux-gnu.tar.gz\n[badge-ci-build-x86_64-unknown-linux-musl]:\n  https://img.shields.io/cirrus/github/fnichol/names/staging?style=flat-square&task=build-bin-names-x86_64-unknown-linux-musl.tar.gz\n[badge-ci-build-x86_64-apple-darwin]:\n  https://img.shields.io/cirrus/github/fnichol/names/staging?style=flat-square&task=build-bin-names-x86_64-apple-darwin.zip\n[badge-ci-build-x86_64-pc-windows-msvc]:\n  https://img.shields.io/cirrus/github/fnichol/names/staging?style=flat-square&task=build-bin-names-x86_64-pc-windows-msvc.zip\n[badge-ci-check-format]:\n  https://img.shields.io/cirrus/github/fnichol/names/staging?style=flat-square&task=check&script=format\n[badge-ci-check-lint]:\n  https://img.shields.io/cirrus/github/fnichol/names/staging?style=flat-square&task=check&script=lint\n[badge-ci-overall]:\n  https://img.shields.io/cirrus/github/fnichol/names/main?style=flat-square\n[badge-ci-test-nightly-freebsd]:\n  https://img.shields.io/cirrus/github/fnichol/names/staging?style=flat-square&task=test-nightly-x86_64-unknown-freebsd\n[badge-ci-test-nightly-linux]:\n  https://img.shields.io/cirrus/github/fnichol/names/staging?style=flat-square&task=test-nightly-x86_64-unknown-linux-gnu\n[badge-ci-test-nightly-macos]:\n  https://img.shields.io/cirrus/github/fnichol/names/staging?style=flat-square&task=test-nightly-x86_64-apple-darwin\n[badge-ci-test-nightly-windows]:\n  https://img.shields.io/cirrus/github/fnichol/names/staging?style=flat-square&task=test-nightly-x86_64-pc-windows-msvc\n[badge-ci-test-stable-freebsd]:\n  https://img.shields.io/cirrus/github/fnichol/names/staging?style=flat-square&task=test-stable-x86_64-unknown-freebsd\n[badge-ci-test-stable-linux]:\n  https://img.shields.io/cirrus/github/fnichol/names/staging?style=flat-square&task=test-stable-x86_64-unknown-linux-gnu\n[badge-ci-test-stable-macos]:\n  https://img.shields.io/cirrus/github/fnichol/names/staging?style=flat-square&task=test-stable-x86_64-apple-darwin\n[badge-ci-test-stable-windows]:\n  https://img.shields.io/cirrus/github/fnichol/names/staging?style=flat-square&task=test-stable-x86_64-pc-windows-msvc\n[badge-crate-dl]: https://img.shields.io/crates/d/names.svg?style=flat-square\n[badge-docker-pulls]:\n  https://img.shields.io/docker/pulls/fnichol/names.svg?style=flat-square\n[badge-docs]: https://docs.rs/names/badge.svg?style=flat-square\n[badge-github-dl]:\n  https://img.shields.io/github/downloads/fnichol/names/total.svg\n[badge-license]: https://img.shields.io/crates/l/names.svg?style=flat-square\n[badge-version]: https://img.shields.io/crates/v/names.svg?style=flat-square\n[bors-dashboard]: https://app.bors.tech/repositories/37173\n[changelog]: https://github.com/fnichol/names/blob/main/CHANGELOG.md\n[ci]: https://cirrus-ci.com/github/fnichol/names\n[ci-staging]: https://cirrus-ci.com/github/fnichol/names/staging\n[code-of-conduct]: https://github.com/fnichol/names/blob/main/CODE_OF_CONDUCT.md\n[commonmark]: https://commonmark.org/\n[crate]: https://crates.io/crates/names\n[docker]: https://hub.docker.com/r/fnichol/names\n[docs]: https://docs.rs/names\n[fnichol]: https://github.com/fnichol\n[github]: https://github.com/fnichol/names\n[github-releases]: https://github.com/fnichol/names/releases\n[issues]: https://github.com/fnichol/names/issues\n[license]: https://github.com/fnichol/names/blob/main/LICENSE.txt\n[nightly]: https://github.com/fnichol/names/releases/tag/nightly\n"
  },
  {
    "path": "README.tpl",
    "content": "<h1 align=\"center\">\n  <br/>\n  {{crate}}\n  <br/>\n</h1>\n\n<h4 align=\"center\">\n  Random name generator for Rust\n</h4>\n\n|                  |                                                                                          |\n| ---------------: | ---------------------------------------------------------------------------------------- |\n|               CI | [![CI Status][badge-ci-overall]][ci]<br /> [![Bors enabled][badge-bors]][bors-dashboard] |\n|   Latest Version | [![Latest version][badge-version]][crate]                                                |\n|    Documentation | [![Documentation][badge-docs]][docs]                                                     |\n|  Crate Downloads | [![Crate downloads][badge-crate-dl]][crate]                                              |\n| GitHub Downloads | [![Github downloads][badge-github-dl]][github-releases]                                  |\n|     Docker Pulls | [![Docker pulls][badge-docker-pulls]][docker]                                            |\n|          License | [![Crate license][badge-license]][github]                                                |\n\n<details>\n<summary><strong>Table of Contents</strong></summary>\n\n<!-- toc -->\n\n</details>\n\n## CLI\n\n### Usage\n\nSimple! Run without any parameters, you get a name:\n\n```console\n> names\nselfish-change\n```\n\nNeed more? Tell it how many:\n\n```console\n> names 10\nrustic-flag\nnondescript-crayon\npicayune-map\nelderly-cough\nskinny-jeans\nneat-rock\naware-sponge\npsychotic-coast\nbrawny-event\ntender-oatmeal\n```\n\nNot random enough? How about adding a 4-number pad:\n\n```console\n> names --number 5\nimported-rod-9680\nthin-position-2344\nhysterical-women-5647\nvolatile-pen-9210\ndiligent-grip-4520\n```\n\nIf you're ever confused, at least there's help:\n\n```console\n> names --help\nnames 0.11.0\nFletcher Nichol <fnichol@nichol.ca>\n\nA random name generator with results like \"delirious-pail\"\n\nUSAGE:\n    names [FLAGS] [AMOUNT]\n\nARGS:\n    <AMOUNT>    Number of names to generate [default: 1]\n\nFLAGS:\n    -h, --help       Prints help information\n    -n, --number     Adds a random number to the name(s)\n    -V, --version    Prints version information\n```\n\n### Installation\n\n#### install.sh (Pre-Built Binaries)\n\nAn installer is provided at <https://fnichol.github.io/{{crate}}/install.sh>\nwhich installs a suitable pre-built binary for common systems such as Linux,\nmacOS, Windows, and FreeBSD. It can be downloaded and run locally or piped into\na shell interpreter in the \"curl-bash\" style as shown below. Note that if you're\nopposed to this idea, feel free to check some of the alternatives below.\n\nTo install the latest release for your system into `$HOME/bin`:\n\n```sh\ncurl -sSf https://fnichol.github.io/{{crate}}/install.sh | sh\n```\n\nWhen the installer is run as `root` the installation directory defaults to\n`/usr/local/bin`:\n\n```sh\ncurl -sSf https://fnichol.github.io/{{crate}}/install.sh | sudo sh\n```\n\nA [nightly] release built from `HEAD` of the main branch is available which can\nalso be installed:\n\n```sh\ncurl -sSf https://fnichol.github.io/{{crate}}/install.sh \\\n    | sh -s -- --release=nightly\n```\n\nFor a full set of options, check out the help usage with:\n\n```sh\ncurl -sSf https://fnichol.github.io/{{crate}}/install.sh | sh -s -- --help\n```\n\n#### GitHub Releasees (Pre-Built Binaries)\n\nEach release comes with binary artifacts published in [GitHub\nReleases][github-releases]. The `install.sh` program downloads its artifacts\nfrom this location so this serves as a manual alternative. Each artifact ships\nwith MD5 and SHA256 checksums to help verify the artifact on a target system.\n\n#### Docker Image\n\nA minimal image ships with each release (including a [nightly] built version\nfrom `HEAD` of the main branch) published to [Docker Hub][docker]. The\nentrypoint invokes the binary directly, so any arguments to `docker run` will be\npassed to the program. For example, to display the full help usage:\n\n```sh\ndocker run fnichol/names --help\n```\n\n#### Cargo Install\n\nIf [Rust](https://rustup.rs/) is installed on your system, then installing with\nCargo is straight forward with:\n\n```sh\ncargo install {{crate}}\n```\n\n#### From Source\n\nTo install from source, you can clone the Git repository, build with Cargo and\ncopy the binary into a destination directory. This will build the project from\nthe latest commit on the main branch, which may not correspond to the latest\nstable release:\n\n```console\n> git clone https://github.com/fnichol/{{crate}}.git\n> cd {{crate}}\n> cargo build --release\n> cp ./target/release/{{crate}} /dest/path/\n```\n\n---\n\n## Library\n\n{{readme}}\n\n## CI Status\n\n### Build (main branch)\n\n| Operating System | Target                        | Stable Rust                                                                     |\n| ---------------: | ----------------------------- | ------------------------------------------------------------------------------- |\n|          FreeBSD | `x86_64-unknown-freebsd`      | [![FreeBSD Build Status][badge-ci-build-x86_64-unknown-freebsd]][ci-staging]    |\n|            Linux | `arm-unknown-linux-gnueabihf` | [![Linux Build Status][badge-ci-build-arm-unknown-linux-gnueabihf]][ci-staging] |\n|            Linux | `aarch64-unknown-linux-gnu`   | [![Linux Build Status][badge-ci-build-aarch64-unknown-linux-gnu]][ci-staging]   |\n|            Linux | `i686-unknown-linux-gnu`      | [![Linux Build Status][badge-ci-build-i686-unknown-linux-gnu]][ci-staging]      |\n|            Linux | `i686-unknown-linux-musl`     | [![Linux Build Status][badge-ci-build-i686-unknown-linux-musl]][ci-staging]     |\n|            Linux | `x86_64-unknown-linux-gnu`    | [![Linux Build Status][badge-ci-build-x86_64-unknown-linux-gnu]][ci-staging]    |\n|            Linux | `x86_64-unknown-linux-musl`   | [![Linux Build Status][badge-ci-build-x86_64-unknown-linux-musl]][ci-staging]   |\n|            macOS | `x86_64-apple-darwin`         | [![macOS Build Status][badge-ci-build-x86_64-apple-darwin]][ci-staging]         |\n|          Windows | `x86_64-pc-windows-msvc`      | [![Windows Build Status][badge-ci-build-x86_64-pc-windows-msvc]][ci-staging]    |\n\n### Test (main branch)\n\n| Operating System | Stable Rust                                                               | Nightly Rust                                                                |\n| ---------------: | ------------------------------------------------------------------------- | --------------------------------------------------------------------------- |\n|          FreeBSD | [![FreeBSD Stable Test Status][badge-ci-test-stable-freebsd]][ci-staging] | [![FreeBSD Nightly Test Status][badge-ci-test-nightly-freebsd]][ci-staging] |\n|            Linux | [![Linux Stable Test Status][badge-ci-test-stable-linux]][ci-staging]     | [![Linux Nightly Test Status][badge-ci-test-nightly-linux]][ci-staging]     |\n|            macOS | [![macOS Stable Test Status][badge-ci-test-stable-macos]][ci-staging]     | [![macOS Nightly Test Status][badge-ci-test-nightly-macos]][ci-staging]     |\n|          Windows | [![Windows Stable Test Status][badge-ci-test-stable-windows]][ci-staging] | [![Windows Nightly Test Status][badge-ci-test-nightly-windows]][ci-staging] |\n\n**Note**: The\n[Minimum Supported Rust Version (MSRV)](https://github.com/rust-lang/rfcs/pull/2495)\nis also tested and can be viewed in the [CI dashboard][ci-staging].\n\n### Check (main branch)\n\n|        | Status                                                |\n| ------ | ----------------------------------------------------- |\n| Lint   | [![Lint Status][badge-ci-check-lint]][ci-staging]     |\n| Format | [![Format Status][badge-ci-check-format]][ci-staging] |\n\n## Code of Conduct\n\nThis project adheres to the Contributor Covenant [code of\nconduct][code-of-conduct]. By participating, you are expected to uphold this\ncode. Please report unacceptable behavior to fnichol@nichol.ca.\n\n## Issues\n\nIf you have any problems with or questions about this project, please contact us\nthrough a [GitHub issue][issues].\n\n## Contributing\n\nYou are invited to contribute to new features, fixes, or updates, large or\nsmall; we are always thrilled to receive pull requests, and do our best to\nprocess them as fast as we can.\n\nBefore you start to code, we recommend discussing your plans through a [GitHub\nissue][issues], especially for more ambitious contributions. This gives other\ncontributors a chance to point you in the right direction, give you feedback on\nyour design, and help you find out if someone else is working on the same thing.\n\n## Release History\n\nSee the [changelog] for a full release history.\n\n## Authors\n\nCreated and maintained by [Fletcher Nichol][fnichol] (<fnichol@nichol.ca>).\n\n## License\n\nLicensed under the MIT license ([LICENSE.txt][license]).\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the MIT license, shall be\nlicensed as above, without any additional terms or conditions.\n\n[badge-bors]: https://bors.tech/images/badge_small.svg\n[badge-ci-build-x86_64-unknown-freebsd]:\n  https://img.shields.io/cirrus/github/fnichol/{{crate}}/staging?style=flat-square&task=build-bin-{{crate}}-x86_64-unknown-freebsd.tar.gz\n[badge-ci-build-arm-unknown-linux-gnueabihf]:\n  https://img.shields.io/cirrus/github/fnichol/{{crate}}/staging?style=flat-square&task=build-bin-{{crate}}-arm-unknown-linux-gnueabihf.tar.gz\n[badge-ci-build-aarch64-unknown-linux-gnu]:\n  https://img.shields.io/cirrus/github/fnichol/{{crate}}/staging?style=flat-square&task=build-bin-{{crate}}-aarch64-unknown-linux-gnu.tar.gz\n[badge-ci-build-i686-unknown-linux-gnu]:\n  https://img.shields.io/cirrus/github/fnichol/{{crate}}/staging?style=flat-square&task=build-bin-{{crate}}-i686-unknown-linux-gnu.tar.gz\n[badge-ci-build-i686-unknown-linux-musl]:\n  https://img.shields.io/cirrus/github/fnichol/{{crate}}/staging?style=flat-square&task=build-bin-{{crate}}-i686-unknown-linux-musl.tar.gz\n[badge-ci-build-x86_64-unknown-linux-gnu]:\n  https://img.shields.io/cirrus/github/fnichol/{{crate}}/staging?style=flat-square&task=build-bin-{{crate}}-x86_64-unknown-linux-gnu.tar.gz\n[badge-ci-build-x86_64-unknown-linux-musl]:\n  https://img.shields.io/cirrus/github/fnichol/{{crate}}/staging?style=flat-square&task=build-bin-{{crate}}-x86_64-unknown-linux-musl.tar.gz\n[badge-ci-build-x86_64-apple-darwin]:\n  https://img.shields.io/cirrus/github/fnichol/{{crate}}/staging?style=flat-square&task=build-bin-{{crate}}-x86_64-apple-darwin.zip\n[badge-ci-build-x86_64-pc-windows-msvc]:\n  https://img.shields.io/cirrus/github/fnichol/{{crate}}/staging?style=flat-square&task=build-bin-{{crate}}-x86_64-pc-windows-msvc.zip\n[badge-ci-check-format]:\n  https://img.shields.io/cirrus/github/fnichol/{{crate}}/staging?style=flat-square&task=check&script=format\n[badge-ci-check-lint]:\n  https://img.shields.io/cirrus/github/fnichol/{{crate}}/staging?style=flat-square&task=check&script=lint\n[badge-ci-overall]:\n  https://img.shields.io/cirrus/github/fnichol/{{crate}}/main?style=flat-square\n[badge-ci-test-nightly-freebsd]:\n  https://img.shields.io/cirrus/github/fnichol/{{crate}}/staging?style=flat-square&task=test-nightly-x86_64-unknown-freebsd\n[badge-ci-test-nightly-linux]:\n  https://img.shields.io/cirrus/github/fnichol/{{crate}}/staging?style=flat-square&task=test-nightly-x86_64-unknown-linux-gnu\n[badge-ci-test-nightly-macos]:\n  https://img.shields.io/cirrus/github/fnichol/{{crate}}/staging?style=flat-square&task=test-nightly-x86_64-apple-darwin\n[badge-ci-test-nightly-windows]:\n  https://img.shields.io/cirrus/github/fnichol/{{crate}}/staging?style=flat-square&task=test-nightly-x86_64-pc-windows-msvc\n[badge-ci-test-stable-freebsd]:\n  https://img.shields.io/cirrus/github/fnichol/{{crate}}/staging?style=flat-square&task=test-stable-x86_64-unknown-freebsd\n[badge-ci-test-stable-linux]:\n  https://img.shields.io/cirrus/github/fnichol/{{crate}}/staging?style=flat-square&task=test-stable-x86_64-unknown-linux-gnu\n[badge-ci-test-stable-macos]:\n  https://img.shields.io/cirrus/github/fnichol/{{crate}}/staging?style=flat-square&task=test-stable-x86_64-apple-darwin\n[badge-ci-test-stable-windows]:\n  https://img.shields.io/cirrus/github/fnichol/{{crate}}/staging?style=flat-square&task=test-stable-x86_64-pc-windows-msvc\n[badge-crate-dl]:\n  https://img.shields.io/crates/d/{{crate}}.svg?style=flat-square\n[badge-docker-pulls]:\n  https://img.shields.io/docker/pulls/fnichol/{{crate}}.svg?style=flat-square\n[badge-docs]: https://docs.rs/{{crate}}/badge.svg?style=flat-square\n[badge-github-dl]:\n  https://img.shields.io/github/downloads/fnichol/{{crate}}/total.svg\n[badge-license]: https://img.shields.io/crates/l/{{crate}}.svg?style=flat-square\n[badge-version]: https://img.shields.io/crates/v/{{crate}}.svg?style=flat-square\n[bors-dashboard]: https://app.bors.tech/repositories/37173\n[changelog]: https://github.com/fnichol/{{crate}}/blob/main/CHANGELOG.md\n[ci]: https://cirrus-ci.com/github/fnichol/{{crate}}\n[ci-staging]: https://cirrus-ci.com/github/fnichol/{{crate}}/staging\n[code-of-conduct]:\n  https://github.com/fnichol/{{crate}}/blob/main/CODE_OF_CONDUCT.md\n[commonmark]: https://commonmark.org/\n[crate]: https://crates.io/crates/{{crate}}\n[docker]: https://hub.docker.com/r/fnichol/{{crate}}\n[docs]: https://docs.rs/{{crate}}\n[fnichol]: https://github.com/fnichol\n[github]: https://github.com/fnichol/{{crate}}\n[github-releases]: https://github.com/fnichol/{{crate}}/releases\n[issues]: https://github.com/fnichol/{{crate}}/issues\n[license]: https://github.com/fnichol/{{crate}}/blob/main/LICENSE.txt\n[nightly]: https://github.com/fnichol/{{crate}}/releases/tag/nightly\n"
  },
  {
    "path": "build.rs",
    "content": "use std::env;\nuse std::fs::File;\nuse std::io::{self, BufRead, BufReader, BufWriter, Write};\nuse std::path::Path;\n\nfn main() -> Result<(), Box<dyn std::error::Error>> {\n    update_version_if_nightly();\n\n    let out_dir = env::var(\"OUT_DIR\")?;\n    let out_dir = Path::new(&out_dir);\n    let src_dir = Path::new(\"data\");\n\n    generate(\n        src_dir.join(\"adjectives.txt\"),\n        out_dir.join(\"adjectives.rs\"),\n    )?;\n    generate(src_dir.join(\"nouns.txt\"), out_dir.join(\"nouns.rs\"))?;\n    Ok(())\n}\n\nfn generate(src_path: impl AsRef<Path>, dst_path: impl AsRef<Path>) -> io::Result<()> {\n    let src = BufReader::new(File::open(src_path.as_ref())?);\n    let mut dst = BufWriter::new(File::create(dst_path.as_ref())?);\n\n    writeln!(dst, \"[\")?;\n    for word in src.lines() {\n        writeln!(dst, \"\\\"{}\\\",\", &word.unwrap())?;\n    }\n    writeln!(dst, \"]\")\n}\n\nfn update_version_if_nightly() {\n    println!(\"cargo:rerun-if-env-changed=NIGHTLY_BUILD\");\n    if let Ok(date) = std::env::var(\"NIGHTLY_BUILD\") {\n        println!(\n            \"cargo:rustc-env=CARGO_PKG_VERSION={}-nightly.{}\",\n            std::env::var(\"CARGO_PKG_VERSION\")\n                .unwrap()\n                .split('-')\n                .next()\n                .unwrap(),\n            date,\n        );\n    }\n}\n"
  },
  {
    "path": "data/adjectives.txt",
    "content": "aback\nabaft\nabandoned\nabashed\naberrant\nabhorrent\nabiding\nabject\nablaze\nable\nabnormal\naboard\naboriginal\nabortive\nabounding\nabrasive\nabrupt\nabsent\nabsorbed\nabsorbing\nabstracted\nabsurd\nabundant\nabusive\nacceptable\naccessible\naccidental\naccurate\nacid\nacidic\nacoustic\nacrid\nactually\nad\nadamant\nadaptable\naddicted\nadhesive\nadjoining\nadorable\nadventurous\nafraid\naggressive\nagonizing\nagreeable\nahead\najar\nalcoholic\nalert\nalike\nalive\nalleged\nalluring\naloof\namazing\nambiguous\nambitious\namuck\namused\namusing\nancient\nangry\nanimated\nannoyed\nannoying\nanxious\napathetic\naquatic\naromatic\narrogant\nashamed\naspiring\nassorted\nastonishing\nattractive\nauspicious\nautomatic\navailable\naverage\nawake\naware\nawesome\nawful\naxiomatic\nbad\nbarbarous\nbashful\nbawdy\nbeautiful\nbefitting\nbelligerent\nbeneficial\nbent\nberserk\nbest\nbetter\nbewildered\nbig\nbillowy\nbite-sized\nbitter\nbizarre\nblack\nblack-and-white\nbloody\nblue\nblue-eyed\nblushing\nboiling\nboorish\nbored\nboring\nbouncy\nboundless\nbrainy\nbrash\nbrave\nbrawny\nbreakable\nbreezy\nbrief\nbright\nbroad\nbroken\nbrown\nbumpy\nburly\nbustling\nbusy\ncagey\ncalculating\ncallous\ncalm\ncapable\ncapricious\ncareful\ncareless\ncaring\ncautious\nceaseless\ncertain\nchangeable\ncharming\ncheap\ncheerful\nchemical\nchief\nchildlike\nchilly\nchivalrous\nchubby\nchunky\nclammy\nclassy\nclean\nclear\nclever\ncloistered\nclosed\ncloudy\nclumsy\ncluttered\ncoherent\ncold\ncolorful\ncolossal\ncombative\ncomfortable\ncommon\ncomplete\ncomplex\nconcerned\ncondemned\nconfused\nconscious\ncooing\ncool\ncooperative\ncoordinated\ncourageous\ncowardly\ncrabby\ncraven\ncrazy\ncreepy\ncrooked\ncrowded\ncruel\ncuddly\ncultured\ncumbersome\ncurious\ncurly\ncurved\ncurvy\ncut\ncute\ncynical\ndaffy\ndaily\ndamaged\ndamaging\ndamp\ndangerous\ndapper\ndark\ndashing\ndazzling\ndead\ndeadpan\ndeafening\ndear\ndebonair\ndecisive\ndecorous\ndeep\ndeeply\ndefeated\ndefective\ndefiant\ndelicate\ndelicious\ndelightful\ndelirious\ndemonic\ndependent\ndepressed\nderanged\ndescriptive\ndeserted\ndetailed\ndetermined\ndevilish\ndidactic\ndifferent\ndifficult\ndiligent\ndireful\ndirty\ndisagreeable\ndisastrous\ndiscreet\ndisgusted\ndisgusting\ndisillusioned\ndispensable\ndistinct\ndisturbed\ndivergent\ndizzy\ndomineering\ndoubtful\ndrab\ndraconian\ndramatic\ndreary\ndrunk\ndry\ndull\ndusty\ndynamic\ndysfunctional\neager\nearly\nearsplitting\nearthy\neasy\neatable\neconomic\neducated\nefficacious\nefficient\neight\nelastic\nelated\nelderly\nelectric\nelegant\nelfin\nelite\nembarrassed\neminent\nempty\nenchanted\nenchanting\nencouraging\nendurable\nenergetic\nenormous\nentertaining\nenthusiastic\nenvious\nequable\nequal\nerect\nerratic\nethereal\nevanescent\nevasive\neven\nexcellent\nexcited\nexciting\nexclusive\nexotic\nexpensive\nextra-large\nextra-small\nexuberant\nexultant\nfabulous\nfaded\nfaint\nfair\nfaithful\nfallacious\nfalse\nfamiliar\nfamous\nfanatical\nfancy\nfantastic\nfar\nfar-flung\nfascinated\nfast\nfat\nfaulty\nfearful\nfearless\nfeeble\nfeigned\nfemale\nfertile\nfestive\nfew\nfierce\nfilthy\nfine\nfinicky\nfirst\nfive\nfixed\nflagrant\nflaky\nflashy\nflat\nflawless\nflimsy\nflippant\nflowery\nfluffy\nfluttering\nfoamy\nfoolish\nforegoing\nforgetful\nfortunate\nfour\nfragile\nfrail\nfrantic\nfree\nfreezing\nfrequent\nfresh\nfretful\nfriendly\nfrightened\nfrightening\nfull\nfumbling\nfunctional\nfunny\nfurry\nfurtive\nfuture\nfuturistic\nfuzzy\ngabby\ngainful\ngamy\ngaping\ngarrulous\ngaudy\ngeneral\ngentle\ngiant\ngiddy\ngifted\ngigantic\nglamorous\ngleaming\nglib\nglistening\nglorious\nglossy\ngodly\ngood\ngoofy\ngorgeous\ngraceful\ngrandiose\ngrateful\ngratis\ngray\ngreasy\ngreat\ngreedy\ngreen\ngrey\ngrieving\ngroovy\ngrotesque\ngrouchy\ngrubby\ngruesome\ngrumpy\nguarded\nguiltless\ngullible\ngusty\nguttural\nhabitual\nhalf\nhallowed\nhalting\nhandsome\nhandsomely\nhandy\nhanging\nhapless\nhappy\nhard\nhard-to-find\nharmonious\nharsh\nhateful\nheady\nhealthy\nheartbreaking\nheavenly\nheavy\nhellish\nhelpful\nhelpless\nhesitant\nhideous\nhigh\nhigh-pitched\nhighfalutin\nhilarious\nhissing\nhistorical\nholistic\nhollow\nhomeless\nhomely\nhonorable\nhorrible\nhospitable\nhot\nhuge\nhulking\nhumdrum\nhumorous\nhungry\nhurried\nhurt\nhushed\nhusky\nhypnotic\nhysterical\nicky\nicy\nidiotic\nignorant\nill\nill-fated\nill-informed\nillegal\nillustrious\nimaginary\nimmense\nimminent\nimpartial\nimperfect\nimpolite\nimportant\nimported\nimpossible\nincandescent\nincompetent\ninconclusive\nincredible\nindustrious\ninexpensive\ninfamous\ninnate\ninnocent\ninquisitive\ninsidious\ninstinctive\nintelligent\ninteresting\ninternal\ninvincible\nirate\nirritating\nitchy\njaded\njagged\njazzy\njealous\njittery\njobless\njolly\njoyous\njudicious\njuicy\njumbled\njumpy\njuvenile\nkaput\nkeen\nkind\nkindhearted\nkindly\nknotty\nknowing\nknowledgeable\nknown\nlabored\nlackadaisical\nlacking\nlame\nlamentable\nlanguid\nlarge\nlast\nlate\nlaughable\nlavish\nlazy\nlean\nlearned\nleft\nlegal\nlethal\nlevel\nlewd\nlight\nlike\nlikeable\nlimping\nliterate\nlittle\nlively\nliving\nlonely\nlong\nlong-term\nlonging\nloose\nlopsided\nloud\nloutish\nlovely\nloving\nlow\nlowly\nlucky\nludicrous\nlumpy\nlush\nluxuriant\nlying\nlyrical\nmacabre\nmacho\nmaddening\nmadly\nmagenta\nmagical\nmagnificent\nmajestic\nmakeshift\nmale\nmalicious\nmammoth\nmaniacal\nmany\nmarked\nmarried\nmarvelous\nmassive\nmaterial\nmaterialistic\nmature\nmean\nmeasly\nmeaty\nmedical\nmeek\nmellow\nmelodic\nmelted\nmerciful\nmere\nmessy\nmighty\nmilitary\nmilky\nmindless\nminiature\nminor\nmiscreant\nmisty\nmixed\nmoaning\nmodern\nmoldy\nmomentous\nmotionless\nmountainous\nmuddled\nmundane\nmurky\nmushy\nmute\nmysterious\nnaive\nnappy\nnarrow\nnasty\nnatural\nnaughty\nnauseating\nnear\nneat\nnebulous\nnecessary\nneedless\nneedy\nneighborly\nnervous\nnew\nnext\nnice\nnifty\nnimble\nnine\nnippy\nnoiseless\nnoisy\nnonchalant\nnondescript\nnonstop\nnormal\nnostalgic\nnosy\nnoxious\nnull\nnumberless\nnumerous\nnutritious\nnutty\noafish\nobedient\nobeisant\nobese\nobnoxious\nobscene\nobsequious\nobservant\nobsolete\nobtainable\noceanic\nodd\noffbeat\nold\nold-fashioned\nomniscient\none\nonerous\nopen\nopposite\noptimal\norange\nordinary\norganic\nossified\noutgoing\noutrageous\noutstanding\noval\noverconfident\noverjoyed\noverrated\novert\noverwrought\npainful\npainstaking\npale\npaltry\npanicky\npanoramic\nparallel\nparched\nparsimonious\npast\npastoral\npathetic\npeaceful\npenitent\nperfect\nperiodic\npermissible\nperpetual\npetite\nphobic\nphysical\npicayune\npink\npiquant\nplacid\nplain\nplant\nplastic\nplausible\npleasant\nplucky\npointless\npoised\npolite\npolitical\npoor\npossessive\npossible\npowerful\nprecious\npremium\npresent\npretty\nprevious\npricey\nprickly\nprivate\nprobable\nproductive\nprofuse\nprotective\nproud\npsychedelic\npsychotic\npublic\npuffy\npumped\npuny\npurple\npurring\npushy\npuzzled\npuzzling\nquack\nquaint\nquarrelsome\nquestionable\nquick\nquickest\nquiet\nquirky\nquixotic\nquizzical\nrabid\nracial\nragged\nrainy\nrambunctious\nrampant\nrapid\nrare\nraspy\nratty\nready\nreal\nrebel\nreceptive\nrecondite\nred\nredundant\nreflective\nregular\nrelieved\nremarkable\nreminiscent\nrepulsive\nresolute\nresonant\nresponsible\nrhetorical\nrich\nright\nrighteous\nrightful\nrigid\nripe\nritzy\nroasted\nrobust\nromantic\nroomy\nrotten\nrough\nround\nroyal\nruddy\nrude\nrural\nrustic\nruthless\nsable\nsad\nsafe\nsalty\nsame\nsassy\nsatisfying\nsavory\nscandalous\nscarce\nscared\nscary\nscattered\nscientific\nscintillating\nscrawny\nscreeching\nsecond\nsecond-hand\nsecret\nsecretive\nsedate\nseemly\nselective\nselfish\nseparate\nserious\nshaggy\nshaky\nshallow\nsharp\nshiny\nshivering\nshocking\nshort\nshrill\nshut\nshy\nsick\nsilent\nsilky\nsilly\nsimple\nsimplistic\nsincere\nsix\nskillful\nskinny\nsleepy\nslim\nslimy\nslippery\nsloppy\nslow\nsmall\nsmart\nsmelly\nsmiling\nsmoggy\nsmooth\nsneaky\nsnobbish\nsnotty\nsoft\nsoggy\nsolid\nsomber\nsophisticated\nsordid\nsore\nsour\nsparkling\nspecial\nspectacular\nspicy\nspiffy\nspiky\nspiritual\nspiteful\nsplendid\nspooky\nspotless\nspotted\nspotty\nspurious\nsqualid\nsquare\nsquealing\nsqueamish\nstaking\nstale\nstanding\nstatuesque\nsteadfast\nsteady\nsteep\nstereotyped\nsticky\nstiff\nstimulating\nstingy\nstormy\nstraight\nstrange\nstriped\nstrong\nstupendous\nstupid\nsturdy\nsubdued\nsubsequent\nsubstantial\nsuccessful\nsuccinct\nsudden\nsulky\nsuper\nsuperb\nsuperficial\nsupreme\nswanky\nsweet\nsweltering\nswift\nsymptomatic\nsynonymous\ntaboo\ntacit\ntacky\ntalented\ntall\ntame\ntan\ntangible\ntangy\ntart\ntasteful\ntasteless\ntasty\ntawdry\ntearful\ntedious\nteeny\nteeny-tiny\ntelling\ntemporary\nten\ntender\ntense\ntenuous\nterrible\nterrific\ntested\ntesty\nthankful\ntherapeutic\nthick\nthin\nthinkable\nthird\nthirsty\nthoughtful\nthoughtless\nthreatening\nthree\nthundering\ntidy\ntight\ntightfisted\ntiny\ntired\ntiresome\ntoothsome\ntorpid\ntough\ntowering\ntranquil\ntrashy\ntremendous\ntricky\ntrite\ntroubled\ntruculent\ntrue\ntruthful\ntwo\ntypical\nubiquitous\nugliest\nugly\nultra\nunable\nunaccountable\nunadvised\nunarmed\nunbecoming\nunbiased\nuncovered\nunderstood\nundesirable\nunequal\nunequaled\nuneven\nunhealthy\nuninterested\nunique\nunkempt\nunknown\nunnatural\nunruly\nunsightly\nunsuitable\nuntidy\nunused\nunusual\nunwieldy\nunwritten\nupbeat\nuppity\nupset\nuptight\nused\nuseful\nuseless\nutopian\nutter\nuttermost\nvacuous\nvagabond\nvague\nvaluable\nvarious\nvast\nvengeful\nvenomous\nverdant\nversed\nvictorious\nvigorous\nviolent\nviolet\nvivacious\nvoiceless\nvolatile\nvoracious\nvulgar\nwacky\nwaggish\nwaiting\nwakeful\nwandering\nwanting\nwarlike\nwarm\nwary\nwasteful\nwatery\nweak\nwealthy\nweary\nwell-groomed\nwell-made\nwell-off\nwell-to-do\nwet\nwhimsical\nwhispering\nwhite\nwhole\nwholesale\nwicked\nwide\nwide-eyed\nwiggly\nwild\nwilling\nwindy\nwiry\nwise\nwistful\nwitty\nwoebegone\nwomanly\nwonderful\nwooden\nwoozy\nworkable\nworried\nworthless\nwrathful\nwretched\nwrong\nwry\nyellow\nyielding\nyoung\nyouthful\nyummy\nzany\nzealous\nzesty\nzippy\nzonked\n"
  },
  {
    "path": "data/nouns.txt",
    "content": "able\naccount\nachieve\nachiever\nacoustics\nact\naction\nactivity\nactor\naddition\nadjustment\nadvertisement\nadvice\naftermath\nafternoon\nafterthought\nagreement\nair\nairplane\nairport\nalarm\nalley\namount\namusement\nanger\nangle\nanimal\nanswer\nant\nants\napparatus\napparel\napple\napples\nappliance\napproval\narch\nargument\narithmetic\narm\narmy\nart\nattack\nattempt\nattention\nattraction\naunt\nauthority\nbabies\nbaby\nback\nbadge\nbag\nbait\nbalance\nball\nballoon\nballs\nbanana\nband\nbase\nbaseball\nbasin\nbasket\nbasketball\nbat\nbath\nbattle\nbead\nbeam\nbean\nbear\nbears\nbeast\nbed\nbedroom\nbeds\nbee\nbeef\nbeetle\nbeggar\nbeginner\nbehavior\nbelief\nbelieve\nbell\nbells\nberry\nbike\nbikes\nbird\nbirds\nbirth\nbirthday\nbit\nbite\nblade\nblood\nblow\nboard\nboat\nboats\nbody\nbomb\nbone\nbook\nbooks\nboot\nborder\nbottle\nboundary\nbox\nboy\nboys\nbrain\nbrake\nbranch\nbrass\nbread\nbreakfast\nbreath\nbrick\nbridge\nbrother\nbrothers\nbrush\nbubble\nbucket\nbuilding\nbulb\nbun\nburn\nburst\nbushes\nbusiness\nbutter\nbutton\ncabbage\ncable\ncactus\ncake\ncakes\ncalculator\ncalendar\ncamera\ncamp\ncan\ncannon\ncanvas\ncap\ncaption\ncar\ncard\ncare\ncarpenter\ncarriage\ncars\ncart\ncast\ncat\ncats\ncattle\ncause\ncave\ncelery\ncellar\ncemetery\ncent\nchain\nchair\nchairs\nchalk\nchance\nchange\nchannel\ncheese\ncherries\ncherry\nchess\nchicken\nchickens\nchildren\nchin\nchurch\ncircle\nclam\nclass\nclock\nclocks\ncloth\ncloud\nclouds\nclover\nclub\ncoach\ncoal\ncoast\ncoat\ncobweb\ncoil\ncollar\ncolor\ncomb\ncomfort\ncommittee\ncompany\ncomparison\ncompetition\ncondition\nconnection\ncontrol\ncook\ncopper\ncopy\ncord\ncork\ncorn\ncough\ncountry\ncover\ncow\ncows\ncrack\ncracker\ncrate\ncrayon\ncream\ncreator\ncreature\ncredit\ncrib\ncrime\ncrook\ncrow\ncrowd\ncrown\ncrush\ncry\ncub\ncup\ncurrent\ncurtain\ncurve\ncushion\ndad\ndaughter\nday\ndeath\ndebt\ndecision\ndeer\ndegree\ndesign\ndesire\ndesk\ndestruction\ndetail\ndevelopment\ndigestion\ndime\ndinner\ndinosaurs\ndirection\ndirt\ndiscovery\ndiscussion\ndisease\ndisgust\ndistance\ndistribution\ndivision\ndock\ndoctor\ndog\ndogs\ndoll\ndolls\ndonkey\ndoor\ndowntown\ndrain\ndrawer\ndress\ndrink\ndriving\ndrop\ndrug\ndrum\nduck\nducks\ndust\near\nearth\nearthquake\nedge\neducation\neffect\negg\neggnog\neggs\nelbow\nend\nengine\nerror\nevent\nexample\nexchange\nexistence\nexpansion\nexperience\nexpert\neye\neyes\nface\nfact\nfairies\nfall\nfamily\nfan\nfang\nfarm\nfarmer\nfather\nfaucet\nfear\nfeast\nfeather\nfeeling\nfeet\nfiction\nfield\nfifth\nfight\nfinger\nfire\nfireman\nfish\nflag\nflame\nflavor\nflesh\nflight\nflock\nfloor\nflower\nflowers\nfly\nfog\nfold\nfood\nfoot\nforce\nfork\nform\nfowl\nframe\nfriction\nfriend\nfriends\nfrog\nfrogs\nfront\nfruit\nfuel\nfurniture\ngalley\ngame\ngarden\ngate\ngeese\nghost\ngiants\ngiraffe\ngirl\ngirls\nglass\nglove\nglue\ngoat\ngold\ngoldfish\ngood-bye\ngoose\ngovernment\ngovernor\ngrade\ngrain\ngrandfather\ngrandmother\ngrape\ngrass\ngrip\nground\ngroup\ngrowth\nguide\nguitar\ngun\nhair\nhaircut\nhall\nhammer\nhand\nhands\nharbor\nharmony\nhat\nhate\nhead\nhealth\nhearing\nheart\nheat\nhelp\nhen\nhill\nhistory\nhobbies\nhole\nholiday\nhome\nhoney\nhook\nhope\nhorn\nhorse\nhorses\nhose\nhospital\nhot\nhour\nhouse\nhouses\nhumor\nhydrant\nice\nicicle\nidea\nimpulse\nincome\nincrease\nindustry\nink\ninsect\ninstrument\ninsurance\ninterest\ninvention\niron\nisland\njail\njam\njar\njeans\njelly\njellyfish\njewel\njoin\njoke\njourney\njudge\njuice\njump\nkettle\nkey\nkick\nkiss\nkite\nkitten\nkittens\nkitty\nknee\nknife\nknot\nknowledge\nlaborer\nlace\nladybug\nlake\nlamp\nland\nlanguage\nlaugh\nlawyer\nlead\nleaf\nlearning\nleather\nleg\nlegs\nletter\nletters\nlettuce\nlevel\nlibrary\nlift\nlight\nlimit\nline\nlinen\nlip\nliquid\nlist\nlizards\nloaf\nlock\nlocket\nlook\nloss\nlove\nlow\nlumber\nlunch\nlunchroom\nmachine\nmagic\nmaid\nmailbox\nman\nmanager\nmap\nmarble\nmark\nmarket\nmask\nmass\nmatch\nmeal\nmeasure\nmeat\nmeeting\nmemory\nmen\nmetal\nmice\nmiddle\nmilk\nmind\nmine\nminister\nmint\nminute\nmist\nmitten\nmom\nmoney\nmonkey\nmonth\nmoon\nmorning\nmother\nmotion\nmountain\nmouth\nmove\nmuscle\nmusic\nnail\nname\nnation\nneck\nneed\nneedle\nnerve\nnest\nnet\nnews\nnight\nnoise\nnorth\nnose\nnote\nnotebook\nnumber\nnut\noatmeal\nobservation\nocean\noffer\noffice\noil\noperation\nopinion\norange\noranges\norder\norganization\nornament\noven\nowl\nowner\npage\npail\npain\npaint\npan\npancake\npaper\nparcel\nparent\npark\npart\npartner\nparty\npassenger\npaste\npatch\npayment\npeace\npear\npen\npencil\nperson\npest\npet\npets\npickle\npicture\npie\npies\npig\npigs\npin\npipe\npizzas\nplace\nplane\nplanes\nplant\nplantation\nplants\nplastic\nplate\nplay\nplayground\npleasure\nplot\nplough\npocket\npoint\npoison\npolice\npolish\npollution\npopcorn\nporter\nposition\npot\npotato\npowder\npower\nprice\nprint\nprison\nprocess\nproduce\nprofit\nproperty\nprose\nprotest\npull\npump\npunishment\npurpose\npush\nquarter\nquartz\nqueen\nquestion\nquicksand\nquiet\nquill\nquilt\nquince\nquiver\nrabbit\nrabbits\nrail\nrailway\nrain\nrainstorm\nrake\nrange\nrat\nrate\nray\nreaction\nreading\nreason\nreceipt\nrecess\nrecord\nregret\nrelation\nreligion\nrepresentative\nrequest\nrespect\nrest\nreward\nrhythm\nrice\nriddle\nrifle\nring\nrings\nriver\nroad\nrobin\nrock\nrod\nroll\nroof\nroom\nroot\nrose\nroute\nrub\nrule\nrun\nsack\nsail\nsalt\nsand\nscale\nscarecrow\nscarf\nscene\nscent\nschool\nscience\nscissors\nscrew\nsea\nseashore\nseat\nsecretary\nseed\nselection\nself\nsense\nservant\nshade\nshake\nshame\nshape\nsheep\nsheet\nshelf\nship\nshirt\nshock\nshoe\nshoes\nshop\nshow\nside\nsidewalk\nsign\nsilk\nsilver\nsink\nsister\nsisters\nsize\nskate\nskin\nskirt\nsky\nslave\nsleep\nsleet\nslip\nslope\nsmash\nsmell\nsmile\nsmoke\nsnail\nsnails\nsnake\nsnakes\nsneeze\nsnow\nsoap\nsociety\nsock\nsoda\nsofa\nson\nsong\nsongs\nsort\nsound\nsoup\nspace\nspade\nspark\nspiders\nsponge\nspoon\nspot\nspring\nspy\nsquare\nsquirrel\nstage\nstamp\nstar\nstart\nstatement\nstation\nsteam\nsteel\nstem\nstep\nstew\nstick\nsticks\nstitch\nstocking\nstomach\nstone\nstop\nstore\nstory\nstove\nstranger\nstraw\nstream\nstreet\nstretch\nstring\nstructure\nsubstance\nsugar\nsuggestion\nsuit\nsummer\nsun\nsupport\nsurprise\nsweater\nswim\nswing\nsystem\ntable\ntail\ntalk\ntank\ntaste\ntax\nteaching\nteam\nteeth\ntemper\ntendency\ntent\nterritory\ntest\ntexture\ntheory\nthing\nthings\nthought\nthread\nthrill\nthroat\nthrone\nthumb\nthunder\nticket\ntiger\ntime\ntin\ntitle\ntoad\ntoe\ntoes\ntomatoes\ntongue\ntooth\ntoothbrush\ntoothpaste\ntop\ntouch\ntown\ntoy\ntoys\ntrade\ntrail\ntrain\ntrains\ntramp\ntransport\ntray\ntreatment\ntree\ntrees\ntrick\ntrip\ntrouble\ntrousers\ntruck\ntrucks\ntub\nturkey\nturn\ntwig\ntwist\numbrella\nuncle\nunderwear\nunit\nuse\nvacation\nvalue\nvan\nvase\nvegetable\nveil\nvein\nverse\nvessel\nvest\nview\nvisitor\nvoice\nvolcano\nvolleyball\nvoyage\nwalk\nwall\nwar\nwash\nwaste\nwatch\nwater\nwave\nwaves\nwax\nway\nwealth\nweather\nweek\nweight\nwheel\nwhip\nwhistle\nwilderness\nwind\nwindow\nwine\nwing\nwinter\nwire\nwish\nwoman\nwomen\nwood\nwool\nword\nwork\nworm\nwound\nwren\nwrench\nwrist\nwriter\nwriting\nyak\nyam\nyard\nyarn\nyear\nyoke\nzebra\nzephyr\nzinc\nzipper\nzoo\n"
  },
  {
    "path": "docs/install.sh",
    "content": "#!/usr/bin/env sh\n# shellcheck shell=sh disable=SC3043\n\nprint_usage() {\n  local program version author default_dest default_platform\n  program=\"$1\"\n  version=\"$2\"\n  author=\"$3\"\n  bin=\"$4\"\n  default_dest=\"$5\"\n  default_platform=\"$6\"\n\n  need_cmd sed\n\n  echo \"$program $version\n\n    Installs a binary release of $bin for supported platforms\n\n    USAGE:\n        $program [OPTIONS] [--]\n\n    OPTIONS:\n        -h, --help                Prints help information\n        -d, --destination=<DEST>  Destination directory for installation\n                                  [default: $default_dest]\n        -p, --platform=<PLATFORM> Platform type to install\n                                  [examples: linux-x86_64, darwin-x86_64]\n                                  [default: $default_platform]\n        -r, --release=<RELEASE>   Release version\n                                  [examples: latest, 1.2.3, nightly]\n                                  [default: latest]\n        -V, --version             Prints version information\n\n    EXAMPLES:\n        # Installs the latest release into \\`\\$$HOME/bin\\`\n        $program\n\n    AUTHOR:\n        $author\n    \" | sed 's/^ \\{1,4\\}//g'\n}\n\nmain() {\n  set -eu\n  if [ -n \"${DEBUG:-}\" ]; then set -v; fi\n  if [ -n \"${TRACE:-}\" ]; then set -xv; fi\n\n  local program version author\n  program=\"install.sh\"\n  version=\"0.2.0\"\n  author=\"Fletcher Nichol <fnichol@nichol.ca>\"\n\n  local gh_repo bin\n  gh_repo=\"fnichol/names\"\n  bin=\"names\"\n\n  parse_cli_args \"$program\" \"$version\" \"$author\" \"$bin\" \"$@\"\n  local dest platform release\n  dest=\"$DEST\"\n  platform=\"$PLATFORM\"\n  release=\"$RELEASE\"\n  unset DEST PLATFORM RELEASE\n\n  need_cmd basename\n\n  setup_cleanups\n  setup_traps trap_cleanups\n\n  local initial_dir\n  initial_dir=\"$PWD\"\n\n  section \"Downloading, verifying, and installing '$bin'\"\n\n  if [ \"$release\" = \"latest\" ]; then\n    info_start \"Determining latest release for '$bin'\"\n    release=\"$(latest_release \"$gh_repo\")\" \\\n      || die \"Could not find latest release for '$bin' in repo '$gh_repo'\"\n    info_end\n  fi\n\n  local asset_url\n  info_start \\\n    \"Determining asset URL for '$bin' release '$release' on '$platform'\"\n  asset_url=\"$(asset_url \"$gh_repo\" \"$bin\" \"$release\" \"$platform\")\" \\\n    || die \"Unsupported platform '$platform' for '$bin' release '$release'\"\n  info_end\n\n  local tmpdir\n  tmpdir=\"$(mktemp_directory)\"\n  cleanup_directory \"$tmpdir\"\n\n  local asset\n  asset=\"$(basename \"$asset_url\")\"\n  section \"Downloading assets for '$asset'\"\n  download \"$asset_url\" \"$tmpdir/$asset\"\n  download \"$asset_url.md5\" \"$tmpdir/$asset.md5\"\n  download \"$asset_url.sha256\" \"$tmpdir/$asset.sha256\"\n\n  section \"Verifying '$asset'\"\n  cd \"$tmpdir\"\n  verify_asset_md5 \"$asset\" || die \"Failed to verify MD5 checksum\"\n  verify_asset_sha256 \"$asset\" || die \"Failed to verify SHA256 checksum\"\n\n  section \"Installing '$asset'\"\n  extract_asset \"$asset\" || die \"Failed to extract asset\"\n  cd \"$initial_dir\"\n  local asset_bin\n  asset_bin=\"${asset%%.tar.gz}\"\n  asset_bin=\"${asset_bin%%.zip}\"\n  install_bin \"$tmpdir/$asset_bin\" \"$dest/$bin\"\n\n  section \"Installation of '$bin' release '$release' complete\"\n}\n\nparse_cli_args() {\n  local program version author bin\n  program=\"$1\"\n  shift\n  version=\"$1\"\n  shift\n  author=\"$1\"\n  shift\n  bin=\"$1\"\n  shift\n\n  need_cmd id\n  need_cmd uname\n  need_cmd tr\n\n  local os_type cpu_type plat dest\n  os_type=\"$(uname -s | tr '[:upper:]' '[:lower:]')\"\n  cpu_type=\"$(uname -m | tr '[:upper:]' '[:lower:]')\"\n  plat=\"$os_type-$cpu_type\"\n  if [ \"$(id -u)\" -eq 0 ]; then\n    dest=\"/usr/local/bin\"\n  else\n    dest=\"$HOME/bin\"\n  fi\n\n  DEST=\"$dest\"\n  PLATFORM=\"$plat\"\n  RELEASE=\"latest\"\n\n  OPTIND=1\n  while getopts \"d:hp:r:V-:\" arg; do\n    case \"$arg\" in\n      d)\n        DEST=\"$OPTARG\"\n        ;;\n      h)\n        print_usage \"$program\" \"$version\" \"$author\" \"$bin\" \"$dest\" \"$plat\"\n        exit 0\n        ;;\n      p)\n        PLATFORM=\"$OPTARG\"\n        ;;\n      r)\n        RELEASE=\"$OPTARG\"\n        ;;\n      V)\n        print_version \"$program\" \"$version\" \"$plat\"\n        exit 0\n        ;;\n      -)\n        long_optarg=\"${OPTARG#*=}\"\n        case \"$OPTARG\" in\n          destination=?*)\n            DEST=\"$long_optarg\"\n            ;;\n          destination*)\n            print_usage \"$program\" \"$version\" \"$author\" \"$bin\" \"$dest\" \"$plat\" >&2\n            die \"missing required argument for --$OPTARG option\"\n            ;;\n          help)\n            print_usage \"$program\" \"$version\" \"$author\" \"$bin\" \"$dest\" \"$plat\"\n            exit 0\n            ;;\n          platform=?*)\n            PLATFORM=\"$long_optarg\"\n            ;;\n          platform*)\n            print_usage \"$program\" \"$version\" \"$author\" \"$bin\" \"$dest\" \"$plat\" >&2\n            die \"missing required argument for --$OPTARG option\"\n            ;;\n          release=?*)\n            RELEASE=\"$long_optarg\"\n            ;;\n          release*)\n            print_usage \"$program\" \"$version\" \"$author\" \"$bin\" \"$dest\" \"$plat\" >&2\n            die \"missing required argument for --$OPTARG option\"\n            ;;\n          version)\n            print_version \"$program\" \"$version\" \"true\"\n            exit 0\n            ;;\n          '')\n            # \"--\" terminates argument processing\n            break\n            ;;\n          *)\n            print_usage \"$program\" \"$version\" \"$author\" \"$bin\" \"$dest\" \"$plat\" >&2\n            die \"invalid argument --$OPTARG\"\n            ;;\n        esac\n        ;;\n      \\?)\n        print_usage \"$program\" \"$version\" \"$author\" \"$bin\" \"$dest\" \"$plat\" >&2\n        die \"invalid argument; arg=-$OPTARG\"\n        ;;\n    esac\n  done\n  shift \"$((OPTIND - 1))\"\n}\n\nlatest_release() {\n  local gh_repo\n  gh_repo=\"$1\"\n\n  need_cmd awk\n\n  local tmpfile\n  tmpfile=\"$(mktemp_file)\"\n  cleanup_file \"$tmpfile\"\n\n  download \\\n    \"https://api.github.com/repos/$gh_repo/releases/latest\" \\\n    \"$tmpfile\" \\\n    >/dev/null\n  awk '\n    BEGIN { FS=\"\\\"\"; RS=\",\" }\n    $2 == \"tag_name\" { sub(/^v/, \"\", $4); print $4 }\n  ' \"$tmpfile\"\n}\n\nasset_url() {\n  local repo bin release platform\n  repo=\"$1\"\n  bin=\"$2\"\n  release=\"$3\"\n  platform=\"$4\"\n  if [ \"$release\" != \"nightly\" ]; then\n    release=\"v$release\"\n  fi\n\n  need_cmd awk\n\n  local base_url manifest_url\n  base_url=\"https://github.com/$repo/releases/download/$release\"\n  manifest_url=\"$base_url/$bin.manifest.txt\"\n\n  local tmpfile\n  tmpfile=\"$(mktemp_file)\"\n  cleanup_file \"$tmpfile\"\n\n  download \"$manifest_url\" \"$tmpfile\" >/dev/null\n  awk -v platform=\"$platform\" -v base_url=\"$base_url\" '\n    $1 == platform { print base_url \"/\" $2; found = 1; exit }\n    END { if (!found) { exit 1 } }\n  ' \"$tmpfile\" \\\n    || {\n      echo >&2\n      warn \"Cannot find platform entry for '$platform' in $manifest_url\" >&2\n      return 1\n    }\n}\n\nverify_asset_sha256() {\n  local asset\n  asset=\"$1\"\n\n  need_cmd uname\n\n  info \"Verifying SHA256 checksum\"\n  case \"$(uname -s)\" in\n    FreeBSD)\n      if check_cmd sha256; then\n        need_cmd awk\n        indent sha256 -c \"$(awk '{print $1}' \"$asset.sha256\")\" \"$asset\"\n      fi\n      ;;\n    Linux)\n      if check_cmd sha256sum; then\n        indent sha256sum -c \"$asset.sha256\"\n      fi\n      ;;\n    Darwin)\n      if check_cmd shasum; then\n        indent shasum -c \"$asset.sha256\"\n      fi\n      ;;\n  esac\n}\n\nverify_asset_md5() {\n  local asset\n  asset=\"$1\"\n\n  need_cmd uname\n\n  info \"Verifying MD5 checksum\"\n  case \"$(uname -s)\" in\n    FreeBSD)\n      if check_cmd md5; then\n        need_cmd awk\n        indent md5 -c \"$(awk '{print $1}' \"$asset.md5\")\" \"$asset\"\n      fi\n      ;;\n    Linux)\n      if check_cmd md5sum; then\n        indent md5sum -c \"$asset.md5\"\n      fi\n      ;;\n    Darwin)\n      if check_cmd md5; then\n        need_cmd awk\n        local expected actual\n        expected=\"$(awk '{ print $1 }' \"$asset.md5\")\"\n        actual=\"$(md5 \"$asset\" | awk '{ print $NF }')\"\n        if [ \"$expected\" = \"$actual\" ]; then\n          indent echo \"$asset: OK\"\n        else\n          indent echo \"$asset: FAILED\"\n          indent echo \"md5: WARNING: 1 computed checksum did NOT match\"\n          return 1\n        fi\n      fi\n      ;;\n  esac\n}\n\nextract_asset() {\n  local asset\n  asset=\"$1\"\n\n  info \"Extracting $asset\"\n  case \"$asset\" in\n    *.tar.gz)\n      need_cmd tar\n      need_cmd zcat\n      zcat \"$asset\" | indent tar xvf -\n      ;;\n    *.zip)\n      need_cmd unzip\n      indent unzip \"$asset\"\n      ;;\n  esac\n}\n\ninstall_bin() {\n  local src dest\n  src=\"$1\"\n  dest=\"$2\"\n\n  need_cmd dirname\n  need_cmd install\n  need_cmd mkdir\n\n  info_start \"Installing '$dest'\"\n  mkdir -p \"$(dirname \"$dest\")\"\n  install -p -m 755 \"$src\" \"$dest\"\n  info_end\n}\n\n# BEGIN: libsh.sh\n\n#\n# Copyright 2019 Fletcher Nichol and/or applicable contributors.\n#\n# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or\n# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license (see\n# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. This\n# file may not be copied, modified, or distributed except according to those\n# terms.\n#\n# libsh.sh\n# --------\n# project: https://github.com/fnichol/libsh\n# author: Fletcher Nichol <fnichol@nichol.ca>\n# version: 0.9.0\n# distribution: libsh.full-minified.sh\n# commit-hash: e155f96bc281060342da4a19c26bf896f47de09c\n# commit-date: 2021-04-14\n# artifact: https://github.com/fnichol/libsh/releases/download/v0.9.0/libsh.full.sh\n# source: https://github.com/fnichol/libsh/tree/v0.9.0\n# archive: https://github.com/fnichol/libsh/archive/v0.9.0.tar.gz\n#\nif [ -n \"${KSH_VERSION:-}\" ]; then\n  eval \"local() { return 0; }\"\nfi\n# shellcheck disable=SC2120\nmktemp_directory() {\n  need_cmd mktemp\n  if [ -n \"${1:-}\" ]; then\n    mktemp -d \"$1/tmp.XXXXXX\"\n  else\n    mktemp -d 2>/dev/null || mktemp -d -t tmp\n  fi\n}\n# shellcheck disable=SC2120\nmktemp_file() {\n  need_cmd mktemp\n  if [ -n \"${1:-}\" ]; then\n    mktemp \"$1/tmp.XXXXXX\"\n  else\n    mktemp 2>/dev/null || mktemp -t tmp\n  fi\n}\ntrap_cleanup_files() {\n  set +e\n  if [ -n \"${__CLEANUP_FILES__:-}\" ] && [ -f \"$__CLEANUP_FILES__\" ]; then\n    local _file\n    while read -r _file; do\n      rm -f \"$_file\"\n    done <\"$__CLEANUP_FILES__\"\n    unset _file\n    rm -f \"$__CLEANUP_FILES__\"\n  fi\n}\nneed_cmd() {\n  if ! check_cmd \"$1\"; then\n    die \"Required command '$1' not found on PATH\"\n  fi\n}\ntrap_cleanups() {\n  set +e\n  trap_cleanup_directories\n  trap_cleanup_files\n}\nprint_version() {\n  local _program _version _verbose _sha _long_sha _date\n  _program=\"$1\"\n  _version=\"$2\"\n  _verbose=\"${3:-false}\"\n  _sha=\"${4:-}\"\n  _long_sha=\"${5:-}\"\n  _date=\"${6:-}\"\n  if [ -z \"$_sha\" ] || [ -z \"$_long_sha\" ] || [ -z \"$_date\" ]; then\n    if check_cmd git \\\n      && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then\n      if [ -z \"$_sha\" ]; then\n        _sha=\"$(git show -s --format=%h)\"\n        if ! git diff-index --quiet HEAD --; then\n          _sha=\"${_sha}-dirty\"\n        fi\n      fi\n      if [ -z \"$_long_sha\" ]; then\n        _long_sha=\"$(git show -s --format=%H)\"\n        case \"$_sha\" in\n          *-dirty) _long_sha=\"${_long_sha}-dirty\" ;;\n        esac\n      fi\n      if [ -z \"$_date\" ]; then\n        _date=\"$(git show -s --format=%ad --date=short)\"\n      fi\n    fi\n  fi\n  if [ -n \"$_sha\" ] && [ -n \"$_date\" ]; then\n    echo \"$_program $_version ($_sha $_date)\"\n  else\n    echo \"$_program $_version\"\n  fi\n  if [ \"$_verbose\" = \"true\" ]; then\n    echo \"release: $_version\"\n    if [ -n \"$_long_sha\" ]; then\n      echo \"commit-hash: $_long_sha\"\n    fi\n    if [ -n \"$_date\" ]; then\n      echo \"commit-date: $_date\"\n    fi\n  fi\n  unset _program _version _verbose _sha _long_sha _date\n}\nwarn() {\n  case \"${TERM:-}\" in\n    *term | alacritty | rxvt | screen | screen-* | tmux | tmux-* | xterm-*)\n      printf -- \"\\033[1;31;40m!!! \\033[1;37;40m%s\\033[0m\\n\" \"$1\"\n      ;;\n    *)\n      printf -- \"!!! %s\\n\" \"$1\"\n      ;;\n  esac\n}\nsection() {\n  case \"${TERM:-}\" in\n    *term | alacritty | rxvt | screen | screen-* | tmux | tmux-* | xterm-*)\n      printf -- \"\\033[1;36;40m--- \\033[1;37;40m%s\\033[0m\\n\" \"$1\"\n      ;;\n    *)\n      printf -- \"--- %s\\n\" \"$1\"\n      ;;\n  esac\n}\nsetup_cleanup_directories() {\n  if [ -z \"${__CLEANUP_DIRECTORIES__:-}\" ]; then\n    __CLEANUP_DIRECTORIES__=\"$(mktemp_file)\"\n    if [ -z \"$__CLEANUP_DIRECTORIES__\" ]; then\n      return 1\n    fi\n    export __CLEANUP_DIRECTORIES__\n  fi\n}\nsetup_cleanup_files() {\n  if [ -z \"${__CLEANUP_FILES__:-}\" ]; then\n    __CLEANUP_FILES__=\"$(mktemp_file)\"\n    if [ -z \"$__CLEANUP_FILES__\" ]; then\n      return 1\n    fi\n    export __CLEANUP_FILES__\n  fi\n}\nsetup_cleanups() {\n  setup_cleanup_directories\n  setup_cleanup_files\n}\nsetup_traps() {\n  local _sig\n  for _sig in HUP INT QUIT ALRM TERM; do\n    trap \"\n      $1\n      trap - $_sig EXIT\n      kill -s $_sig \"'\"$$\"' \"$_sig\"\n  done\n  if [ -n \"${ZSH_VERSION:-}\" ]; then\n    eval \"zshexit() { eval '$1'; }\"\n  else\n    # shellcheck disable=SC2064\n    trap \"$1\" EXIT\n  fi\n  unset _sig\n}\ntrap_cleanup_directories() {\n  set +e\n  if [ -n \"${__CLEANUP_DIRECTORIES__:-}\" ] \\\n    && [ -f \"$__CLEANUP_DIRECTORIES__\" ]; then\n    local _dir\n    while read -r _dir; do\n      rm -rf \"$_dir\"\n    done <\"$__CLEANUP_DIRECTORIES__\"\n    unset _dir\n    rm -f \"$__CLEANUP_DIRECTORIES__\"\n  fi\n}\ncheck_cmd() {\n  if ! command -v \"$1\" >/dev/null 2>&1; then\n    return 1\n  fi\n}\ncleanup_directory() {\n  setup_cleanup_directories\n  echo \"$1\" >>\"$__CLEANUP_DIRECTORIES__\"\n}\ncleanup_file() {\n  setup_cleanup_files\n  echo \"$1\" >>\"$__CLEANUP_FILES__\"\n}\ndie() {\n  case \"${TERM:-}\" in\n    *term | alacritty | rxvt | screen | screen-* | tmux | tmux-* | xterm-*)\n      printf -- \"\\n\\033[1;31;40mxxx \\033[1;37;40m%s\\033[0m\\n\\n\" \"$1\" >&2\n      ;;\n    *)\n      printf -- \"\\nxxx %s\\n\\n\" \"$1\" >&2\n      ;;\n  esac\n  exit 1\n}\ndownload() {\n  local _url _dst _code _orig_flags\n  _url=\"$1\"\n  _dst=\"$2\"\n  need_cmd sed\n  if check_cmd curl; then\n    info \"Downloading $_url to $_dst (curl)\"\n    _orig_flags=\"$-\"\n    set +e\n    curl -sSfL \"$_url\" -o \"$_dst\"\n    _code=\"$?\"\n    set \"-$(echo \"$_orig_flags\" | sed s/s//g)\"\n    if [ $_code -eq 0 ]; then\n      unset _url _dst _code _orig_flags\n      return 0\n    else\n      local _e\n      _e=\"curl failed to download file, perhaps curl doesn't have\"\n      _e=\"$_e SSL support and/or no CA certificates are present?\"\n      warn \"$_e\"\n      unset _e\n    fi\n  fi\n  if check_cmd wget; then\n    info \"Downloading $_url to $_dst (wget)\"\n    _orig_flags=\"$-\"\n    set +e\n    wget -q -O \"$_dst\" \"$_url\"\n    _code=\"$?\"\n    set \"-$(echo \"$_orig_flags\" | sed s/s//g)\"\n    if [ $_code -eq 0 ]; then\n      unset _url _dst _code _orig_flags\n      return 0\n    else\n      local _e\n      _e=\"wget failed to download file, perhaps wget doesn't have\"\n      _e=\"$_e SSL support and/or no CA certificates are present?\"\n      warn \"$_e\"\n      unset _e\n    fi\n  fi\n  if check_cmd ftp; then\n    info \"Downloading $_url to $_dst (ftp)\"\n    _orig_flags=\"$-\"\n    set +e\n    ftp -o \"$_dst\" \"$_url\"\n    _code=\"$?\"\n    set \"-$(echo \"$_orig_flags\" | sed s/s//g)\"\n    if [ $_code -eq 0 ]; then\n      unset _url _dst _code _orig_flags\n      return 0\n    else\n      local _e\n      _e=\"ftp failed to download file, perhaps ftp doesn't have\"\n      _e=\"$_e SSL support and/or no CA certificates are present?\"\n      warn \"$_e\"\n      unset _e\n    fi\n  fi\n  unset _url _dst _code _orig_flags\n  warn \"Downloading requires SSL-enabled 'curl', 'wget', or 'ftp' on PATH\"\n  return 1\n}\nindent() {\n  local _ecfile _ec _orig_flags\n  need_cmd cat\n  need_cmd rm\n  need_cmd sed\n  _ecfile=\"$(mktemp_file)\"\n  _orig_flags=\"$-\"\n  set +e\n  {\n    \"$@\" 2>&1\n    echo \"$?\" >\"$_ecfile\"\n  } | sed 's/^/       /'\n  set \"-$(echo \"$_orig_flags\" | sed s/s//g)\"\n  _ec=\"$(cat \"$_ecfile\")\"\n  rm -f \"$_ecfile\"\n  unset _ecfile _orig_flags\n  return \"${_ec:-5}\"\n}\ninfo() {\n  case \"${TERM:-}\" in\n    *term | alacritty | rxvt | screen | screen-* | tmux | tmux-* | xterm-*)\n      printf -- \"\\033[1;36;40m  - \\033[1;37;40m%s\\033[0m\\n\" \"$1\"\n      ;;\n    *)\n      printf -- \"  - %s\\n\" \"$1\"\n      ;;\n  esac\n}\ninfo_end() {\n  case \"${TERM:-}\" in\n    *term | alacritty | rxvt | screen | screen-* | tmux | tmux-* | xterm-*)\n      printf -- \"\\033[1;37;40m%s\\033[0m\\n\" \"done.\"\n      ;;\n    *)\n      printf -- \"%s\\n\" \"done.\"\n      ;;\n  esac\n}\ninfo_start() {\n  case \"${TERM:-}\" in\n    *term | alacritty | rxvt | screen | screen-* | tmux | tmux-* | xterm-*)\n      printf -- \"\\033[1;36;40m  - \\033[1;37;40m%s ... \\033[0m\" \"$1\"\n      ;;\n    *)\n      printf -- \"  - %s ... \" \"$1\"\n      ;;\n  esac\n}\n\n# END: libsh.sh\n\nmain \"$@\"\n"
  },
  {
    "path": "release.toml",
    "content": "pre-release-replacements = [\n  # Update CHANGELOG.md\n  { file=\"CHANGELOG.md\", prerelease=true, search=\"[Uu]nreleased\", replace=\"{{version}}\" },\n  { file=\"CHANGELOG.md\", prerelease=true, search=\"\\\\.\\\\.\\\\.HEAD\", replace=\"...{{tag_name}}\" },\n  { file=\"CHANGELOG.md\", prerelease=true, search=\"ReleaseDate\", replace=\"{{date}}\" },\n  { file=\"CHANGELOG.md\", prerelease=true, search=\"<!-- next-header -->\", replace=\"<!-- next-header -->\\n\\n## [Unreleased] - ReleaseDate\" },\n  { file=\"CHANGELOG.md\", prerelease=true, search=\"<!-- next-url -->\", replace=\"<!-- next-url -->\\n\\n[unreleased]: https://github.com/fnichol/{{crate_name}}/compare/{{tag_name}}...HEAD\" },\n  # Update html_root_url in lib.rs\n  { file = \"src/lib.rs\", search = \"\\\"https://docs.rs/[^\\\"]+\\\"\", replace = \"\\\"https://docs.rs/{{crate_name}}/{{version}}\\\"\", prerelease = true },\n  # Update dependencies usage of the form `{{crate_name}} = \"{{version}}\" (if present)\n  { file = \"src/lib.rs\", search = \"(?P<deps>//! \\\\[(dev-|build-)?dependencies\\\\])\\n(?P<crate_name>//! [[[:alnum:]]_-]+) = \\\"[^\\\"]+\\\"\\n\", replace = \"$deps\\n$crate_name = \\\"{{version}}\\\"\\n\", min = 0, prerelease = true },\n  # Update dependencies usage of the form `{{crate_name}} = { version = \"{{version}}\", ... } (if present)\n  { file = \"src/lib.rs\", search = \"(?P<deps>//! \\\\[(dev-|build-)?dependencies\\\\])\\n(?P<crate_name>//! [[[:alnum:]]_-]+) = \\\\{(?P<prever>.+)(?P<ver>version = )\\\"[^\\\"]+\\\"(?P<postver>.+)\\\\}\\n\", replace = \"$deps\\n$crate_name = {${prever}version = \\\"{{version}}\\\"$postver}\\n\", min = 0, prerelease = true },\n]\npre-release-hook = [\"cargo\", \"make\", \"release-pre-release-hook\"]\npre-release-commit-message = \"release: {{crate_name}} {{version}}\"\n\ntag-message = \"release: {{crate_name}} {{version}}\"\n\ndev-version-ext = \"dev\"\n\npost-release-replacements = [\n  # Update html_root_url in lib.rs\n  { file = \"src/lib.rs\", search = \"\\\"https://docs.rs/[^\\\"]+\\\"\", replace = \"\\\"https://docs.rs/{{crate_name}}/{{next_version}}\\\"\", prerelease = true },\n]\npost-release-commit-message = \"chore: start next iteration {{next_version}}\"\n\ndisable-publish = true\ndisable-push = true\n"
  },
  {
    "path": "src/bin/names.rs",
    "content": "use names::Generator;\n\nfn main() {\n    let args = cli::parse();\n\n    Generator::with_naming(args.naming())\n        .take(args.amount)\n        .for_each(|name| println!(\"{}\", name));\n}\n\nmod cli {\n    use clap::Parser;\n    use names::Name;\n\n    const AUTHOR: &str = concat!(env!(\"CARGO_PKG_AUTHORS\"), \"\\n\\n\");\n    const VERSION: &str = env!(\"CARGO_PKG_VERSION\");\n\n    pub(crate) fn parse() -> Args {\n        Args::parse()\n    }\n\n    /// A random name generator with results like \"delirious-pail\"\n    #[derive(Parser, Debug)]\n    #[clap(author = AUTHOR, version = VERSION)]\n    pub(crate) struct Args {\n        /// Adds a random number to the name(s)\n        #[clap(short, long)]\n        pub(crate) number: bool,\n\n        /// Number of names to generate\n        #[clap(default_value = \"1\", rename_all = \"screaming_snake_case\")]\n        pub(crate) amount: usize,\n    }\n\n    impl Args {\n        pub(crate) fn naming(&self) -> Name {\n            if self.number {\n                Name::Numbered\n            } else {\n                Name::default()\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/lib.rs",
    "content": "//! This crate provides a generate that constructs random name strings suitable\n//! for use in container instances, project names, application instances, etc.\n//!\n//! The name `Generator` implements the `Iterator` trait so it can be used with\n//! adapters, consumers, and in loops.\n//!\n//! ## Usage\n//!\n//! This crate is [on crates.io](https://crates.io/crates/names) and can be\n//! used by adding `names` to your dependencies in your project's `Cargo.toml`\n//! file:\n//!\n//! ```toml\n//! [dependencies]\n//! names = { version = \"0.14.0\", default-features = false }\n//! ```\n//! ## Examples\n//!\n//! ### Example: painless defaults\n//!\n//! The easiest way to get started is to use the default `Generator` to return\n//! a name:\n//!\n//! ```\n//! use names::Generator;\n//!\n//! let mut generator = Generator::default();\n//! println!(\"Your project is: {}\", generator.next().unwrap());\n//! // #=> \"Your project is: rusty-nail\"\n//! ```\n//!\n//! If more randomness is required, you can generate a name with a trailing\n//! 4-digit number:\n//!\n//! ```\n//! use names::{Generator, Name};\n//!\n//! let mut generator = Generator::with_naming(Name::Numbered);\n//! println!(\"Your project is: {}\", generator.next().unwrap());\n//! // #=> \"Your project is: pushy-pencil-5602\"\n//! ```\n//!\n//! ### Example: with custom dictionaries\n//!\n//! If you would rather supply your own custom adjective and noun word lists,\n//! you can provide your own by supplying 2 string slices. For example,\n//! this returns only one result:\n//!\n//! ```\n//! use names::{Generator, Name};\n//!\n//! let adjectives = &[\"imaginary\"];\n//! let nouns = &[\"roll\"];\n//! let mut generator = Generator::new(adjectives, nouns, Name::default());\n//!\n//! assert_eq!(\"imaginary-roll\", generator.next().unwrap());\n//! ```\n\n#![doc(html_root_url = \"https://docs.rs/names/0.14.1-dev\")]\n#![deny(missing_docs)]\n\nuse rand::{rngs::ThreadRng, seq::SliceRandom, Rng};\n\n/// List of English adjective words\npub const ADJECTIVES: &[&str] = &include!(concat!(env!(\"OUT_DIR\"), \"/adjectives.rs\"));\n\n/// List of English noun words\npub const NOUNS: &[&str] = &include!(concat!(env!(\"OUT_DIR\"), \"/nouns.rs\"));\n\n/// A naming strategy for the `Generator`\npub enum Name {\n    /// This represents a plain naming strategy of the form `\"ADJECTIVE-NOUN\"`\n    Plain,\n    /// This represents a naming strategy with a random number appended to the\n    /// end, of the form `\"ADJECTIVE-NOUN-NUMBER\"`\n    Numbered,\n}\n\nimpl Default for Name {\n    fn default() -> Self {\n        Name::Plain\n    }\n}\n\n/// A random name generator which combines an adjective, a noun, and an\n/// optional number\n///\n/// A `Generator` takes a slice of adjective and noun words strings and has\n/// a naming strategy (with or without a number appended).\npub struct Generator<'a> {\n    adjectives: &'a [&'a str],\n    nouns: &'a [&'a str],\n    naming: Name,\n    rng: ThreadRng,\n}\n\nimpl<'a> Generator<'a> {\n    /// Constructs a new `Generator<'a>`\n    ///\n    /// # Examples\n    ///\n    /// ```\n    /// use names::{Generator, Name};\n    ///\n    /// let adjectives = &[\"sassy\"];\n    /// let nouns = &[\"clocks\"];\n    /// let naming = Name::Plain;\n    ///\n    /// let mut generator = Generator::new(adjectives, nouns, naming);\n    ///\n    /// assert_eq!(\"sassy-clocks\", generator.next().unwrap());\n    /// ```\n    pub fn new(adjectives: &'a [&'a str], nouns: &'a [&'a str], naming: Name) -> Self {\n        Generator {\n            adjectives,\n            nouns,\n            naming,\n            rng: ThreadRng::default(),\n        }\n    }\n\n    /// Construct and returns a default `Generator<'a>` containing a large\n    /// collection of adjectives and nouns\n    ///\n    /// ```\n    /// use names::{Generator, Name};\n    ///\n    /// let mut generator = Generator::with_naming(Name::Plain);\n    ///\n    /// println!(\"My new name is: {}\", generator.next().unwrap());\n    /// ```\n    pub fn with_naming(naming: Name) -> Self {\n        Generator::new(ADJECTIVES, NOUNS, naming)\n    }\n}\n\nimpl<'a> Default for Generator<'a> {\n    fn default() -> Self {\n        Generator::new(ADJECTIVES, NOUNS, Name::default())\n    }\n}\n\nimpl<'a> Iterator for Generator<'a> {\n    type Item = String;\n\n    fn next(&mut self) -> Option<String> {\n        let adj = self.adjectives.choose(&mut self.rng).unwrap();\n        let noun = self.nouns.choose(&mut self.rng).unwrap();\n\n        Some(match self.naming {\n            Name::Plain => format!(\"{}-{}\", adj, noun),\n            Name::Numbered => format!(\"{}-{}-{:04}\", adj, noun, rand_num(&mut self.rng)),\n        })\n    }\n}\n\nfn rand_num(rng: &mut ThreadRng) -> u16 {\n    rng.gen_range(1..10000)\n}\n"
  },
  {
    "path": "tests/version-numbers.rs",
    "content": "#[test]\nfn test_readme_deps() {\n    version_sync::assert_markdown_deps_updated!(\"README.md\");\n\n    // TODO(fnichol): Ideally a code block updating tool can keep this up to date\n    // version_sync::assert_contains_regex!(\"README.md\", r#\"{name} --help$\\n^{name} {version}$\"#);\n}\n\n#[test]\nfn test_html_root_url() {\n    version_sync::assert_html_root_url_updated!(\"src/lib.rs\");\n}\n"
  },
  {
    "path": "vendor/cargo-make/Makefile.common.toml",
    "content": "[env]\nCARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = \"true\"\n\n[config]\nskip_core_tasks = true\n\n[tasks.default]\ndescription = \"Builds, tests, & checks the project\"\ndependencies = [\n  \"clean\",\n  \"build\",\n  \"test\",\n  \"check\",\n]\n\n[tasks.build]\ndescription = \"Builds all the targets\"\ncategory = \"Build\"\ndependencies = [\n  \"build-lib\",\n  \"build-bin\",\n]\n\n[tasks.build-bin]\ndescription = \"Builds the binaries\"\ncategory = \"Build\"\ncommand = \"cargo\"\nargs = [\"build\", \"--verbose\", \"--bins\", \"${@}\"]\n\n[tasks.build-lib]\ndescription = \"Builds the library\"\ncategory = \"Build\"\ncommand = \"cargo\"\nargs = [\"build\", \"--verbose\", \"--no-default-features\", \"--lib\", \"${@}\"]\n\n[tasks.build-release]\ndescription = \"Builds a release build\"\ncategory = \"Build\"\ncommand = \"cargo\"\nargs = [\"build\", \"--verbose\", \"--release\", \"${@}\"]\n\n[tasks.check]\ndescription = \"Checks all linting, formatting, & other rules\"\ncategory = \"Check\"\ndependencies = [\n  \"check-lint\",\n  \"check-format\",\n]\n\n[tasks.check-format]\ndescription = \"Checks all formatting\"\ncategory = \"Check\"\ndependencies = [\n  \"rustfmt-check\",\n  # \"readme-check\",\n]\n\n[tasks.check-lint]\ndescription = \"Checks all linting\"\ncategory = \"Check\"\ndependencies = [\n  \"clippy\",\n]\n\n[tasks.clean]\ndescription = \"Cleans the project\"\ncommand = \"cargo\"\nargs = [\"clean\", \"${@}\"]\n\n[tasks.clippy]\ndescription = \"Runs Clippy for linting\"\ncategory = \"Check\"\ndependencies = [\"install-clippy\"]\ncommand = \"cargo\"\nargs = [\"clippy\", \"--all-targets\", \"--all-features\", \"--\", \"-D\", \"warnings\"]\n\n[tasks.help]\ndescription = \"Displays this help\"\ncommand = \"cargo\"\nargs = [\"make\", \"--list-all-steps\"]\n\n[tasks.prepush]\ndescription = \"Runs all checks/tests required before pushing commits\"\ndependencies = [\n  \"check\",\n  \"test-no-args\",\n]\n\n[tasks.release-prepare]\ndescription = \"Prepares for a release\"\ncategory = \"Release\"\ndependencies = [\n  \"prepush\",\n  \"release-invoke-cargo-release\",\n  \"release-push-branch\",\n]\n\n[tasks.release-invoke-cargo-release]\ndescription = \"Invokes cargo release\"\ncategory = \"Release\"\ndependencies = [\"install-cargo-release\"]\ncommand = \"cargo\"\nargs = [\"release\", \"${@}\"]\n\n[tasks.release-pre-release-hook]\ndescription = \"Release preparation tasks\"\ncategory = \"Release\"\ndependencies = [\n  \"release-create-branch\",\n  \"readme\",\n  \"verify-version-numbers\",\n]\n\n[tasks.release-create-branch]\ndescription = \"Create a Git release branch\"\ncategory = \"Release\"\ncommand = \"git\"\nargs = [\"checkout\", \"-b\", \"release-${NEW_VERSION}\"]\n\n[tasks.release-push-branch]\ndescription = \"Pushes the current Git branch to the origin remote\"\ncategory = \"Release\"\ncommand = \"git\"\nargs = [\"push\", \"origin\", \"HEAD\"]\n\n[tasks.readme]\ndescription = \"Generates, updates, & formats the README\"\ncategory = \"Readme\"\ndependencies = [\n  \"readme-generate\",\n  \"readme-toc\",\n  \"readme-format\",\n]\n\n[tasks.readme-check]\ndescription = \"Checks the README freshness & formatting\"\ncategory = \"Check\"\ndependencies = [\n  \"readme-toc-check\",\n  \"readme-format-check\",\n]\n\n[tasks.readme-generate]\ndescription = \"Generates & updates the README\"\ncategory = \"Readme\"\ndependencies = [\"install-cargo-readme\"]\ncommand = \"cargo\"\nargs = [\"readme\", \"--output\", \"README.md\"]\n\n[tasks.readme-format]\ndescription = \"Formats the README\"\ncategory = \"Readme\"\ndependencies = [\"install-prettier\"]\ncommand = \"prettier\"\nargs = [\"--write\", \"README.md\"]\n\n[tasks.readme-format-check]\ndescription = \"Checks the README formatting\"\ncategory = \"Check\"\ndependencies = [\"install-prettier\"]\ncommand = \"prettier\"\nargs = [\"--check\", \"README.md\"]\n\n[tasks.readme-toc]\ndescription = \"Updates the README table of contents\"\ncategory = \"Readme\"\ndependencies = [\"install-mtoc\"]\ncommand = \"mtoc\"\nargs = [\"--in-place\", \"--format\", \"dashes\", \"README.md\"]\n\n[tasks.readme-toc-check]\ndescription = \"Checks the README table of contents\"\ncategory = \"Check\"\ndependencies = [\"install-mtoc\"]\ncommand = \"mtoc\"\nargs = [\"--check\", \"--format\", \"dashes\", \"README.md\"]\n\n[tasks.rustfmt]\ndescription = \"Runs Rustfmt to format code\"\ncategory = \"Format\"\ndependencies = [\"install-rustfmt\"]\ncommand = \"cargo\"\nargs = [\"fmt\", \"--verbose\", \"--\"]\n\n[tasks.rustfmt-check]\ndescription = \"Runs Rustfmt to check code formatting\"\ncategory = \"Check\"\ndependencies = [\"install-rustfmt\"]\ncommand = \"cargo\"\nargs = [\"fmt\", \"--verbose\", \"--\", \"--check\"]\n\n[tasks.test]\ndescription = \"Runs all the tests\"\ncategory = \"Test\"\ndependencies = [\n  \"test-lib\",\n  \"test-bin\",\n]\n\n[tasks.test-no-args]\nprivate = true\ndependencies = [\n  \"test-lib-no-args\",\n  \"test-bin-no-args\",\n]\n\n[tasks.test-lib]\ndescription = \"Runs all the library tests\"\ncategory = \"Test\"\ncommand = \"cargo\"\nargs = [\"test\", \"--no-default-features\", \"--lib\", \"${@}\"]\n\n[tasks.test-lib-no-args]\nprivate = true\ncommand = \"cargo\"\nargs = [\"test\", \"--no-default-features\", \"--lib\"]\n\n[tasks.test-bin]\ndescription = \"Runs all the binary tests\"\ncategory = \"Test\"\ncommand = \"cargo\"\nargs = [\"test\", \"--bins\", \"${@}\"]\n\n[tasks.test-bin-no-args]\nprivate = true\ncommand = \"cargo\"\nargs = [\"test\", \"--bins\"]\n\n[tasks.verify-version-numbers]\ncommand = \"cargo\"\ncategory = \"Test\"\nargs = [\"test\", \"--test\", \"version-numbers\"]\n\n[tasks.install-cargo-readme]\nprivate = true\n[tasks.install-cargo-readme.install_crate]\ncrate_name = \"cargo-readme\"\nbinary = \"cargo-readme\"\ntest_arg = \"--help\"\n\n[tasks.install-cargo-release]\nprivate = true\n[tasks.install-cargo-release.install_crate]\ncrate_name = \"cargo-release\"\nbinary = \"cargo-release\"\ntest_arg = \"--help\"\n\n[tasks.install-clippy]\nprivate = true\n[tasks.install-clippy.install_crate]\nrustup_component_name = \"clippy\"\nbinary = \"cargo-clippy\"\ntest_arg = \"--help\"\n\n[tasks.install-mtoc]\nprivate = true\n[tasks.install-mtoc.install_crate]\ncrate_name = \"mtoc\"\nbinary = \"mtoc\"\ntest_arg = \"--help\"\n\n[tasks.install-prettier]\nprivate = true\ninstall_script = '''\n  if ! command -v prettier; then\n    npm install --global prettier\n  fi\n'''\n[tasks.install-prettier.windows]\ninstall_script = '''\n  if (-Not (Get-Command prettier -ErrorAction SilentlyContinue)) {\n    npm install --global prettier\n  }\n'''\n\n[tasks.install-rustfmt]\nprivate = true\n[tasks.install-rustfmt.install_crate]\nrustup_component_name = \"rustfmt\"\nbinary = \"rustfmt\"\ntest_arg = \"--help\"\n"
  }
]