Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More control over frame number identification #5

Open
rsgalloway opened this issue Apr 14, 2014 · 4 comments
Open

More control over frame number identification #5

rsgalloway opened this issue Apr 14, 2014 · 4 comments
Assignees
Labels
Milestone

Comments

@rsgalloway
Copy link
Owner

Need the abiliy for more control over identifying what is and what is not a frame number for given filenames that may contain other numeric characters which can be falsely identified as a frame number and grouped into a sequence.

  • It would be good to be able to both positively and negatively identify frame numbers for the following cases:
    • a known fixed, frame number pattern
    • a known non-frame number pattern, but unknown or variable frame number patterns
  • It would be good if the control could be set without changing any code, for example using an environment variable.

( Duplicate of #4 )

@rsgalloway
Copy link
Owner Author

I think the simplest thing to do here would be to add a new optional env var to positively identify frame number patterns and a corresponding one for non-frame pattern.

@rsgalloway rsgalloway added this to the 0.5.1 milestone Nov 16, 2017
@broganross
Copy link

What about one env var with a ":" or ";" separated list of patterns? Seems unlikely that someone would put one of those characters in the path.
Example:
PYSEQ_PATTERN="\w+.\d{6}.\w{3,4}:left|right"

@rsgalloway
Copy link
Owner Author

rsgalloway commented Nov 16, 2017

I'd like to stick to valid regex syntax if possible. On second thought though it should be possible to have both of these things expressed in the same regex string, e.g.

digits_re = re.compile(r'\d+(?!_v\d+_)')

would negatively identify files with _v001_ as the frame number. So I think the answer is to just support a env var to override the default, e.g.

digits_re = re.compile(os.getenv('PYSEQ_FRAME_REGEX', r'\d+'))

@broganross
Copy link

I might have been thinking of something else with the multiple regexs. After rereading the env var does make the most sense to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants