You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow array types to be specified multiple times on the command line, where each time it's specified you just append the item to the array.
This is a pretty common feature used by some video converting tools (ffmpeg, handbrake, etc).
ie: transcode_video supports multiple 'target' options, some for file/encoding size and others for encoding speed. So this is a perfectly valid command: transcode-video --target big --target quick --output /path/to/output /path/to/file
The --target big option will perform a higher quality encoding, resulting in a larger file size and slower encode. The --target quick option performs other optimizations that speed up the encoding without noticeably reducing the quality and only increasing the file size by a small amount.
The text was updated successfully, but these errors were encountered:
I've forked this and begun trying to implement it myself and it is a bit more complex than I'd hoped because of the current design. I'll see if I can't figure it out without changing too much, but we'll see how plausible this really is.
I could easily make Array conform to FlagValue and just split results on a comma or some designated separator, but then you could run into issues where your whole input string and its individual values may both contain the separator character and you've got to figure out how to distinguish between them. So I'd rather have the more familiar usage of just specify an argument multiple times to avoid this kind of complexity.
@Ponyboy47 Thanks for trying this. I agree that options should be able to be used multiple times, as it follows the POSIX guidelines. Awaiting your PR.
Basically, conditionally conform Array to FlagValue:
Allow array types to be specified multiple times on the command line, where each time it's specified you just append the item to the array.
This is a pretty common feature used by some video converting tools (ffmpeg, handbrake, etc).
ie: transcode_video supports multiple 'target' options, some for file/encoding size and others for encoding speed. So this is a perfectly valid command:
transcode-video --target big --target quick --output /path/to/output /path/to/file
The
--target big
option will perform a higher quality encoding, resulting in a larger file size and slower encode. The--target quick
option performs other optimizations that speed up the encoding without noticeably reducing the quality and only increasing the file size by a small amount.The text was updated successfully, but these errors were encountered: