Repository navigation
Proposal: add unit system metadata - #148
LukaHummel wants to merge 1 commit into
Conversation
|
Hey, sorry, just noticed your proposal, will have a look next few days. |
|
I think the proposal touches upon a real problem for consumer applications related to ambiguous units. However:
I could suggest to simply suggest defining the |
|
Agreed |
|
Up front: this overlaps heavily with the locale and unit work I mentioned on Discord, and I have not settled how to present that, likely a proposal of its own in the coming week. So read this as comments on yours rather than a counter-proposal. Density is out of scope here. It deserves a proposal of its own, so I am not commenting on it in this thread or in #166. It has nothing to do with unit systems or unit parsing, it needs ingredient data where the rest needs definitions, and it is a new capability rather than a fix to an existing one. Numbered so they are easy to reply to. Worth flagging
Agreements
Suggestions
|
Summary
unit systemmetadata keymetric,imperial, andus customarysource-system valuesMotivation
Cooklang supports serving-based scaling, but clients do not have a portable source-system hint for unit conversion. This proposal lets recipe authors distinguish systems such as British Imperial and US customary while leaving conversion tables, rounding, target units, and presentation policy to each client.
This addresses #142.
Impact
The proposal does not change Cooklang grammar or require clients to implement conversion. Existing parsers can expose the key through generic YAML metadata, and clients without conversion support continue rendering recipes unchanged.
Full Proposal