Coder Social home page Coder Social logo

georgelee1 / daygroups.js Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 15 KB

A small simple utility that auto picks people with defined availability into as few as possible groups of days, balancing the numbers as evenly across days.

License: MIT License

JavaScript 100.00%

daygroups.js's Introduction

Day Groups

A small simple utility that auto picks people with defined availability into as few as possible groups of days, balancing the numbers as evenly across days.

Input (data.txt)

Input is a CSV file. Any column that is not a number is assumed part of the name, otherwise the day availability Mon-Sun (1-7)

PersonOne,1,2
PersonTwo,1,3
PersonThree,3
PersonFour,1,2
PersonFive,1,2
PersonSix,2,3
PersonSeven,4,5
PersonEight,5

Run

yarn start [options] <file>

Example:

yarn start --days 1,2,3 --output output.txt data.txt

Options

-V, --version         output the version number
-d, --days <days>     The days in which to restrict groupings to eg. "1,2,3", defaults to all days
-o, --output [value]  Output file location, defaults to output.txt
-h, --help            output usage information

Output (console)

Total Days: 3
Days (size): Mon (2) | Tue (2) | Wed (2)
Total People: 8
Total Included People: 6
Excluded People: PersonSeven | PersonEight

Output (output.txt)

/////////////////////////
Monday (2)
/////////////////////////
PersonFour
PersonFive
/////////////////////////
Tuesday (2)
/////////////////////////
PersonSix
PersonOne
/////////////////////////
Wednesday (2)
/////////////////////////
PersonThree
PersonTwo

daygroups.js's People

Contributors

georgelee1 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.