Skip to content

Commit

Permalink
Changed facet_authors file to pull from normalized_authors instead of…
Browse files Browse the repository at this point in the history
… authors.
  • Loading branch information
tjacovich committed Sep 26, 2022
1 parent c957c26 commit 22d3423
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ADSCitationCapture/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#Dictionary that defines the output files for ADSDataPipeline
file_names=OrderedDict()
file_names['bibcode'] =proj_home+'/logs/output/bibcodes_CC.can.list'
file_names['bibcode'] =proj_home+'/logs/output/bibcodes_CC.list.can'
file_names['citations'] = proj_home+'/logs/output/citations_CC.list'
file_names['references'] = proj_home+'/logs/output/references_CC.list'
file_names['authors'] = proj_home+'/logs/output/facet_authors_CC.list'
Expand Down Expand Up @@ -152,7 +152,7 @@ def _write_key_citation_target_authors(app, records):
for rec in records:
parsed_metadata = get_citation_target_metadata(app, rec['content']).get('parsed', {})
if parsed_metadata:
f.write(str(rec['bibcode'])+"\t"+"\t".join(parsed_metadata.get('authors',''))+"\n")
f.write(str(rec['bibcode'])+"\t"+"\t".join(parsed_metadata.get('normalized_authors',''))+"\n")

logger.info("Wrote file {} to disk.".format('authors'))
except Exception as e:
Expand All @@ -178,7 +178,7 @@ def _write_key_citation_reference_data(app, bibcodes):
except Exception as e:
logger.exception("Failed to write files {} and {}.".format(file_names['citations']+".tmp", file_names['references']+".tmp"))
raise Exception("Failed to write files {} and {}.".format(file_names['citations']+".tmp", file_names['references']+".tmp"))

def _update_citation_target_curator_message_session(session, content, msg):
"""
Actual calls to database session for update_citation_target_metadata
Expand Down

0 comments on commit 22d3423

Please sign in to comment.