Nicky Nicolson commited on
Commit
a1cff5c
1 Parent(s): 4d96b32

Corrected spelling licence/license

Browse files
Files changed (1) hide show
  1. getDownloadMetadata.py +5 -5
getDownloadMetadata.py CHANGED
@@ -3,7 +3,7 @@ from pygbif import occurrences as occ
3
  import json
4
 
5
 
6
- licences = {'http://creativecommons.org/licenses/by-nc/4.0/legalcode':'CC BY-NC 4.0'}
7
  if __name__ == '__main__':
8
  parser = argparse.ArgumentParser()
9
  parser.add_argument("inputfile")
@@ -17,10 +17,10 @@ if __name__ == '__main__':
17
  datasette_metadata = json.load(f_in)
18
 
19
  gbif_metadata = occ.download_meta(key = args.download_id)
20
- licence_url = gbif_metadata['license']
21
- if licence_url in licences:
22
- datasette_metadata['licence'] = licences[licence_url]
23
- datasette_metadata['licence_url'] = licence_url
24
  datasette_metadata['source_url'] = 'https://doi.org/{}'.format(gbif_metadata['doi'])
25
 
26
  datasette_metadata_json = json.dumps(datasette_metadata, indent=4)
 
3
  import json
4
 
5
 
6
+ licenses = {'http://creativecommons.org/licenses/by-nc/4.0/legalcode':'CC BY-NC 4.0'}
7
  if __name__ == '__main__':
8
  parser = argparse.ArgumentParser()
9
  parser.add_argument("inputfile")
 
17
  datasette_metadata = json.load(f_in)
18
 
19
  gbif_metadata = occ.download_meta(key = args.download_id)
20
+ license_url = gbif_metadata['license']
21
+ if license_url in licenses:
22
+ datasette_metadata['license'] = licenses[license_url]
23
+ datasette_metadata['license_url'] = license_url
24
  datasette_metadata['source_url'] = 'https://doi.org/{}'.format(gbif_metadata['doi'])
25
 
26
  datasette_metadata_json = json.dumps(datasette_metadata, indent=4)