From f10ba67863dbdb155157aad9e8aa82be09da4873 Mon Sep 17 00:00:00 2001
From: Alex <alexandre.meyer@univ-lyon1.fr>
Date: Wed, 4 Dec 2024 17:53:39 +0100
Subject: [PATCH] pub

---
 script_hal/extract_html.py                    |  52 ++++++++++++------
 web/content/research/_index.md                |   6 ++
 ...eritage_with_a_Constructivist_Approach.jpg | Bin 0 -> 43 bytes
 web/content/research/publications.html        |  12 ++--
 4 files changed, 48 insertions(+), 22 deletions(-)
 create mode 100644 web/content/research/images/The_CREATE_Project__Mixed_Reality_for_Design,_Education,_and_Cultural_Heritage_with_a_Constructivist_Approach.jpg

diff --git a/script_hal/extract_html.py b/script_hal/extract_html.py
index b40a6cc..cb3a029 100644
--- a/script_hal/extract_html.py
+++ b/script_hal/extract_html.py
@@ -9,8 +9,8 @@ def ensure_url_scheme(url):
 
 def get_publications_from_hal(author_id):
     # URL pour l'API de HAL
-    url = f"https://api.archives-ouvertes.fr/search/?q=authIdHal_s:{author_id}&wt=json&fl=title_s,authFullName_s,producedDateY_i,uri_s,conferenceTitle_s,journalTitle_s,doiId_s,docType_s"
-
+    #url = f"https://api.archives-ouvertes.fr/search/?q=authIdHal_s:{author_id}&wt=json&fl=title_s,authFullName_s,producedDateY_i,uri_s,conferenceTitle_s,journalTitle_s,doiId_s,docType_s"
+    url = f"https://api.archives-ouvertes.fr/search/?q=authIdHal_s:alexandre-meyer&wt=json&fl=title_s,authFullName_s,producedDateY_i,uri_s,conferenceTitle_s,journalTitle_s,doiId_s,docType_s,software_s"
     # Envoyer une requête GET à l'API de HAL
     response = requests.get(url)
 
@@ -69,7 +69,7 @@ def create_html(publications):
         </style>
     </head>
     <body>
-        <h1>Liste des Publications</h1>
+        <h1>Publications List</h1>
     """
 
     current_year = None
@@ -82,6 +82,7 @@ def create_html(publications):
         uri = pub.get('uri_s', '')
         conference = pub.get('conferenceTitle_s', '')
         journal = pub.get('journalTitle_s', '')
+        thesis = pub.get('thesisDegreeGrantor_s', '')
         doi = pub.get('doiId_s', '')
         doc_type = pub.get('docType_s', '')
 
@@ -104,31 +105,50 @@ def create_html(publications):
             current_year = year
             html_content += f"<div class='year-section'><h2>{year}</h2><ul>"
 
+        # # Construire la référence complète de la publication
+        # reference_parts = [title]
+        # if authors:
+        #     reference_parts.append(authors)        
+        # if doc_type == 'HDR':
+        #     reference_parts.append("HDR")
+        # if doc_type == 'REPORT':
+        #     reference_parts.append("Research Report")
+        # if doc_type == 'THESE':
+        #     reference_parts.append("Thesis")
+        # if doc_type == 'UNDEFINED':
+        #     reference_parts.append("Code")
+        # print(doc_type)
+        # if conference or journal:
+        #     reference_parts.append(f"{conference}, {journal}, {year}")
+        # reference_text = '<br>'.join(part for part in reference_parts if part)
+
+
         # Construire la référence complète de la publication
         reference_parts = [title]
         if authors:
             reference_parts.append(authors)
         
         if doc_type == 'HDR':
-            reference_parts.append("HDR, Université")
-        
-        if doc_type == 'Rapport de recherche':
-            reference_parts.append("Rapport de recherche")
-        
-        if doc_type == 'Logiciel':
-            reference_parts.append("Code informatique")
-        
-        if conference or journal:
-            reference_parts.append(f"{conference}, {journal}, {year}")
-        
-        reference_text = '<br>'.join(part for part in reference_parts if part)
+            pubtype = "HDR"
+        elif doc_type == 'REPORT':
+            pubtype = "Research Report"
+        elif doc_type == 'THESE':
+            pubtype = "Thesis"
+        elif doc_type == 'UNDEFINED':
+            pubtype = "Pre-publication"
+            print(doc_type + " title=" + title)
+        elif conference or journal:
+            pubtype = conference if conference else journal
+        else:
+            pubtype = "Other"
+            print(doc_type + " title=" + title)
 
         # Ajouter la publication à la section de l'année correspondante
         html_content += f"""
             <li class="publication">
                 <p><strong>{title}</strong></p>
                 <p>{authors}</p>
