groupem
A CLI-tool to divide a list of things into different groups of things.
Takes a file with items separated with newline.
Installation
npm install --global groupem
Usage
Usage
$ groupem <input>
Options
--size, -s size of groups
--random, -r randomize array
--format, -f output format: 'md' or 'txt'
--terminal -t output to terminal instead of file
Examples:
# Split list into groups of 4
$ groupem list.txt -s 4
# Randomize output
$ groupem list.txt -r -s 3
# Write to markdown table
$ groupem list.txt -s 3 -f md
Example
$ groupem list.txt -s 3 -f md
list.txt
Steve Van Greeben
Jorien Faandegeer
Juanita Arbol
Gorm Lindström
Odd Erixson
Dorma Golaga
output.md
| | |
|---|---|
| 1 | Steve Van Greeben, Jorien Faandegeer, Juanita Arbol, |
| 2 | Gorm Lindström, Odd Erixson, Dorma Golaga, |
Tests
npm test
Todo
- Make so you can name the output file
- More error handling regarding path
- Clean up main function (less
if/else
-branches in main function) - More testing? Testing I/O, relevant?