Skip to content

feat(oiiotool): enhance expressions with string formatting operator #5208

Description

@lgritz

It would be handy for the command line expression syntax (things like {2 * TOP.width}) had a fully general way to do string formatting.

This may be kind of involved, but I think it's worth doing.

We'll use this issue to track progress and flesh out a spec for it.

As a motivating example, see #5207, where we posit the utility of something like

--offset "{format('{:+}{:+}',X,Y}"

There's a bit of ugliness coming from the fact that we use {} in oiiotool for indicating expressions, but also {} inside the format specifications, and I'm not sure if it will end up needing special quoting. But the advantage of going for a fully general formatting utility that can be used in expression evaluation means that it not only solves your problem, but likely also unlocks a whole bunch of interesting additional usages.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions