Skip to content

Instantly share code, notes, and snippets.

@MiCurry
Created March 18, 2018 22:20
Show Gist options
  • Save MiCurry/cdbc1a4c54584ee284f526bc3322d7c9 to your computer and use it in GitHub Desktop.
Save MiCurry/cdbc1a4c54584ee284f526bc3322d7c9 to your computer and use it in GitHub Desktop.
kombucha batch calculator
# 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