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

verify-files: initial release #23

Closed tiborsimko closed 4 years ago

tiborsimko commented 4 years ago

After user downloads a set of files belonging to a dataset, see #22, it will be interesting to provide a functionality to check the sizes and adler32 checksums of downloaded files.

This information is available over REST API, here is one example.

The user would launch:

$ cernopendata-client verify-files --recid 5500 --directory ./mydata/5550

The command would go through the given directory, calculate size and adler32-checksum of present files, and compare this with the information obtained from the server via the REST API.

The command would report back to user:

The command will exit with different error codes so that users could plug this command to their harvesting workflows.