cernopendata / cernopendata-client

CERN Open Data command-line client
http://cernopendata-client.readthedocs.io/
GNU General Public License v3.0
10 stars 9 forks source link

get-file-locations: add --filter functions #48

Closed tiborsimko closed 3 years ago

tiborsimko commented 4 years ago

The download-files command has now useful filtering options to be able to download only files matching certain name (see #44).

It could be useful to have the same filtering functionality for get-file-locations too so that users do not have to parse the output themselves.

Let's muse about possible improvements such as: (1) adding this option also to get-file-locations command; or (2) merging the commands together, keeping only download-files command, and introducing a sort of --dry-run option that would not do the job but only print file locations that it would download. The latter option would also simplify test suite, as we could test filtering without really doing the download tasks more easily.

WDYT? RFC IRL for later

tiborsimko commented 4 years ago

Can be done in later 0.1.x updates.

ParthS007 commented 3 years ago

@tiborsimko I also agree that the latter option will make the client more simplified including the tests. I will add the --dry-run option to show the file locations that we are doing in the get-file-locations.

Please let me know any other details that I should keep in mind while merging get-file-locations and download-files.