-                <p>{conference or journal}, {year}</p>
+                <p>{pubtype}, {year}</p>
                 <p><a href="{uri}">Lien vers HAL</a> {f'<a href="https://doi.org/{doi}">, Lien DOI</a>' if doi else ''}</p>
             </li>
         """
diff --git a/web/content/research/_index.md b/web/content/research/_index.md
index 1c0a76a..e988376 100644
--- a/web/content/research/_index.md
+++ b/web/content/research/_index.md
@@ -62,3 +62,9 @@ Member of program committees
 
 
 
+## List of publications
+
+{{ $html := readFile "research/publications.html" }}
+{{ $html | safeHTML }}
+
+
diff --git a/web/content/research/images/The_CREATE_Project__Mixed_Reality_for_Design,_Education,_and_Cultural_Heritage_with_a_Constructivist_Approach.jpg b/web/content/research/images/The_CREATE_Project__Mixed_Reality_for_Design,_Education,_and_Cultural_Heritage_with_a_Constructivist_Approach.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..5bfd67a2d6f72ac3a55cbfcea5866e841d22f5d9
GIT binary patch
literal 43
mcmZ?wbhEHbWMp7uXkdT>#h)yUAf^t80Ld^gF}W}@SOWlZ0R#L1

literal 0
HcmV?d00001

diff --git a/web/content/research/publications.html b/web/content/research/publications.html
index 597142c..e0ebda8 100644
--- a/web/content/research/publications.html
+++ b/web/content/research/publications.html
@@ -26,7 +26,7 @@
         </style>
     </head>
     <body>
-        <h1>Liste des Publications</h1>
+        <h1>Publications List</h1>
     <div class='year-section'><h2>2024</h2><ul>
             <li class="publication">
                 <p><strong>Pure Physics-Based Hand Interaction in VR</strong></p>
@@ -38,14 +38,14 @@
             <li class="publication">
                 <p><strong>Pose Metrics: a New Paradigm for Character Motion Edition</strong></p>
                 <p>Léon Victor, Alexandre Meyer, Saïda Bouakaz</p>
-                <p>, 2023</p>
+                <p>Pre-publication, 2023</p>
                 <p><a href="https://hal.science/hal-03982254v1">Lien vers HAL</a> <a href="https://doi.org/10.48550/arXiv.2301.06514">, Lien DOI</a></p>
             </li>
         
             <li class="publication">
                 <p><strong>Analyse, reconnaissance et synthèse d’expressions et de styles dans les mouvements</strong></p>
                 <p>Alexandre Meyer</p>
-                <p>, 2023</p>
+                <p>HDR, 2023</p>
                 <p><a href="https://hal.science/tel-04145272v1">Lien vers HAL</a> </p>
             </li>
         
@@ -192,7 +192,7 @@
             <li class="publication">
                 <p><strong>Survey on Computer Representations of Trees for Realistic and Efficient Rendering</strong></p>
                 <p>Frédéric Boudon, Alexandre Meyer, Christophe Godin</p>
-                <p>, 2006</p>
+                <p>Research Report, 2006</p>
                 <p><a href="https://inria.hal.science/hal-00830069v1">Lien vers HAL</a> </p>
             </li>
         </ul></div><div class='year-section'><h2>2005</h2><ul>
@@ -206,7 +206,7 @@
             <li class="publication">
                 <p><strong>Three LOD for the Realistic and Real-Time Rendering of Crowds with Dynamic Lighting</strong></p>
                 <p>Jean-Marc Coic, Celine Loscos, Alexandre Meyer</p>
-                <p>, 2005</p>
+                <p>Research Report, 2005</p>
                 <p><a href="https://hal.science/hal-01494839v1">Lien vers HAL</a> </p>
             </li>
         </ul></div><div class='year-section'><h2>2003</h2><ul>
@@ -220,7 +220,7 @@
             <li class="publication">
                 <p><strong>Représentations d'arbres réalistes et efficaces pour la synthèse d'images de paysages</strong></p>
                 <p>Alexandre Meyer</p>
-                <p>, 2001</p>
+                <p>Thesis, 2001</p>
                 <p><a href="https://theses.hal.science/tel-00004686v1">Lien vers HAL</a> </p>
             </li>
         
-- 
GitLab