Skip to content

Conversation

@Iture
Copy link

@Iture Iture commented Mar 25, 2025

Changes add number of features:

  • ingredients marked within Mealie as "on hand" are not added to the shopping list
  • UUIDs of items on shopping list are not generated each time, but taken from Mealie. This provides ability to update items from specific recipes instead of adding them each time
  • food names are capitalized - it eases recognizing them by Bring! API (way of translating names in bring-api library is very straightforward and requires exact form)

Iture added 3 commits March 24, 2025 23:38
- Added UUID generation for ingredients if not provided in raw data. fixes #3
- Introduced in_household method to determine if an ingredient is present in household data.
- Updated from_raw_data method to accommodate new UUID and specification handling.
- Modified webhook_handler to ignore ingredients present in household data. Ignore ingredients already in household #1
@Iture Iture marked this pull request as ready for review March 25, 2025 19:12
@felixschndr
Copy link
Owner

Thank you for your contribution! I will take a look at it in the next few days :)

@felixschndr felixschndr added the enhancement New feature or request label Mar 26, 2025
@felixschndr felixschndr self-requested a review March 26, 2025 12:25
@felixschndr
Copy link
Owner

ingredients marked within Mealie as "on hand" are not added to the shopping list

Can you please clarify what "on hand" means? This isn't the checkboxes next to the ingredients, right?
image

@felixschndr
Copy link
Owner

UUIDs of items on shopping list are not generated each time, but taken from Mealie. This provides ability to update items from specific recipes instead of adding them each time

I am not sure about that change. Currently we dont update any ingredients on the list.

I dit that such that it is possible to add ingredients multiple times. This is necessary if you want to make a multiple of a portion (e.g. 4 servings instead of 2 --> add them twice through the integration). See #15 (comment)
In the current form the food is only added to Bring once.
If we use the UUIDs of Mealie we would have to update the quantity of the food in Bring (check if is already on the list, if so update the quantity, if not add it). I think this would be quite elegant. Would you mind taking a look at that? Otherwise I will do it.

(this is

When I work on #13 (comment) I guess I could check whether an item is already on the list and then update it. Then you could sent the request twice and the ingredients would be added accordingly.

from #15 (comment) but I forgot to implement that)

Copy link
Owner

@felixschndr felixschndr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments above

@Iture
Copy link
Author

Iture commented Mar 26, 2025

ingredients marked within Mealie as "on hand" are not added to the shopping list

Can you please clarify what "on hand" means? This isn't the checkboxes next to the ingredients, right?

I'm talking about this
image
This flag (in Mealie) marks ingredient as generally available in a household. When you add ingredients from the recipe to the shopping list (in mealie), such marked items are checked by default.

@Iture
Copy link
Author

Iture commented Mar 26, 2025

UUIDs of items on shopping list are not generated each time, but taken from Mealie. This provides ability to update items from specific recipes instead of adding them each time

I am not sure about that change. Currently we dont update any ingredients on the list.

I dit that such that it is possible to add ingredients multiple times. This is necessary if you want to make a multiple of a portion (e.g. 4 servings instead of 2 --> add them twice through the integration). See #15 (comment) In the current form the food is only added to Bring once. If we use the UUIDs of Mealie we would have to update the quantity of the food in Bring (check if is already on the list, if so update the quantity, if not add it). I think this would be quite elegant. Would you mind taking a look at that? Otherwise I will do it.

  • UUID used by me, is linked with food in specific recipe. It means that if you want to add the same product from two different recipes, it will be added twice. Actually (if food is recognized by Bring!) amounts will be added under the same item on the list
  • Yes, I verified it - unfortunately, if you use shopping list in mealie, everything is OK, amounts of food is recalculated. for recipe actions, not. Anyway, personally I would rely on manually updating amount in Bring if necessary, and would try to find another way for integration (maybe on notifications about shopping list changes? needs checking).

@felixschndr
Copy link
Owner

felixschndr commented Mar 27, 2025

ingredients marked within Mealie as "on hand" are not added to the shopping list

Can you please clarify what "on hand" means? This isn't the checkboxes next to the ingredients, right?

I'm talking about this image This flag (in Mealie) marks ingredient as generally available in a household. When you add ingredients from the recipe to the shopping list (in mealie), such marked items are checked by default.

Oh, that's brilliant. I did not know that this feature existed. I am thinking about ditching the IGNORED_INGREDIENTS env variable entirely to be replaced by that.

(regarding the UUIDs: I will come back to you when I had some more time to look into that, probably on the weekend)

@felixschndr
Copy link
Owner

ingredients marked within Mealie as "on hand" are not added to the shopping list

I like that. I will replace IGNORED_INGREDIENTS with it

@felixschndr
Copy link
Owner

Took care of the ignored ingredients, will take a look at the UUIDs another time

@felixschndr
Copy link
Owner

food names are capitalized - it eases recognizing them by Bring! API (way of translating names in bring-api library is very straightforward and requires exact form)

Implemented in 8f5d330

@felixschndr
Copy link
Owner

UUID used by me, is linked with food in specific recipe. It means that if you want to add the same product from two different recipes, it will be added twice. Actually (if food is recognized by Bring!) amounts will be added under the same item on the list
Yes, I verified it - unfortunately, if you use shopping list in mealie, everything is OK, amounts of food is recalculated. for recipe actions, not. Anyway, personally I would rely on manually updating amount in Bring if necessary, and would try to find another way for integration (maybe on notifications about shopping list changes? needs checking).

I currently seem to completely understand the benefit of not using random UUIDs and instead using the ones from Mealie as with my approach it is possible to rerun the recipe action to add ingredients multiple times if you want to add multiples of a portion. By using Mealies UUIDs the ingredients are not added multiple times.

As a future step before adding an ingredient I't like to check whether it is already on the list and if so increase its amount accordingly.

Can you please clarify the benefits of using Mealies UUIDs for me?

@felixschndr
Copy link
Owner

Did not hear from you. The way to ignore ingredients was updated in #24 and the old way was removed in #27.

@felixschndr felixschndr closed this Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants