# `mix list_split_assign`
[🔗](https://github.com/jaizendra-netizen/list_split_assign/blob/main/lib/mix/tasks/list_split_assign.ex#L1)

Usage: `mix list_split_assign list.csv [--groups 2] [--seed seed] [--out assigned.csv]`

CSV columns: id, segment. `--groups` is an integer from 2 to 26 (default 2), `--seed`
is any text (default "seed", set by you). The group of an id is
`:erlang.phash2({seed, lowercased_id}, groups)` as a letter A, B, C and so on.
`--out FILE` writes a CSV with the columns id, segment, group in input order.

Exit code 0 on success, 2 when the input cannot be read or the arguments are wrong.
Background: https://www.onegtmlab.dev/tool-directory/compare/instantly-vs-saleshandy

# `execute`

```elixir
@spec execute([String.t()]) :: {:ok, String.t()} | {:error, String.t()}
```

Run the split. Returns `{:ok, output}` or `{:error, message}`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
