Skip to content

Add "auto_expand" to generate identifier variations #28

@ungive

Description

@ungive

Instead of manually defining "APP", "App" and "app" for many win_smtc identifiers, one could automatically generate all three variants in the build scripts for any !app (case-insensitive) suffixes in win_smtc identifiers. A special auto_expand: and app_user_model_id: auto_expand: key could be used to document in the media player definition, that the identifier isn't taken as is:

win_smtc:
  - auto_expand: AppleInc.AppleMusicWin_nzyj5cx40ttqa!App
  # valid alternatives which all lead to the same result:
  # - expand: AppleInc.AppleMusicWin_nzyj5cx40ttqa!APP
  # - expand: AppleInc.AppleMusicWin_nzyj5cx40ttqa!app

Results in:

win_smtc:
  - AppleInc.AppleMusicWin_nzyj5cx40ttqa!APP
  - AppleInc.AppleMusicWin_nzyj5cx40ttqa!App
  - AppleInc.AppleMusicWin_nzyj5cx40ttqa!app

This would also allow for future automatic expansion rules, should any ever be needed. The key should be called auto_expand instead of e.g. just expand so that it's clear that this is an automatic step. In the future expand could be used to compress repetitive definitions into e.g. {Cc}ider or ...!{App,app,APP}, when different substrings are possible in individual cases.

Result of #27.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions