Coder Social home page Coder Social logo

party's Introduction

party

Build Status

CLI command to calculate amounts of pizzas and drinks for a party.

Installation

macOS

$ brew tap ttskch/party
$ brew install party

Other

$ git clone [email protected]:ttskch/party.git
$ cd party
$ composer install
$ ln -s $(pwd)/bin/party /usr/local/bin/party

Usage

$ party
How many people? : 15
How much is budget per person? : 2000
+-------------------------------+-----+-------+
| What you have to buy          | Num | Price |
+-------------------------------+-----+-------+
| Pizza (L)                     | 8   | 24000 |
| Cans of beer                  | 16  | 3680  |
| Cans of other alcohol         | 8   | 1600  |
| Bottles of non-alcohol (1.5L) | 2   | 400   |
+-------------------------------+-----+-------+
| Total                         | -   | 29680 |
| Average                       | -   | 1979  |
+-------------------------------+-----+-------+
+--------------------+-----+
| Amounts per person | Num |
+--------------------+-----+
| Pizza (pieces)     | 4.3 |
| Drink (cans/cups)  | 2.2 |
+--------------------+-----+

Configure

$ party config
[SUCCESS] "/path/to/home/.config/party/config.yaml" is created. Modify it if you need.
$ vi ~/.config/party/config.yaml

and tailor it to your needs.

version: 1.0.0

# how people drink beer, other alcohol and non alcohol are distributed (total number is meaningless)
distribution_rates:
  beer: 10
  other_alcohol: 5
  non_alcohol: 5

# how many cups 1 bottle of non alcohol can be divided to
cups_for_one_non_alcohol: 4.3 # 1500 / 350 = 4.2857...

# how many pieces of L size pizza for 1 can/cup of drink
pizza_pieces_for_one_drink: 2.5

# JPY and MXN are supported (please add your currency to https://github.com/ttskch/party)
currency: JPY

party's People

Contributors

ttskch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.