From faab82d4d63cb9e171ba7885e94e60a40193cbbd Mon Sep 17 00:00:00 2001
From: basdorea <bastien.doreau@uca.fr>
Date: Tue, 11 Jun 2024 10:51:43 +0200
Subject: [PATCH] add method correspondance_SJR_HAL

---
 hal/management/commands/create_csv_scimagocore.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/hal/management/commands/create_csv_scimagocore.py b/hal/management/commands/create_csv_scimagocore.py
index 8ff44f8..1cb5f80 100644
--- a/hal/management/commands/create_csv_scimagocore.py
+++ b/hal/management/commands/create_csv_scimagocore.py
@@ -44,6 +44,16 @@ def delete_file(download_file):
     if os.path.isfile(download_file):
         os.remove(download_file)
 
+def correspondance_SJR_HAL(sjr_journal) :
+    """
+    As HAL has not exactly the same name of journals than SJR, some modifs are put on the CSV files extracted form Scimago
+    """
+    equivhal_journal = sjr_journal
+    equivhal_journal = equivhal_journal.replace('Journal of Experimental Algorithmics','ACM Journal of Experimental Algorithmics')
+    equivhal_journal = equivhal_journal.replace('Concurrency and Computation Practice and Experience','Concurrency and Computation: Practice and Experience')
+    equivhal_journal = equivhal_journal.replace('4OR','4OR: A Quarterly Journal of Operations Research')
+    return equivhal_journal
+
 
 # Creation des fichiers SCIMago contenant titre des journaux et notes pour les 3 domaines : computer science, math, et engineering
 # Lecture 3 CSV telecharge de la meme annee envoyes en parametres 
@@ -59,6 +69,7 @@ def create_csv_scimago(csvsci, new_csv) :
         title = str(row[2])
         #print ("MY TITLE = ",title)
         title = title.replace('"','')
+        title = correspondance_SJR_HAL(title)
         try :
             if (row[6] == "Q1") or (row[6] == "Q2") or (row[6] == "Q3") or (row[6] == "Q4") :
                 list_sci_com.append((title,str(row[6])))
-- 
GitLab