Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<YEAST>...</YEAST> records missing TYPE tag #2

Open
matty0ung opened this issue Sep 6, 2023 · 2 comments
Open

<YEAST>...</YEAST> records missing TYPE tag #2

matty0ung opened this issue Sep 6, 2023 · 2 comments

Comments

@matty0ung
Copy link

In, eg, https://github.com/stuartraetaylor/diydog-beerxml/blob/master/5am_saint.xml, the <YEAST>...</YEAST> record is missing a <TYPE>...</TYPE> entry. It's a required tag that should contain one of “Ale”, “Lager”, “Wheat”, “Wine” or “Champagne”.

@stuartraetaylor
Copy link
Owner

This one is a bit more difficult since the data source that the exporter uses for the yeasts doesn't have that information. I'll leave this open until there is a solution.

@matty0ung
Copy link
Author

No worries. I did wonder if that might be the reason.

Maybe you could do some sort of lookup? A quick text search suggests there are only 18 yeasts used across the 325 recipes:

Fermentis US-05 Safale US-05
White Labs WLP013 London Ale Yeast
White Labs WLP099 Super High Gravity Ale Yeast
White Labs WLP351 Bavarian Weizen Yeast
White Labs WLP500 Trappist Ale Yeast
Wyeast 1010 American Wheat
Wyeast 1056 American Ale
Wyeast 1272 American Ale II
Wyeast 1388 Belgian Strong Ale
Wyeast 2007 Pilsen Lager
Wyeast 2124 Bohemian Lager
Wyeast 3333 German Wheat
Wyeast 3522 Belgian Ardennes
Wyeast 3638 Bavarian Wheat
Wyeast 3711 French Saison
Wyeast 3724 Belgian Saison
Wyeast 3787 Trappist High Gravity
Wyeast 3944 Belgian Wit

Maybe a look-up table from PRODUCT_ID to TYPE?

(I got the above list with cat *.xml | awk '/<NAME>/ {name = $0; gsub(" *</?NAME> *", "", name)} /LABORATORY/ {lab = $0; gsub(" *</?LABORATORY> *", "", lab)} /PRODUCT_ID/ {prod_id = $0; gsub(" *</?PRODUCT_ID> *", "", prod_id); print lab " " prod_id " " name}' | sort -u, which is not the most elegant awk script, but seems to work.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants