Created
March 18, 2018 22:20
-
-
Save MiCurry/cdbc1a4c54584ee284f526bc3322d7c9 to your computer and use it in GitHub Desktop.
kombucha batch calculator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Calculates the ingridents for each part based on the number gallons | |
# for the total batch. 110% because I was lazy! | |
import argparse | |
parser = argparse.ArgumentParser(description="Easy way to cacluate how much\ | |
'things you need per quanity of kombuhca") | |
parser.add_argument('-b', '--batch', type=float, | |
help='Float - Gallons of desired batch size') | |
args = parser.parse_args() | |
def convert_gallons_to_cups(gallons): | |
return float(gallons * 16) | |
def convert_cups_to_gallons(cups): | |
return float(cups / 16) | |
batch = convert_gallons_to_cups(args.batch) | |
water = batch / (1.17) | |
sugar = batch / (16) | |
tea = batch / (2) | |
starter = batch / (8) | |
print convert_cups_to_gallons(batch)," gallon batch:" | |
print " water: ", format(water, '.1f'), " cup(s)" | |
print " sugar: ", sugar, " cup(s)" | |
print "tea bags: ", tea, "bag(s)" | |
print " starter: ", starter, "cup(s)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment