Skip to content

Add syntax for using items only once #31

@fdb

Description

@fdb

When creating a new project it's often useful to only use terms once.

E.g. if you have a list of names or topics, you only want Seed to select from the list, but never show the same thing more than once.

We already have a syntax for re-using a selection:

{{ topic:one }}

I propose using the syntax for distinct elements:

{{ topic:~site }}

Internally what this does is generate a list of indices, one for each option, shuffled in random order. E.g. if a list of topics has 5 items the indices could look like this:

4 2 1 0 3

This implies that if you have 5 items, you can only use the {{ topic:~site }} token 5 times. If you use it more than 5 times, the list of indices is repeated (e.g. 4 2 1 0 3 4 2 1 0 3 ...).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions