New functions for converting BF recipes eventually.

This commit is contained in:
Chris Giacofei 2024-06-17 16:22:44 -04:00
parent 1eab86e5ae
commit cd66ff1f50

View File

@ -45,6 +45,14 @@ BREWFATHER_CONVERT_LOOKUP = { # local_name: brewfather_name
} }
} }
def BF_from_local(category, name):
return BREWFATHER_CONVERT_LOOKUP[category][name]
def local_from_BF(category, name):
local_keys = list(BREWFATHER_CONVERT_LOOKUP[category].keys())
bf_keys = list(BREWFATHER_CONVERT_LOOKUP[category].values())
return local_keys[bf_keys.index(name)]
def get_batches(api_user, api_key, batch=''): def get_batches(api_user, api_key, batch=''):
auth_string = api_user + ':' + api_key auth_string = api_user + ':' + api_key