Hi folks, I want to share a useful command-line utility that I wrote for listing image sequences in a compact form, like an enhanced "/bin/ls" (unix) command. Since this is something that could be of use to you in the wider Nuke community, it seems OK that I post this here even though it's not directly something about Nuke - besides this is where all the cool kids hang out and I thought you all may appreciate it.
So anyway, my utility is a fairly standard item to find at a typical production facility, so many of you won't need this, but surprisingly there doesn't seem to be a definitive version of this utility in the public domain. At least there wasn't when I was looking for one several years ago - so I wrote my own. It's called "lsseq" and written in python. I attempted to mimic the behavior and look of /bin/ls as closely as I could where it made sense. For example, argument flag names are the same in many cases, plus how it lists subdirectories, and explicitly listed positional arguments etc. It works on Apple's "OS X" and Linux. I've also run it on a PC running Windows-7 Ultimate under an SUA bash shell as well as under the "git bash" shell that comes with "Git for Windows". I haven't tested it but I bet it will work under cygwin. Its output will look like this for each directory (and/or positional arguments) it lists: $ lsseq [...all output of /bin/ls minus image sequences here... (optional)] [...followed by all the images/movie sequences here...] lsseq has many useful features like; listing in various compact formats suitable for command line use with "nukev", "rv" or "shake"; it lists missing frames, or zero-sized frames; sorts sequences by time; lists recursively; plus several /bin/ls options apply (like --reverse etc.) It doesn't do the "-l" (long listing) option of /bin/ls or any of the associated functions that go along with that (since '-l' doesn't make perfect sense when listing a sequence of frames in one chunk.) But apart from the "-l" being missing you can almost use lsseq in place of "/bin/ls", and feel pretty comfortable. As I mentioned above, one nice thing lsseq does is allow you to sort by time stamp (-t), but there's an extra argument that /bin/ls doesn't have in which you tell lsseq to use either the "oldest", "median" or "newest" aged files in each sequence when making the time comparison. Here's an example; Say you cd into a directory where you've rendered a bunch of passes, each in their own sub-directories. If you want to list the last ten passes that got rendered in a format that you can directly use on the command line with 'rv' then you can do this: $ lsseq -t --reverse --format rv */*.exr | tail -10 textMatte/spmp03_textMatte.v2b.1-310#.exr rgbLgtA/spmp03_rgbLgtA.v2b.1-310#.exr beautyRefrA/spmp03_beautyRefrA.v2b.1-310#.exr beautyReflA/spmp03_beautyReflA.v2b.1-310#.exr beautyReflB/spmp03_beautyReflB.v2b.1-310#.exr beautyRefrB/spmp03_beautyRefrB.v2b.1-310#.exr rgbNzA/spmp03_rgbNzA.v2b.1-310#.exr rgbNzB/spmp03_rgbNzB.v2b.1-310#.exr rgbNzC/spmp03_rgbNzC.v2b.1-310#.exr $ rv `!!` and that last rv command will just fire up rv with all ten sequences. Anyway, I've wanted to release this into the public domain for some time now, and I've finally put together an installation package that I HOPE is fairly easy to use, so that you can install it and try it out for yourself. Here are the two files you will need: http://www.orangeimagination.com/README http://www.orangeimagination.com/lsseq-1.710.tar.gz Actually, that tarball has a support python module in it that I wrote, plus a couple of other associated little command-utilities to perform related tasks when dealing with image sequences. So those might be useful even if lsseq isn't. I'm looking forward to your feedback and if you don't want to clog up this nuke-users list with discussion of this, please just feel free to email me directly by visiting http://www.orangeimagination.com/contactOIC.html Enjoy!! James Rowell.
_______________________________________________ Nuke-users mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
