From c2eb01512ce371d929207d3fa0e3890aad2dbcd8 Mon Sep 17 00:00:00 2001
From: bingshuo <565183519@qq.com>
Date: Tue, 19 May 2026 13:01:42 +0800
Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9C=20=E8=92=B8=E9=A6=8F=E8=84=9A?=
=?UTF-8?q?=E6=9C=AC=EF=BC=9Aupdate=5Fhomepage.py?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
scripts/distill/update_homepage.py | 38 ++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 scripts/distill/update_homepage.py
diff --git a/scripts/distill/update_homepage.py b/scripts/distill/update_homepage.py
new file mode 100644
index 0000000..7fb0bb1
--- /dev/null
+++ b/scripts/distill/update_homepage.py
@@ -0,0 +1,38 @@
+#!/usr/bin/env python3
+"""Update docs/index.html to add model download gate via Gitea API"""
+import requests, json, base64
+
+TOKEN = '2d924a6e19b44d14bf367f5dd1ce238510128183'
+URL = 'https://guanghulab.com/code/api/v1/repos/bingshuo/guanghulab/contents/docs/index.html'
+HEADERS = {'Authorization': f'Bearer {TOKEN}'}
+
+# Get current file
+resp = requests.get(URL, headers=HEADERS)
+data = resp.json()
+sha = data['sha']
+content = base64.b64decode(data['content']).decode('utf-8')
+
+# Add download models gate after the first gate (光湖智库)
+new_gate = '''
+
+ 📥模型下载
+ 1.5B人格模型模板下载
+ download-models.html →
+ '''
+
+# Insert after the first in the gates section
+insert_pos = content.find('', content.find('