-
Notifications
You must be signed in to change notification settings - Fork 293
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
otiotool command line utility #1375
Conversation
Signed-off-by: Joshua Minor <[email protected]>
Signed-off-by: Joshua Minor <[email protected]>
Signed-off-by: Joshua Minor <[email protected]>
Signed-off-by: Joshua Minor <[email protected]>
Signed-off-by: Joshua Minor <[email protected]>
Signed-off-by: Joshua Minor <[email protected]>
This is awesome! |
Codecov Report
@@ Coverage Diff @@
## main #1375 +/- ##
==========================================
- Coverage 86.27% 86.02% -0.26%
==========================================
Files 196 200 +4
Lines 19865 20859 +994
Branches 2309 2459 +150
==========================================
+ Hits 17138 17943 +805
- Misses 2161 2315 +154
- Partials 566 601 +35
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Anyone want to help add tests for this and/or port it to work in Python 2.7? |
I can take a look at python 2 support. What's the time frame for when you'd like it done? |
That would be great @apetrynet - no hurry at all. |
Co-authored-by: apetrynet <[email protected]> Signed-off-by: Joshua Minor <[email protected]>
Signed-off-by: Joshua Minor <[email protected]>
Signed-off-by: Joshua Minor <[email protected]>
Signed-off-by: Joshua Minor <[email protected]>
Signed-off-by: Joshua Minor <[email protected]>
Signed-off-by: Joshua Minor <[email protected]>
Signed-off-by: Joshua Minor <[email protected]>
Signed-off-by: Joshua Minor <[email protected]>
Signed-off-by: Joshua Minor <[email protected]>
Signed-off-by: Joshua Minor <[email protected]>
Signed-off-by: Joshua Minor <[email protected]>
Josh, in addition to the command line arguments, it could make sense to also accept a response file as input. The thought would be have arguments decomposed one per line, perhaps with a simple ${1} ${2} style syntax, in order to ease repetitive or common invocations. trivial example: no-video.txt
Perhaps ${n} isn't necessary, and positional logic could suffice.
I don't mean to predicate landing the tool on such a feature, it's a suggestion for a follow on feature. |
Signed-off-by: Joshua Minor <[email protected]>
@meshula that's a good suggestion. I sort of wonder, also, if it could be extended in the future to allow for more complex chains of operations (ala ffmpeg's pipelines) but I opted to keep it fixed-pipeline for now for simplicity. You can chain multiple executions together via the |
Do we list these packed-in applications anywhere? I wonder if we should list them in the README or make a "included console programs" doc page or something just so that folks know they are there. Or is this obvious? I feel like I'm kind of too deep in to have a sense for how discoverable or not these scripts are. |
@ssteinbach we could really use a front door that looks like OCIO's. https://opencolorio.org that would be a great place to provide pointers to bundled tools. but also listing them in the root README.md makes sense. |
oh yeah wow, thats really nice. I haven't looked at that in a while, good suggestion. So maybe we defer that to a later PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!
Its great you added all these tests. I was recently profiling the unit tests out of curiosity and noticed that the shellout tests are some of the slowest because its slow to call out to the shell -- it makes me wonder, especially if we're adding another big hunk of tests -- if we should disable the shell out tests by default, and enable them with an env var (so that CI can still run them that way). That would help with local iteration.
Thats more of a thought for the future though.
Signed-off-by: Joshua Minor <[email protected]> Co-authored-by: apetrynet <[email protected]> Signed-off-by: Michele Spina <[email protected]>
This PR adds a new multi-purpose command line utility, otiotool. Patterned after the amazingly helpful oiiotool command line utility included with OpenImageIO, this utility provides a collection of modular, reusable, small operations which can be combined into high level operations on the command line.
As an overview of what otiotool does, here is the command line usage statement:
In addition to being a helpful tool, the code within otiotool is made up of many small, clear, examples of performing common operations with OTIO. These small functions aim to be useful as a starting point for working with OTIO in larger applications.
For example, the question "How can I stack multiple timelines on top of each other?" can be answered with a link to one of these functions: https://github.com/jminor/OpenTimelineIO/blob/otiotool2/src/py-opentimelineio/opentimelineio/console/otiotool.py#L455
Note: This PR needs unit tests. If you would like to help with that, feel free to volunteer :)