Skip to main content
100%

ironpairs

✓ Published0🌍 Public
Aabernier
Last edited Sep 9, 2019
Created on Feb 18, 2019

This example generates round-robin pairings from a pasted list of names, producing a spreadsheet-ready table of unique pair combinations. The command-line tool reads names via standard input and uses the `roundrobin` library to create pairings across a specified number of rounds, with extra logic to handle odd group sizes by assigning trios. The output is formatted as tab-separated quoted cells, each containing multiple pairing lines for direct pasting into a spreadsheet. The code relies on Node.js process arguments and stdin streams to handle data flow between clipboard and spreadsheet.

AI-generated description
  1. Open a terminal and paste the following command ☝️😲WITHOUT EXECUTING IT:<br><br>
    pbpaste | npx https://gist.github.com/abernier/00ac26ff978aebdfa6f3f65019fe2bf0 10 | pbcopy
    
    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/67030/Screenshot%202019-09-09%20at%2013.37.19.png" width="450"><br> NB: 10 being the number of combinations wanted<br>
  2. In a spreadsheet, copy rows of names:<br><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/67030/Screenshot%202019-09-05%20at%2020.40.36.png" width="450">
  3. In the previous terminal, press now ENTER to execute the pasted command at step 0.:<br><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/67030/Screenshot%202019-09-09%20at%2013.37.04.png" width="450">
  4. Paste the result into spreadsheet<br><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/67030/Screenshot%202019-09-05%20at%2020.42.36.png" width="450">

Similar vizzes