ogham / exa

A modern replacement for ‘ls’.
https://the.exa.website/
MIT License
23.63k stars 661 forks source link

support for better sequence listing #803

Open buckleyc opened 3 years ago

buckleyc commented 3 years ago

From VFX/Post-Production. request: "exa --seq(uence)" to better display sequential files Many post-production files are files with a name that is sequentially numbered (e.g., "dinosaur_attack-v11.0023.exr"), used in various departments and teams for a range of needs, principally as images sequences (e.g., renders, texture maps, composites). Rather than the traditional file listing of one entry per file, it is very helpful to display a numerically named sequence as one entry with the appropriate numeric range. E.g., rather than:

image.0001.exr image.0002.exr image.0003.exr

it is easier to work with a single entry formatted as:

image.@@@@1-3.exr

This can also be helpful to highlight missing files. E.g., if the fourth frame was missing out of ten frames, then the user would see two entries as:

image.@@@@1-3.exr image.@@@@5-10.exr

Multiple '@' are used to indicate numeric padding. E.g., '@@@@' is equivalent to '%04d'. Entries with a single '@' would indicate a sequence without padded numbers.

In visual effects, a single shot is usually the result of many many images sequences distilled to the final resultant image. These could be image sequence, animated textures, simulation caches, and many other numerically related files.

Currently, many visual effects and post-production companies will write/develop their own tools to handle these sequences, but having the listing utility handle this internally (versus the use of other tools such as python, perl, etc.) would be a nice improvement.

Thank you for reading.

ronbrinkmann commented 3 years ago

Yes! This would be incredibly useful.

A lot of places use a '#' in the result as shorthand for @@@@, so you'd see image.#1-50.exr or sometimes image.1-50#.exr

Do this and every visual effects facility in the world will start using exa and you can claim you've worked on hundreds of movies :)

jonogibbs commented 2 years ago

This would be great - I know of many one-off tools and forks of "ls" which do this. I think for exa I would recommend to show the filename as "image.#.exr" and have the "1-50", etc, as a separate column in --long mode. Also in --long mode when all the values for a given column are the same, the value can be shown. If they are different per image (such as modified date), it should show nothing.