Commit 29066b3d authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update store_tools/ to remove obsolete add_affiliation_keys

parent 5742c84e
""" store_tools.factory
import re
from .base import (CDS,
......@@ -27,40 +25,6 @@ REX_T = "\$\$t([\w, ]+)"
REX_U = "\$\$u([\w, ]+)"
def add_affiliation_keys(recjson):
"""A the affiliation keys to the record describing an institute:
* The XML record contains the affiliation keys used by
They are located in the field 110__u and 110__t (future).
* The JSON record does not contains this information.
* This tool add the affiliation keys to the JSON record.
They are located:
| field (limbra) | subfield |
| corporate_note | identifier, futur_identifier, name |
recjson (dict):
record data (MarcJSON)
store = InvenioStore("inspirehep", shelf="institutions")
url = f"{recjson['recid']}"
rep = store.interrogate(url, ot="110", of="txt")
txt = rep.text
recjson["corporate_note"] = {
"identifier":, txt).group(1),
"future_identifier":, txt).group(1)}
def add_conference_data(recjson):
"""Add the conference data to the recjson.
......@@ -212,7 +176,6 @@ def build_record(recjson):
upcast_record = RecordConf(recjson)
elif is_institute(recjson):
upcast_record = RecordInst(recjson)
elif is_thesis(recjson):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment