wummel / patool

patool is a portable command line archive file manager
http://wummel.github.io/patool/
GNU General Public License v3.0
404 stars 68 forks source link

Return list of supported formats given a set of archive operations #165

Closed nohr-ai closed 2 months ago

nohr-ai commented 4 months ago

I would like to include a library function that lists the supported formats for some operations I wish to perform. I use patool in a bunch of filesystems to automate extract and compression tasks on user input. Typically, I want to check whether an extension is supported before processing something. Otherwise, I would need a try-except block performing expensive disk operations.

⚙️ supported_formats

A new function that returns a list of supported archive formats for an optional iterable(list, tuple, set, dict etc.) of operations.

🏥 Fixes