视觉与UX体验升级:全站配图全面采用现代中式科技高级抽象矢量体系并补充技术文章智能封面Fallback
这个提交包含在:
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
生成文章资讯专属现代中式极简矢量封面图 (Concise Article Covers Generator)
|
||||
生成文章资讯专属现代中式极简矢量封面图 (Concise & Advanced Article Covers Generator)
|
||||
彻底杜绝文字介绍类图片,纯粹以现代中式浅色专业风空间几何、流光、细线窗棂与单字印章呈现。
|
||||
尺寸 600x380,浅色专业底色 #FFFFFF / #F8FAFC,主色 #2563EB,辅色 #06B6D4 / #7C3AED。
|
||||
"""
|
||||
@@ -28,8 +28,8 @@ COMMON_DEFS = '''
|
||||
<stop offset="100%" stop-color="#6366F1"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="artGlass" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" stop-color="#FFFFFF" stop-opacity="0.85"/>
|
||||
<stop offset="100%" stop-color="#F1F5F9" stop-opacity="0.6"/>
|
||||
<stop offset="0%" stop-color="#FFFFFF" stop-opacity="0.88"/>
|
||||
<stop offset="100%" stop-color="#F1F5F9" stop-opacity="0.65"/>
|
||||
</linearGradient>
|
||||
<pattern id="artLattice" width="24" height="24" patternUnits="userSpaceOnUse">
|
||||
<path d="M 24 0 L 0 0 0 24" fill="none" stroke="#E2E8F0" stroke-width="0.75" stroke-dasharray="3,3"/>
|
||||
@@ -38,7 +38,7 @@ COMMON_DEFS = '''
|
||||
<feDropShadow dx="0" dy="6" stdDeviation="10" flood-color="#0F172A" flood-opacity="0.06"/>
|
||||
</filter>
|
||||
<filter id="artGlow" x="-20%" y="-20%" width="140%" height="140%">
|
||||
<feGaussianBlur stdDeviation="10" result="blur"/>
|
||||
<feGaussianBlur stdDeviation="8" result="blur"/>
|
||||
<feComposite in="SourceGraphic" in2="blur" operator="over"/>
|
||||
</filter>
|
||||
'''
|
||||
@@ -70,7 +70,86 @@ def create_base_svg(seal_char, visual_elements):
|
||||
</svg>'''
|
||||
|
||||
articles = {
|
||||
# 1. 微服务分布式事务
|
||||
# 首页 4 篇技术深度文章专属抽象封面
|
||||
# 1. 缓存穿透、击穿与雪崩《三阶重滤与抗压漏斗》
|
||||
'article_cache.svg': ('盾', '''
|
||||
<ellipse cx="0" cy="65" rx="190" ry="70" fill="none" stroke="#E2E8F0" stroke-width="1.2" stroke-dasharray="5,4"/>
|
||||
<!-- 布隆过滤器位图光栅与防御漏斗 -->
|
||||
<polygon points="0,-85 90,-45 0,-15 -90,-45" fill="url(#artGlass)" stroke="#2563EB" stroke-width="1.5" filter="url(#artShadow)"/>
|
||||
<polygon points="0,-35 60,-5 0,18 -60,-5" fill="url(#artGlass)" stroke="#06B6D4" stroke-width="1.2"/>
|
||||
<polygon points="0,5 35,22 0,38 -35,22" fill="url(#artBlue)"/>
|
||||
<line x1="0" y1="-85" x2="0" y2="70" stroke="url(#artBlue)" stroke-width="2.5" stroke-dasharray="4,3"/>
|
||||
<circle cx="0" cy="70" r="18" fill="url(#artGlass)" stroke="#2563EB" stroke-width="1.2"/>
|
||||
<circle cx="0" cy="70" r="6" fill="#2563EB" filter="url(#artGlow)"/>
|
||||
<circle cx="-65" cy="-25" r="3.5" fill="#DC2626"/>
|
||||
<circle cx="65" cy="-25" r="3.5" fill="#DC2626"/>
|
||||
'''),
|
||||
|
||||
# 2. MySQL LIMIT 深度分页《B+Tree 跳跃指针与延迟关联》
|
||||
'article_mysql_page.svg': ('跃', '''
|
||||
<ellipse cx="0" cy="60" rx="180" ry="65" fill="none" stroke="#E2E8F0" stroke-width="1.2" stroke-dasharray="4,4"/>
|
||||
<!-- B+Tree 索引阶梯结构 -->
|
||||
<line x1="-120" y1="40" x2="120" y2="40" stroke="#CBD5E1" stroke-width="1.5"/>
|
||||
<g transform="translate(-80, 20)">
|
||||
<rect x="-15" y="-15" width="30" height="30" rx="4" fill="url(#artGlass)" stroke="#CBD5E1" stroke-width="1"/>
|
||||
<circle cx="0" cy="0" r="3" fill="#94A3B8"/>
|
||||
</g>
|
||||
<g transform="translate(-20, 0)">
|
||||
<rect x="-15" y="-15" width="30" height="30" rx="4" fill="url(#artGlass)" stroke="#93C5FD" stroke-width="1.2"/>
|
||||
<circle cx="0" cy="0" r="3" fill="#2563EB"/>
|
||||
</g>
|
||||
<!-- 高性能延迟关联跳跃抛物线 (由 3.8s 降至 12ms) -->
|
||||
<path d="M -80 5 C -30 -70 40 -70 80 -10" fill="none" stroke="url(#artCyan)" stroke-width="2.5" stroke-linecap="round"/>
|
||||
<g transform="translate(80, -10)" filter="url(#artShadow)">
|
||||
<rect x="-20" y="-20" width="40" height="40" rx="6" fill="url(#artBlue)"/>
|
||||
<circle cx="0" cy="0" r="6" fill="#FFFFFF" filter="url(#artGlow)"/>
|
||||
</g>
|
||||
<circle cx="0" cy="-60" r="4.5" fill="#06B6D4" filter="url(#artGlow)"/>
|
||||
'''),
|
||||
|
||||
# 3. XXL-JOB 分布式分片广播《全域广播与等距波纹》
|
||||
'article_xxl_job.svg': ('播', '''
|
||||
<ellipse cx="0" cy="0" rx="150" ry="75" fill="none" stroke="#E2E8F0" stroke-width="1.2" stroke-dasharray="4,4"/>
|
||||
<ellipse cx="0" cy="0" rx="100" ry="50" fill="none" stroke="#CBD5E1" stroke-width="1"/>
|
||||
<ellipse cx="0" cy="0" rx="50" ry="25" fill="none" stroke="#93C5FD" stroke-width="1.2"/>
|
||||
<!-- 中心调度器 -->
|
||||
<g filter="url(#artShadow)">
|
||||
<circle cx="0" cy="0" r="26" fill="url(#artBlue)"/>
|
||||
<circle cx="0" cy="0" r="10" fill="#FFFFFF"/>
|
||||
<circle cx="0" cy="0" r="4" fill="#1D4ED8"/>
|
||||
</g>
|
||||
<!-- 环绕分片广播执行节点 -->
|
||||
<circle cx="-130" cy="0" r="8" fill="url(#artGlass)" stroke="#06B6D4" stroke-width="1.5"/>
|
||||
<circle cx="130" cy="0" r="8" fill="url(#artGlass)" stroke="#06B6D4" stroke-width="1.5"/>
|
||||
<circle cx="0" cy="-65" r="7" fill="url(#artGlass)" stroke="#7C3AED" stroke-width="1.5"/>
|
||||
<circle cx="0" cy="65" r="7" fill="url(#artGlass)" stroke="#7C3AED" stroke-width="1.5"/>
|
||||
<circle cx="-90" cy="-40" r="5" fill="#2563EB"/>
|
||||
<circle cx="90" cy="40" r="5" fill="#2563EB"/>
|
||||
'''),
|
||||
|
||||
# 4. Redis 集群脑裂防御《双子星隔离与法定仲裁》
|
||||
'article_redis_split.svg': ('防', '''
|
||||
<!-- 网络分区虚线隔断 -->
|
||||
<line x1="0" y1="-100" x2="0" y2="100" stroke="#CBD5E1" stroke-width="1.5" stroke-dasharray="6,4"/>
|
||||
<!-- 左侧:健康多数派集群节点 -->
|
||||
<g transform="translate(-75, 0)" filter="url(#artShadow)">
|
||||
<circle cx="0" cy="0" r="45" fill="#EFF6FF" opacity="0.8"/>
|
||||
<circle cx="0" cy="0" r="32" fill="url(#artBlue)"/>
|
||||
<circle cx="0" cy="0" r="14" fill="#FFFFFF"/>
|
||||
<circle cx="0" cy="0" r="6" fill="#1D4ED8"/>
|
||||
<circle cx="-35" cy="-35" r="5" fill="#06B6D4"/>
|
||||
<circle cx="35" cy="-35" r="5" fill="#06B6D4"/>
|
||||
<circle cx="0" cy="45" r="5" fill="#2563EB"/>
|
||||
</g>
|
||||
<!-- 右侧:孤立少数派休眠节点 -->
|
||||
<g transform="translate(75, 0)">
|
||||
<circle cx="0" cy="0" r="38" fill="none" stroke="#E2E8F0" stroke-width="1.5" stroke-dasharray="4,4"/>
|
||||
<circle cx="0" cy="0" r="24" fill="url(#artGlass)" stroke="#CBD5E1" stroke-width="1.2"/>
|
||||
<circle cx="0" cy="0" r="8" fill="#94A3B8"/>
|
||||
</g>
|
||||
'''),
|
||||
|
||||
# 既有文章 8 篇
|
||||
'article_microservice.svg': ('枢', '''
|
||||
<ellipse cx="0" cy="50" rx="190" ry="75" fill="none" stroke="#E2E8F0" stroke-width="1.2" stroke-dasharray="5,4"/>
|
||||
<g transform="translate(-70, 0)" filter="url(#artShadow)">
|
||||
@@ -91,7 +170,6 @@ articles = {
|
||||
<path d="M 70 15 Q 0 55 -70 15" fill="none" stroke="url(#artCyan)" stroke-width="1.8" stroke-dasharray="4,3"/>
|
||||
'''),
|
||||
|
||||
# 2. 跨端APP与小程序
|
||||
'article_cross_app.svg': ('端', '''
|
||||
<ellipse cx="0" cy="60" rx="180" ry="65" fill="none" stroke="#E2E8F0" stroke-width="1.2" stroke-dasharray="4,4"/>
|
||||
<g transform="translate(-65, -10)" filter="url(#artShadow)">
|
||||
@@ -99,128 +177,86 @@ articles = {
|
||||
<rect x="-35" y="-55" width="70" height="95" rx="3" fill="#FFFFFF" stroke="#E2E8F0"/>
|
||||
<circle cx="0" cy="52" r="3" fill="#94A3B8"/>
|
||||
</g>
|
||||
<g transform="translate(65, 10)" filter="url(#artShadow)">
|
||||
<rect x="-32" y="-70" width="64" height="140" rx="10" fill="#FFFFFF" stroke="#2563EB" stroke-width="1.5"/>
|
||||
<rect x="-26" y="-55" width="52" height="110" rx="5" fill="url(#artBgGrad)"/>
|
||||
<circle cx="0" cy="-20" r="14" fill="url(#artPurple)"/>
|
||||
<g transform="translate(60, 10)" filter="url(#artShadow)">
|
||||
<rect x="-38" y="-75" width="76" height="150" rx="10" fill="#FFFFFF" stroke="#2563EB" stroke-width="1.5"/>
|
||||
<circle cx="0" cy="-25" r="14" fill="url(#artBlue)"/>
|
||||
</g>
|
||||
<path d="M -20 -15 C 10 -40 30 -30 65 -15" fill="none" stroke="url(#artCyan)" stroke-width="2" stroke-linecap="round"/>
|
||||
<circle cx="20" cy="-25" r="4" fill="#06B6D4" filter="url(#artGlow)"/>
|
||||
<path d="M -20 -30 Q 15 -60 45 -40" fill="none" stroke="url(#artCyan)" stroke-width="2" stroke-linecap="round"/>
|
||||
<path d="M 45 35 Q 15 65 -20 40" fill="none" stroke="url(#artPurple)" stroke-width="2" stroke-linecap="round" stroke-dasharray="4,3"/>
|
||||
'''),
|
||||
|
||||
# 3. 私域AI智能体落地
|
||||
'article_ai_agent.svg': ('智', '''
|
||||
<circle cx="0" cy="0" r="100" fill="#FAF5FF" opacity="0.7"/>
|
||||
<ellipse cx="0" cy="0" rx="150" ry="60" fill="none" stroke="#E2E8F0" stroke-width="1.2" stroke-dasharray="5,4" transform="rotate(-30)"/>
|
||||
<ellipse cx="0" cy="0" rx="150" ry="60" fill="none" stroke="#E2E8F0" stroke-width="1.2" stroke-dasharray="5,4" transform="rotate(30)"/>
|
||||
<polygon points="0,-50 45,-20 45,25 0,55 -45,25 -45,-20" fill="none" stroke="#93C5FD" stroke-width="1.2"/>
|
||||
<circle cx="0" cy="0" r="24" fill="url(#artPurple)" filter="url(#artShadow)"/>
|
||||
<circle cx="0" cy="0" r="15" fill="url(#artBlue)"/>
|
||||
<circle cx="0" cy="0" r="6" fill="#FFFFFF"/>
|
||||
<circle cx="-130" cy="0" r="5" fill="#7C3AED" transform="rotate(-30)"/>
|
||||
<circle cx="130" cy="0" r="5" fill="#06B6D4" transform="rotate(30)"/>
|
||||
<circle cx="0" cy="0" r="100" fill="none" stroke="#E2E8F0" stroke-width="1.2" stroke-dasharray="5,4"/>
|
||||
<polygon points="0,-65 56,-32 56,32 0,65 -56,32 -56,-32" fill="none" stroke="#C4B5FD" stroke-width="1.2"/>
|
||||
<circle cx="0" cy="0" r="28" fill="url(#artPurple)" filter="url(#artShadow)"/>
|
||||
<circle cx="0" cy="0" r="16" fill="url(#artBlue)"/>
|
||||
<circle cx="0" cy="0" r="7" fill="#FFFFFF"/>
|
||||
<circle cx="0" cy="-65" r="4.5" fill="#2563EB"/>
|
||||
<circle cx="56" cy="-32" r="4.5" fill="#06B6D4"/>
|
||||
<circle cx="56" cy="32" r="4.5" fill="#7C3AED"/>
|
||||
<circle cx="0" cy="65" r="4.5" fill="#2563EB"/>
|
||||
<circle cx="-56" cy="32" r="4.5" fill="#06B6D4"/>
|
||||
<circle cx="-56" cy="-32" r="4.5" fill="#7C3AED"/>
|
||||
'''),
|
||||
|
||||
# 4. 断网离线收银
|
||||
'article_pos_offline.svg': ('笃', '''
|
||||
<circle cx="0" cy="0" r="120" fill="none" stroke="#E2E8F0" stroke-width="1" stroke-dasharray="4,4"/>
|
||||
<circle cx="0" cy="0" r="90" fill="none" stroke="#CBD5E1" stroke-width="1.2"/>
|
||||
<path d="M 0 -70 L 45 -45 V 0 C 45 35 0 70 0 70 C 0 70 -45 35 -45 0 V -45 Z" fill="url(#artGlass)" stroke="#CBD5E1" stroke-width="1.5" filter="url(#artShadow)"/>
|
||||
<circle cx="0" cy="0" r="22" fill="url(#artBlue)" filter="url(#artGlow)"/>
|
||||
<circle cx="0" cy="0" r="10" fill="#FFFFFF"/>
|
||||
<line x1="-90" y1="0" x2="-22" y2="0" stroke="url(#artCyan)" stroke-width="2" stroke-linecap="round"/>
|
||||
<line x1="22" y1="0" x2="90" y2="0" stroke="url(#artBlue)" stroke-width="2" stroke-linecap="round"/>
|
||||
<circle cx="-90" cy="0" r="4.5" fill="#06B6D4"/>
|
||||
<circle cx="90" cy="0" r="4.5" fill="#2563EB"/>
|
||||
'article_pos_offline.svg': ('核', '''
|
||||
<circle cx="0" cy="0" r="115" fill="none" stroke="#E2E8F0" stroke-width="1.2" stroke-dasharray="4,4"/>
|
||||
<ellipse cx="-55" cy="0" rx="55" ry="50" fill="none" stroke="#CBD5E1" stroke-width="1.2"/>
|
||||
<ellipse cx="55" cy="0" rx="55" ry="50" fill="none" stroke="#CBD5E1" stroke-width="1.2"/>
|
||||
<circle cx="-55" cy="0" r="26" fill="url(#artBlue)" filter="url(#artShadow)"/>
|
||||
<circle cx="-55" cy="0" r="10" fill="#FFFFFF"/>
|
||||
<circle cx="55" cy="0" r="26" fill="url(#artCyan)" filter="url(#artShadow)"/>
|
||||
<circle cx="55" cy="0" r="10" fill="#FFFFFF"/>
|
||||
<path d="M -30 -10 C -10 -25 10 -25 30 -10" fill="none" stroke="url(#artBlue)" stroke-width="2" stroke-linecap="round"/>
|
||||
<path d="M 30 10 C 10 25 -10 25 -30 10" fill="none" stroke="url(#artCyan)" stroke-width="2" stroke-linecap="round"/>
|
||||
'''),
|
||||
|
||||
# 5. 进销存BOM物料匹配
|
||||
'article_erp_bom.svg': ('准', '''
|
||||
<ellipse cx="0" cy="55" rx="170" ry="60" fill="none" stroke="#E2E8F0" stroke-width="1.2" stroke-dasharray="4,4"/>
|
||||
<g transform="translate(-65, 15)" filter="url(#artShadow)">
|
||||
<polygon points="0,-25 30,-8 0,8 -30,-8" fill="url(#artGlass)" stroke="#CBD5E1" stroke-width="1.2"/>
|
||||
<polygon points="-30,-8 0,8 0,28 -30,12" fill="#E2E8F0"/>
|
||||
<polygon points="0,8 30,-8 30,12 0,28" fill="#F1F5F9"/>
|
||||
</g>
|
||||
<g transform="translate(65, 15)" filter="url(#artShadow)">
|
||||
<polygon points="0,-25 30,-8 0,8 -30,-8" fill="url(#artGlass)" stroke="#CBD5E1" stroke-width="1.2"/>
|
||||
<polygon points="-30,-8 0,8 0,28 -30,12" fill="#E2E8F0"/>
|
||||
<polygon points="0,8 30,-8 30,12 0,28" fill="#F1F5F9"/>
|
||||
</g>
|
||||
<g transform="translate(0, -30)" filter="url(#artShadow)">
|
||||
<circle cx="0" cy="0" r="32" fill="none" stroke="#2563EB" stroke-width="1.2" stroke-dasharray="4,4"/>
|
||||
<circle cx="0" cy="0" r="22" fill="url(#artBlue)"/>
|
||||
<circle cx="0" cy="0" r="8" fill="#FFFFFF"/>
|
||||
</g>
|
||||
<path d="M -65 5 Q 0 -15 65 5" fill="none" stroke="url(#artCyan)" stroke-width="2" stroke-linecap="round"/>
|
||||
'''),
|
||||
|
||||
# 6. 安全合规白皮书
|
||||
'article_security_whitepaper.svg': ('安', '''
|
||||
<polygon points="0,-95 82,-47 82,47 0,95 -82,47 -82,-47" fill="none" stroke="#E2E8F0" stroke-width="1.2" stroke-dasharray="4,4"/>
|
||||
<polygon points="0,-75 65,-37 65,37 0,75 -65,37 -65,-37" fill="url(#artGlass)" stroke="#CBD5E1" stroke-width="1.5" filter="url(#artShadow)"/>
|
||||
<circle cx="0" cy="0" r="26" fill="url(#artPurple)"/>
|
||||
<circle cx="0" cy="0" r="14" fill="url(#artBlue)"/>
|
||||
<circle cx="0" cy="0" r="6" fill="#FFFFFF"/>
|
||||
<circle cx="0" cy="-75" r="4" fill="#2563EB"/>
|
||||
<circle cx="65" cy="-37" r="4" fill="#7C3AED"/>
|
||||
<circle cx="65" cy="37" r="4" fill="#06B6D4"/>
|
||||
<circle cx="0" cy="75" r="4" fill="#2563EB"/>
|
||||
<circle cx="-65" cy="37" r="4" fill="#7C3AED"/>
|
||||
<circle cx="-65" cy="-37" r="4" fill="#06B6D4"/>
|
||||
'''),
|
||||
|
||||
# 7. 数字化转型路径
|
||||
'article_southwest_digital.svg': ('融', '''
|
||||
<ellipse cx="0" cy="20" rx="180" ry="80" fill="none" stroke="#E2E8F0" stroke-width="1.2" stroke-dasharray="5,4"/>
|
||||
'article_erp_bom.svg': ('构', '''
|
||||
<circle cx="0" cy="0" r="110" fill="none" stroke="#E2E8F0" stroke-width="1.2" stroke-dasharray="5,4"/>
|
||||
<line x1="-90" y1="0" x2="90" y2="0" stroke="#CBD5E1" stroke-width="1"/>
|
||||
<line x1="0" y1="-90" x2="0" y2="90" stroke="#CBD5E1" stroke-width="1"/>
|
||||
<g filter="url(#artShadow)">
|
||||
<circle cx="0" cy="0" r="28" fill="url(#artBlue)"/>
|
||||
<circle cx="0" cy="0" r="12" fill="#FFFFFF"/>
|
||||
</g>
|
||||
<g transform="translate(-110, -25)">
|
||||
<circle cx="0" cy="0" r="16" fill="url(#artGlass)" stroke="#2563EB" stroke-width="1.2"/>
|
||||
<circle cx="0" cy="0" r="5" fill="#2563EB"/>
|
||||
<line x1="0" y1="0" x2="85" y2="20" stroke="#93C5FD" stroke-width="1.5" stroke-dasharray="3,3"/>
|
||||
</g>
|
||||
<g transform="translate(110, -25)">
|
||||
<circle cx="0" cy="0" r="16" fill="url(#artGlass)" stroke="#06B6D4" stroke-width="1.2"/>
|
||||
<circle cx="0" cy="0" r="5" fill="#06B6D4"/>
|
||||
<line x1="0" y1="0" x2="-85" y2="20" stroke="#93C5FD" stroke-width="1.5" stroke-dasharray="3,3"/>
|
||||
</g>
|
||||
<g transform="translate(0, 70)">
|
||||
<circle cx="0" cy="0" r="14" fill="url(#artGlass)" stroke="#7C3AED" stroke-width="1"/>
|
||||
<circle cx="0" cy="0" r="4.5" fill="#7C3AED"/>
|
||||
<line x1="0" y1="0" x2="0" y2="-42" stroke="#CBD5E1" stroke-width="1.2"/>
|
||||
<polygon points="0,-35 32,-12 32,22 0,42 -32,22 -32,-12" fill="url(#artGlass)" stroke="#2563EB" stroke-width="1.2"/>
|
||||
<circle cx="0" cy="5" r="16" fill="url(#artBlue)"/>
|
||||
<circle cx="0" cy="5" r="7" fill="#FFFFFF"/>
|
||||
</g>
|
||||
<circle cx="0" cy="-80" r="4.5" fill="#2563EB"/>
|
||||
<circle cx="80" cy="0" r="4.5" fill="#06B6D4"/>
|
||||
<circle cx="0" cy="80" r="4.5" fill="#7C3AED"/>
|
||||
<circle cx="-80" cy="0" r="4.5" fill="#2563EB"/>
|
||||
'''),
|
||||
|
||||
# 8. TDD 工程规范
|
||||
'article_tdd_standards.svg': ('律', '''
|
||||
<circle cx="0" cy="0" r="110" fill="none" stroke="#E2E8F0" stroke-width="1" stroke-dasharray="5,5"/>
|
||||
<g transform="translate(-60, 0)" filter="url(#artShadow)">
|
||||
<circle cx="0" cy="0" r="30" fill="url(#artBlue)"/>
|
||||
<circle cx="0" cy="0" r="12" fill="#FFFFFF"/>
|
||||
<circle cx="0" cy="0" r="5" fill="#1D4ED8"/>
|
||||
</g>
|
||||
<g transform="translate(60, 0)" filter="url(#artShadow)">
|
||||
<circle cx="0" cy="0" r="30" fill="url(#artCyan)"/>
|
||||
<circle cx="0" cy="0" r="12" fill="#FFFFFF"/>
|
||||
<circle cx="0" cy="0" r="5" fill="#0891B2"/>
|
||||
</g>
|
||||
<path d="M -30 -15 C 0 -35 0 -35 30 -15" fill="none" stroke="url(#artBlue)" stroke-width="2.2" stroke-linecap="round"/>
|
||||
<path d="M 30 15 C 0 35 0 35 -30 15" fill="none" stroke="url(#artCyan)" stroke-width="2.2" stroke-linecap="round"/>
|
||||
<circle cx="0" cy="-26" r="4" fill="#2563EB" filter="url(#artGlow)"/>
|
||||
<circle cx="0" cy="26" r="4" fill="#06B6D4" filter="url(#artGlow)"/>
|
||||
''')
|
||||
'article_security_whitepaper.svg': ('固', '''
|
||||
<path d="M 0 -85 L 60 -50 V 0 C 60 50 0 85 0 85 C 0 85 -60 50 -60 0 V -50 Z" fill="url(#artGlass)" stroke="#2563EB" stroke-width="1.5" filter="url(#artShadow)"/>
|
||||
<circle cx="0" cy="0" r="26" fill="url(#artBlue)"/>
|
||||
<circle cx="0" cy="0" r="12" fill="#FFFFFF"/>
|
||||
<circle cx="0" cy="0" r="5" fill="#1D4ED8"/>
|
||||
'''),
|
||||
|
||||
'article_southwest_digital.svg': ('融', '''
|
||||
<ellipse cx="0" cy="40" rx="180" ry="70" fill="none" stroke="#E2E8F0" stroke-width="1.2" stroke-dasharray="4,4"/>
|
||||
<path d="M -120 40 Q -60 -40 0 20 T 120 10" fill="none" stroke="url(#artBlue)" stroke-width="2.5" stroke-linecap="round"/>
|
||||
<circle cx="-60" cy="-10" r="6" fill="#2563EB" filter="url(#artGlow)"/>
|
||||
<circle cx="0" cy="20" r="7" fill="#06B6D4" filter="url(#artGlow)"/>
|
||||
<circle cx="60" cy="-15" r="6" fill="#7C3AED" filter="url(#artGlow)"/>
|
||||
'''),
|
||||
|
||||
'article_tdd_standards.svg': ('规', '''
|
||||
<rect x="-85" y="-85" width="170" height="170" rx="6" fill="none" stroke="#E2E8F0" stroke-width="1.2" stroke-dasharray="4,4"/>
|
||||
<circle cx="0" cy="0" r="65" fill="none" stroke="#CBD5E1" stroke-width="1"/>
|
||||
<polygon points="0,-40 38,25 -38,25" fill="url(#artGlass)" stroke="#2563EB" stroke-width="1.5" filter="url(#artShadow)"/>
|
||||
<circle cx="0" cy="5" r="14" fill="url(#artBlue)"/>
|
||||
<circle cx="0" cy="5" r="6" fill="#FFFFFF"/>
|
||||
'''),
|
||||
}
|
||||
|
||||
def generate_all_articles():
|
||||
for fname, (seal, vis) in articles.items():
|
||||
content = create_base_svg(seal, vis)
|
||||
path = os.path.join(TARGET_DIR, fname)
|
||||
with open(path, 'w', encoding='utf-8') as f:
|
||||
f.write(content.strip())
|
||||
print(f"Generated concise article cover: {fname} ({len(content)} bytes)")
|
||||
def generate_all():
|
||||
for filename, (seal_char, elements) in articles.items():
|
||||
svg_content = create_base_svg(seal_char, elements)
|
||||
filepath = os.path.join(TARGET_DIR, filename)
|
||||
with open(filepath, 'w', encoding='utf-8') as f:
|
||||
f.write(svg_content.strip())
|
||||
print(f"Generated concise article cover: {filename} ({len(svg_content)} bytes)")
|
||||
|
||||
if __name__ == '__main__':
|
||||
generate_all_articles()
|
||||
generate_all()
|
||||
|
||||
在新工单中引用
屏蔽一个用户