Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:desci-labs/automating-metadata-v…
Browse files Browse the repository at this point in the history
…1 into develop
  • Loading branch information
hubsmoke committed Jun 28, 2024
2 parents c9b1c9b + 547e9d3 commit c024a7a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Binary file modified .DS_Store
Binary file not shown.
16 changes: 10 additions & 6 deletions app/langchain_orcid2.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,10 @@ def published_metadata(doi, cremail, pyalexemail):
authors_info = []

for author in r['message']['author']:
full_name = author['given'] + ' ' + author['family']
if 'given' in author:
full_name = author['given'] + ' ' + author['family']
else:
full_name = author['name']
authors_info.append(full_name)

if authors_info:
Expand All @@ -211,11 +214,12 @@ def published_metadata(doi, cremail, pyalexemail):


refs = []
for i in r['message']['reference']:
try:
refs.append(i['DOI'])
except:
refs.append(f"{i['key']}, DOI not present")
if 'reference' in r['message']:
for i in r['message']['reference']:
try:
refs.append(i['DOI'])
except:
refs.append(f"{i['key']}, DOI not present")

url_link = r['message']['URL']

Expand Down

0 comments on commit c024a7a

Please sign in to comment.