Skip to content

Commit

Permalink
Update prepare-affiliations.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Aug 26, 2024
1 parent 5d97fa7 commit 4495d20
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions data/filters/prepare-affiliations.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function Meta (meta)
for i, affiliation_list in ipairs(author.affiliation) do
local index = tonumber(affiliation_list[1].text)
local affiliation = meta.affiliations[index]
xml = xml.. "<institution><institution_name>"
xml = xml.. "\n <institution><institution_name>"
for _, v in ipairs(affiliation.name) do
if v.text then
xml = xml .. v.text
Expand All @@ -18,11 +18,12 @@ function Meta (meta)
end
xml = xml .. "</institution_name>"
if affiliation.ror then
xml = "<institution_id type=\"ror\">https://ror.org/" .. affiliation.ror[1].text .. "</institution_id>"
xml = xml .. "<institution_id type=\"ror\">https://ror.org/" .. affiliation.ror[1].text .. "</institution_id>"
end
xml = xml.. "</institution>"
end
xml = xml .. "</affiliations>"
xml = xml .. "\n</affiliations>"
-- afxml - (af)filiation xml
author.afxml = xml
end
return meta
Expand Down

0 comments on commit 4495d20

Please sign in to comment.