IdrisMiles / cliquers

Manage collections with common numerical component.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add cliquers bin for ls behaiour

IdrisMiles opened this issue · comments

Implement a bin to act like ls from the command line but displaying collections as formatted strings

For example:

$ cliquers .
foo_v%04d.exr [1001-1067]
bar.%04d.exr [1023-1030, 1045-1050]
fubar.json

Should support custom format options

$ cliquers --format "{head}####{tail}" .
foo_v####.exr
bar.####.exr
fubar.json

Should also support custom pattern matching

$ cliquers --pattern "\_v(?P<index>(?P<padding>0*)\\d+)" .
foo_v%04d.exr [1001-1067]
bar.1023.exr
...
bar.1050.exr
fubar.json