cli: automatically detect the file format according to the extension

this is convenient for the user, but all useful to test our exporter framework :-)
gui acquisition: some file format refactoring

still more to do before it works