Skip to content

Commit

Permalink
[Kahi_siiu_projects] added types support in the parser
Browse files Browse the repository at this point in the history
  • Loading branch information
omazapa committed Nov 12, 2024
1 parent f7ca056 commit 76c5487
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion Kahi_siiu_projects/kahi_siiu_projects/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,30 @@ def parse_siiu(reg, empty_project, verbose=0):
# "name": group["NOMBRE_COMPLETO"]
# }
# )
entry["groups"].append(grec)
affiliations.append({
"external_ids": [{"provenance": "siiu", "source": "nit", "id": author["INSTITUCION"]}]
})
# type
if "project_subtype" in reg:

entry["types"].append(
{
"provenance": 'siiu',
"source": 'siiu',
"type": reg["project_subtype"][0]["project_type"][0]["NOMBRE"],
"level": 0,
"code": str(reg["project_subtype"][0]["project_type"][0]["IDENTIFICADOR"])
}
)
entry["types"].append(
{
"provenance": 'siiu',
"source": 'siiu',
"type": reg["project_subtype"][0]["NOMBRE"],
"level": 1,
"code": str(reg["project_subtype"][0]["project_type"][0]["IDENTIFICADOR"]) + str(reg["project_subtype"][0]["IDENTIFICADOR"])
}
)

author_entry = {
"full_name": "",
Expand Down

0 comments on commit 76c5487

Please sign in to comment.