get_sha256_hashes.py 498 B

12345678910111213141516
  1. """Compute sha256 hashes for all files"""
  2. import pooch
  3. if __name__ == "__main__":
  4. pooch.make_registry(
  5. "test_data",
  6. "files-registry.txt", # destination file
  7. )
  8. # Remove .DS_Store files from the file registry
  9. with open("files-registry.txt", "r+") as f:
  10. lines = [line for line in f if ".DS_Store" not in line]
  11. f.seek(0) # move pointer to the start of the file
  12. f.truncate() # delete from the pointer to the end
  13. f.writelines(lines)