A module containing data to decode SMWS (Single Malt Whisky Society) Code Numbers.
A single file, data.json, containing mappings for SMWS codes.
You can download data.json
into your build pipeline, with something like this:
- name: Download artifact smws codes
uses: dsaltares/fetch-gh-release-asset
with:
token: ${{ secrets.GITHUB_TOKEN }}
file: "data.json"
repo: "elliottback/SMWS_Codes"
target: "./data/data.json"
A dictionary of dictionaries, the root-level key being the SMWS code, mapping to a dictionary of:
- status - active or inactive
- region - region in Scotland, or the country of origin
- name - the distillery name
- type - single malt, gin, rum, etc
{
"1": {
"status": "active",
"region": "Speyside",
"name": "Glenfarclas",
"type": "Single Malt"
}
}
When matching say 140.1
, make sure you try to match to the longest key in the dictionary, otherwise you may match 40.1
by mistake.
Please feel free to submit a PR if there is missing/bad data.