Skip to content

Commit

Permalink
cnc fixx
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanhb committed Nov 25, 2023
1 parent ecccda9 commit a5c58ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ lookup=~/.opencitations/index/lookup.csv
# True whenever you want to use the api in the resource finder
use_api=false
# Comma seperated available services
services=COCI,POCI,CROCI,DOCI,INDEX
services=COCI,POCI,CROCI,DOCI,JOCI,INDEX
# Available identifiers type
identifiers=doi,pmid,omid
# All BR IDs handled in META
Expand Down
15 changes: 8 additions & 7 deletions scripts/cnc.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,14 @@ def normalize_dump(service, input_files, output_dir, newdump = False):


# remove duplicates from entities_with_no_omid
index_entities = set()
with open(output_dir+'entities_with_no_omid.csv') as csv_file:
csv_reader = csv.reader(csv_file, delimiter=',')
for row in csv_reader:
index_entities.add(row[0])
with open(output_dir+'entities_with_no_omid.csv', 'w') as f_out:
csv.writer(f_out).writerows([[e] for e in index_entities])
if os.path.exists(output_dir+'entities_with_no_omid.csv'):
index_entities = set()
with open(output_dir+'entities_with_no_omid.csv') as csv_file:
csv_reader = csv.reader(csv_file, delimiter=',')
for row in csv_reader:
index_entities.add(row[0])
with open(output_dir+'entities_with_no_omid.csv', 'w') as f_out:
csv.writer(f_out).writerows([[e] for e in index_entities])

def main():
global _config
Expand Down

0 comments on commit a5c58ee

Please sign in to comment.