From 45c64cfe57b64791cb35328e896d845ea52bab0d Mon Sep 17 00:00:00 2001
From: Deepak Khatri <lorforlinux@beagleboard.org>
Date: Sat, 30 Mar 2024 01:08:23 +0530
Subject: [PATCH] WIP: fix OSHW mark image src (4)

---
 ...US000169.svg => BeagleBone AI_beaglebone@ai_US000169.svg} | 0
 ...ey-ai_US002616.svg => BeagleY-AI_beagley@ai_US002616.svg} | 0
 _templates/oshw.html                                         | 4 ++--
 conf.py                                                      | 5 +++--
 4 files changed, 5 insertions(+), 4 deletions(-)
 rename _static/images/oshw/{BeagleBone AI_beaglebone-ai_US000169.svg => BeagleBone AI_beaglebone@ai_US000169.svg} (100%)
 rename _static/images/oshw/{BeagleY-AI_beagley-ai_US002616.svg => BeagleY-AI_beagley@ai_US002616.svg} (100%)

diff --git a/_static/images/oshw/BeagleBone AI_beaglebone-ai_US000169.svg b/_static/images/oshw/BeagleBone AI_beaglebone@ai_US000169.svg
similarity index 100%
rename from _static/images/oshw/BeagleBone AI_beaglebone-ai_US000169.svg
rename to _static/images/oshw/BeagleBone AI_beaglebone@ai_US000169.svg
diff --git a/_static/images/oshw/BeagleY-AI_beagley-ai_US002616.svg b/_static/images/oshw/BeagleY-AI_beagley@ai_US002616.svg
similarity index 100%
rename from _static/images/oshw/BeagleY-AI_beagley-ai_US002616.svg
rename to _static/images/oshw/BeagleY-AI_beagley@ai_US002616.svg
diff --git a/_templates/oshw.html b/_templates/oshw.html
index 487f543a..c1d45666 100644
--- a/_templates/oshw.html
+++ b/_templates/oshw.html
@@ -8,9 +8,9 @@
         <p class="card-text text-dark">
             <a href="https://certification.oshwa.org/{{ oshw_id|lower }}.html" target="_blank">
               {% if pages_slug %}
-                <img src="../../../../{{pages_slug}}/_static/images/oshw/{{board}}_{{path | replace('/', '-')}}_{{oshw_id}}.svg" alt="{{board}} OSHW mark"/>
+                <img src="../../../../{{pages_slug}}/_static/images/oshw/{{board}}_{{path | replace('/', '@')}}_{{oshw_id}}.svg" alt="{{board}} OSHW mark"/>
               {% else %}
-                <img src="../../../../_static/images/oshw/{{board}}_{{path | replace('/', '-')}}_{{oshw_id}}.svg" alt="{{board}} OSHW mark"/>
+                <img src="../../../../_static/images/oshw/{{board}}_{{path | replace('/', '@')}}_{{oshw_id}}.svg" alt="{{board}} OSHW mark"/>
               {% endif %}
             </a>
         </p>
diff --git a/conf.py b/conf.py
index 29ea0396..cac4f1b4 100644
--- a/conf.py
+++ b/conf.py
@@ -32,9 +32,10 @@ for (dirpath, dirnames, filenames) in os.walk(oshw_logos_path):
         if filename.endswith('.svg'):
             oshw_logo_name = filename.split(".")[0]
             board, path, oshw_id = oshw_logo_name.split('_')
-            path = path.replace('-','/')
+            path = path.replace('@','/')
             oshw_details.append([board, path, oshw_id])
-            
+
+print(oshw_details)
 # Unique boards path information
 boards_path = []
 for board, path, oshw_id in oshw_details:
-- 
GitLab