From b268da7c38a676fa89531b28397d35568ea00496 Mon Sep 17 00:00:00 2001 From: Rossi-Luciano Date: Sat, 6 Dec 2025 19:58:53 -0300 Subject: [PATCH 1/2] Modifica article_compile.txt para considerar MODS --- .../indexes/article/article_compile.txt | 240 ++++++++++++------ 1 file changed, 168 insertions(+), 72 deletions(-) diff --git a/article/templates/search/indexes/article/article_compile.txt b/article/templates/search/indexes/article/article_compile.txt index cfcb5db78..fb856f207 100644 --- a/article/templates/search/indexes/article/article_compile.txt +++ b/article/templates/search/indexes/article/article_compile.txt @@ -5,108 +5,204 @@ xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.lyncode.com/xoai http://www.lyncode.com/xsd/xoai.xsd"> + + + + + + - {% for title in object.titles.all %} + {% for title in object.titles.all %} {{ title.plain_text }} - {% endfor%} + {% endfor %} - + + + + + {% for research in object.researchers.all %} + + {% if research.orcid %} + {{ research.person_name }} + {% else %} + {{ research.person_name }} + {% endif %} + + {% endfor %} + + + + + + + {% if object.pub_date %} + + + {{ object.pub_date }} + + + {% endif %} + + + {% if object.created %} + + + {{ object.created|date:"c" }} + + + {% endif %} + + + {% if object.updated %} + + + {{ object.updated|date:"c" }} + + + {% endif %} + + + + + - {% for research in object.researchers.all %} - {% if research.orcid %} - {{research.person_name}} - {% else %} - {{research.person_name}} - {% endif %} - {% endfor %} + {{ object.pid_v2 }} + {{ object.pid_v3 }} + + + + + {% for doi in object.doi.all %} + + {{ doi.value }} + + {% endfor %} + + + + + {% for collection in object.collections %} + {% for lang in object.languages.all %} + + http://{{ collection.domain }}/scielo.php?script=sci_arttext&pid={{ object.pid_v2 }}&tlng={{ lang.code2 }} + + {% endfor %} + {% endfor %} + + - {% for kwd in object.keywords.all %} + {% for kwd in object.keywords.all %} {{ kwd.text }} - {% endfor %} + {% endfor %} + + + + + {% for abs in object.abstracts.all %} + + {{ abs.plain_text }} + + {% endfor %} + + + + + + + + {% for lang in object.languages.all %} + + {{ lang.code2 }} + + {% endfor %} + + + + + {% with ph=object.journal.publisher_history.first %} + {% if ph %} + - {% for abs in object.abstracts.all %} - {{ abs }} - {% endfor %} - + {% if ph.institution %} + {{ ph.institution.institution.institution_identification.name }} + {% elif ph.organization %} + {{ ph.organization.name }} + {% endif %} - - - {{ object.updated|date:"c" }} - - - - - {{ object.article_type }} - - - - - - {% for doi in object.doi.all %} - {{ doi.value }} - {% endfor %} + {% endif %} + {% endwith %} - {{ object.pid_v2 }} - {{ object.pid_v3 }} + + + + {{ object.article_type }} + + - {% for collection in object.collections %} - {% for lang in object.languages.all %} - http://{{collection.domain}}/scielo.php?script=sci_arttext&pid={{object.pid_v2}}&tlng={{lang.code2}} + + + + text/html + + + + + + + {{ object.journal.title }}{% if object.issue.volume %}, v.{{ object.issue.volume }}{% endif %}{% if object.issue.number %}, n.{{ object.issue.number }}{% endif %}{% if object.first_page and object.last_page %}, p.{{ object.first_page }}-{{ object.last_page }}{% endif %}{% if object.pub_date_year %}, {{ object.pub_date_year }}{% endif %} + + + + + + + + {% if object.license %} + {{ object.license.license_type }} + {% endif %} + + + {% for stmt in object.license_statements.all %} + {{ stmt.license_p|striptags }} + {% endfor %} + + + + + {% for stmt in object.license_statements.all %} + + {{ stmt.url }} + {% endfor %} - {% endfor %} - - - - - - {% for lang in object.languages.all %} - {{ lang.code2 }} - {% endfor %} - - - - - {% for lic in object.license.all %} - {{ lic }} - {% endfor %} - - - - - {{ object.source }} - - - - - - {{ object.publisher.institution.institution_identification.name }} - - - - - text/html - - + + + + + + + {{ object.pid_v2 }} {{ object.updated|date:"c" }} + + - + From 02007b13e338c4aaa31e57655695edbfecb1e424 Mon Sep 17 00:00:00 2001 From: Rossi-Luciano Date: Sun, 14 Dec 2025 21:39:37 -0300 Subject: [PATCH 2/2] Adequa "article_compile.txt" para compatibilidade com Biodiversity Heritage Library --- .../indexes/article/article_compile.txt | 117 +++++++++++++++--- 1 file changed, 103 insertions(+), 14 deletions(-) diff --git a/article/templates/search/indexes/article/article_compile.txt b/article/templates/search/indexes/article/article_compile.txt index fb856f207..44f0f39fd 100644 --- a/article/templates/search/indexes/article/article_compile.txt +++ b/article/templates/search/indexes/article/article_compile.txt @@ -26,9 +26,9 @@ {% for research in object.researchers.all %} {% if research.orcid %} - {{ research.person_name }} + {{ research.person_name }} {% else %} - {{ research.person_name }} + {{ research.person_name }} {% endif %} {% endfor %} @@ -82,6 +82,26 @@ {% endfor %} + + {% if object.journal.official %} + {% if object.journal.official.issn_print %} + + + {{ object.journal.official.issn_print }} + + + {% endif %} + + + {% if object.journal.official.issn_electronic %} + + + {{ object.journal.official.issn_electronic }} + + + {% endif %} + {% endif %} + {% for collection in object.collections %} @@ -98,7 +118,7 @@ {% for kwd in object.keywords.all %} - {{ kwd.text }} + {{ kwd.text }} {% endfor %} @@ -142,6 +162,55 @@ {% endif %} {% endwith %} + + + + + + {{ object.journal.title }} + + + + + + + + {% if object.issue.volume %} + + + {{ object.issue.volume }} + + + {% endif %} + + + {% if object.issue.number %} + + + {{ object.issue.number }} + + + {% endif %} + + + {% if object.first_page %} + + + {{ object.first_page }} + + + {% endif %} + + + {% if object.last_page %} + + + {{ object.last_page }} + + + {% endif %} + + @@ -165,23 +234,43 @@ + {% if object.license %} + - - {% if object.license %} {{ object.license.license_type }} - {% endif %} - - - {% for stmt in object.license_statements.all %} - {{ stmt.license_p|striptags }} - {% endfor %} - + - {% for stmt in object.license_statements.all %} - {{ stmt.url }} + {% if 'CC BY 4.0' in object.license.license_type or 'CC-BY 4.0' in object.license.license_type %} + http://creativecommons.org/licenses/by/4.0/ + {% elif 'CC BY-NC 4.0' in object.license.license_type or 'CC-BY-NC 4.0' in object.license.license_type %} + http://creativecommons.org/licenses/by-nc/4.0/ + {% elif 'CC BY-SA 4.0' in object.license.license_type or 'CC-BY-SA 4.0' in object.license.license_type %} + http://creativecommons.org/licenses/by-sa/4.0/ + {% elif 'CC BY-ND 4.0' in object.license.license_type or 'CC-BY-ND 4.0' in object.license.license_type %} + http://creativecommons.org/licenses/by-nd/4.0/ + {% elif 'CC BY-NC-SA 4.0' in object.license.license_type or 'CC-BY-NC-SA 4.0' in object.license.license_type %} + http://creativecommons.org/licenses/by-nc-sa/4.0/ + {% elif 'CC BY-NC-ND 4.0' in object.license.license_type or 'CC-BY-NC-ND 4.0' in object.license.license_type %} + http://creativecommons.org/licenses/by-nc-nd/4.0/ + {% elif 'CC BY 3.0' in object.license.license_type or 'CC-BY 3.0' in object.license.license_type %} + http://creativecommons.org/licenses/by/3.0/ + {% elif 'CC BY-NC 3.0' in object.license.license_type or 'CC-BY-NC 3.0' in object.license.license_type %} + http://creativecommons.org/licenses/by-nc/3.0/ + {% endif %} + + + {% endif %} + + + + + + {% for funding in object.fundings.all %} + + {{ funding.funding_source.institution.institution_identification.name }}{% if funding.award_id %} grant {{ funding.award_id }}{% endif %} {% endfor %}