uhd-urz / elAPI

An extensible API client for eLabFTW
GNU Affero General Public License v3.0
5 stars 0 forks source link

INFO "Data with format '<format name>' cannot be shown on the terminal" is shown even when --export is passed #42

Closed alexander-haller closed 1 month ago

alexander-haller commented 1 month ago

In GitLab by @mhxion on Jun 13, 2024, 12:09

Reported by @alexander-haller.

There should be no need to show the INFO warning Data with format '<format name>' cannot be shown on the terminal. Data will be exported. when user already wants and expects the data to be exported.

$ elapi experiments get --id 1 --format ELN --export /home/alex/elapi/
INFO     Data with format 'ELN' cannot be shown on the terminal. Data will be exported.                                                                                                                                            cli.py:87  
# Notice: <--- --export is already passed.
INFO     experiment_1 data successfully exported to /home/alex/elapi/2024-06-13_103313_experiment_1.eln in ELN format.                                                                                                          export.py:71

As opposed to:

$ elapi experiments get --id 1 --format JSON --export /home/alex/elapi/
INFO     experiment_1 data successfully exported to /home/alex/elapi/2024-06-13_103352_experiment_1.json in JSON format.                                                                                                        export.py:71