mirror of
https://github.com/h3pdesign/Neon-Vision-Editor
synced 2026-04-21 13:27:16 +00:00
docs(metrics): fix badge URLs and enlarge traffic panel
This commit is contained in:
parent
e9366c9456
commit
b7222d507d
4 changed files with 92 additions and 88 deletions
|
|
@ -361,7 +361,7 @@
|
|||
CODE_SIGNING_ALLOWED = YES;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 496;
|
||||
CURRENT_PROJECT_VERSION = 497;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = CS727NF72U;
|
||||
ENABLE_APP_SANDBOX = YES;
|
||||
|
|
@ -444,7 +444,7 @@
|
|||
CODE_SIGNING_ALLOWED = YES;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 496;
|
||||
CURRENT_PROJECT_VERSION = 497;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = CS727NF72U;
|
||||
ENABLE_APP_SANDBOX = YES;
|
||||
|
|
|
|||
|
|
@ -151,12 +151,12 @@
|
|||
|
||||
<p align="center"><em>Styled line chart shows per-release totals with 14-day traffic counters for clones and views.</em></p>
|
||||
<p align="center">
|
||||
<img alt="Git clones (14d)" src="https://img.shields.io/badge/Git%20clones%20%2814d%29-2624-7C3AED?style=for-the-badge">
|
||||
<img alt="GitHub views (14d)" src="https://img.shields.io/badge/GitHub%20views%20%2814d%29-865-0EA5E9?style=for-the-badge">
|
||||
<img alt="Git clones (14d)" src="https://img.shields.io/static/v1?label=Git+clones+%2814d%29&message=2624&color=7C3AED&style=for-the-badge">
|
||||
<img alt="GitHub views (14d)" src="https://img.shields.io/static/v1?label=GitHub+views+%2814d%29&message=865&color=0EA5E9&style=for-the-badge">
|
||||
</p>
|
||||
<p align="center">
|
||||
<img alt="Clone snapshot (UTC)" src="https://img.shields.io/badge/Clone%20snapshot%20%28UTC%29-2026-03-09%2000%3A00-334155?style=flat-square">
|
||||
<img alt="View snapshot (UTC)" src="https://img.shields.io/badge/View%20snapshot%20%28UTC%29-2026-03-09%2000%3A00-334155?style=flat-square">
|
||||
<img alt="Clone snapshot (UTC)" src="https://img.shields.io/static/v1?label=Clone+snapshot+%28UTC%29&message=2026-03-09+00%3A00&color=334155&style=flat-square">
|
||||
<img alt="View snapshot (UTC)" src="https://img.shields.io/static/v1?label=View+snapshot+%28UTC%29&message=2026-03-09+00%3A00&color=334155&style=flat-square">
|
||||
</p>
|
||||
|
||||
## Project Docs
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<svg width="1200" height="560" viewBox="0 0 1200 560" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="title desc">
|
||||
<svg width="1200" height="620" viewBox="0 0 1200 620" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="title desc">
|
||||
<title id="title">GitHub Release Downloads and Traffic Trend</title>
|
||||
<desc id="desc">Line chart of release downloads with 14-day traffic bars for clones and views.</desc>
|
||||
<defs>
|
||||
<linearGradient id="bg" x1="0" y1="0" x2="1200" y2="560" gradientUnits="userSpaceOnUse">
|
||||
<linearGradient id="bg" x1="0" y1="0" x2="1200" y2="620" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#061423"/>
|
||||
<stop offset="1" stop-color="#041C16"/>
|
||||
</linearGradient>
|
||||
|
|
@ -28,25 +28,25 @@
|
|||
</filter>
|
||||
</defs>
|
||||
|
||||
<rect width="1200" height="560" rx="18" fill="url(#bg)"/>
|
||||
<rect x="24" y="24" width="1152" height="512" rx="14" stroke="#2A4762" stroke-width="1.5"/>
|
||||
<rect width="1200" height="620" rx="18" fill="url(#bg)"/>
|
||||
<rect x="24" y="24" width="1152" height="572" rx="14" stroke="#2A4762" stroke-width="1.5"/>
|
||||
|
||||
<text x="70" y="68" fill="#E6F3FF" font-size="30" font-family="SF Pro Display, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="700">GitHub Release Downloads</text>
|
||||
<text x="70" y="96" fill="#9CC3E6" font-size="18" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">Snapshot: 2026-03-11</text>
|
||||
|
||||
<line x1="130" y1="330.0" x2="1070" y2="330.0" stroke="#37566F" stroke-width="1"/>
|
||||
<line x1="130" y1="277.5" x2="1070" y2="277.5" stroke="#2B4255" stroke-width="1"/>
|
||||
<line x1="130" y1="225.0" x2="1070" y2="225.0" stroke="#2B4255" stroke-width="1"/>
|
||||
<line x1="130" y1="172.5" x2="1070" y2="172.5" stroke="#2B4255" stroke-width="1"/>
|
||||
<line x1="130" y1="320.0" x2="1070" y2="320.0" stroke="#37566F" stroke-width="1"/>
|
||||
<line x1="130" y1="270.0" x2="1070" y2="270.0" stroke="#2B4255" stroke-width="1"/>
|
||||
<line x1="130" y1="220.0" x2="1070" y2="220.0" stroke="#2B4255" stroke-width="1"/>
|
||||
<line x1="130" y1="170.0" x2="1070" y2="170.0" stroke="#2B4255" stroke-width="1"/>
|
||||
<line x1="130" y1="120.0" x2="1070" y2="120.0" stroke="#37566F" stroke-width="1"/>
|
||||
<text x="68" y="336.0" fill="#9CC3E6" font-size="14" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">0</text>
|
||||
<text x="68" y="283.5" fill="#9CC3E6" font-size="14" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">7</text>
|
||||
<text x="58" y="231.0" fill="#9CC3E6" font-size="14" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">14</text>
|
||||
<text x="58" y="178.5" fill="#9CC3E6" font-size="14" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">21</text>
|
||||
<text x="68" y="326.0" fill="#9CC3E6" font-size="14" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">0</text>
|
||||
<text x="68" y="276.0" fill="#9CC3E6" font-size="14" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">7</text>
|
||||
<text x="58" y="226.0" fill="#9CC3E6" font-size="14" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">14</text>
|
||||
<text x="58" y="176.0" fill="#9CC3E6" font-size="14" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">21</text>
|
||||
<text x="58" y="126.0" fill="#9CC3E6" font-size="14" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">28</text>
|
||||
|
||||
<polyline
|
||||
points="130.0,187.5 264.3,142.5 398.6,217.5 532.9,202.5 667.1,202.5 801.4,210.0 935.7,180.0 1070.0,187.5"
|
||||
points="130.0,184.3 264.3,141.4 398.6,212.9 532.9,198.6 667.1,198.6 801.4,205.7 935.7,177.1 1070.0,184.3"
|
||||
fill="none"
|
||||
stroke="url(#line)"
|
||||
stroke-width="5"
|
||||
|
|
@ -55,45 +55,45 @@
|
|||
filter="url(#glow)"
|
||||
/>
|
||||
|
||||
<circle cx="130.0" cy="187.5" r="7" fill="#00C2FF" stroke="#D7F7FF" stroke-width="2"/>
|
||||
<circle cx="264.3" cy="142.5" r="7" fill="#00D7D2" stroke="#D7F7FF" stroke-width="2"/>
|
||||
<circle cx="398.6" cy="217.5" r="7" fill="#1AE7C0" stroke="#D7F7FF" stroke-width="2"/>
|
||||
<circle cx="532.9" cy="202.5" r="7" fill="#34EDAA" stroke="#D7F7FF" stroke-width="2"/>
|
||||
<circle cx="667.1" cy="202.5" r="7" fill="#47F193" stroke="#D7F7FF" stroke-width="2"/>
|
||||
<circle cx="801.4" cy="210.0" r="7" fill="#5AF57D" stroke="#D7F7FF" stroke-width="2"/>
|
||||
<circle cx="935.7" cy="180.0" r="7" fill="#72FA64" stroke="#D7F7FF" stroke-width="2"/>
|
||||
<circle cx="1070.0" cy="187.5" r="7" fill="#8CFF5A" stroke="#D7F7FF" stroke-width="2"/>
|
||||
<text x="116.0" y="362" fill="#D7E8F8" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">v0.4.31</text>
|
||||
<text x="250.3" y="362" fill="#D7E8F8" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">v0.4.32</text>
|
||||
<text x="384.6" y="362" fill="#D7E8F8" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">v0.4.33</text>
|
||||
<text x="518.9" y="362" fill="#D7E8F8" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">v0.4.34</text>
|
||||
<text x="653.1" y="362" fill="#D7E8F8" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">v0.5.0</text>
|
||||
<text x="787.4" y="362" fill="#D7E8F8" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">v0.5.1</text>
|
||||
<text x="921.7" y="362" fill="#D7E8F8" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">v0.5.2</text>
|
||||
<text x="1056.0" y="362" fill="#D7E8F8" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">v0.5.3</text>
|
||||
<text x="120.0" y="173.5" fill="#D7F7FF" font-size="15" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">19</text>
|
||||
<text x="254.3" y="164.5" fill="#D7F7FF" font-size="15" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">25</text>
|
||||
<text x="388.6" y="203.5" fill="#D7F7FF" font-size="15" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">15</text>
|
||||
<text x="522.9" y="188.5" fill="#D7F7FF" font-size="15" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">17</text>
|
||||
<text x="657.1" y="188.5" fill="#D7F7FF" font-size="15" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">17</text>
|
||||
<text x="791.4" y="196.0" fill="#D7F7FF" font-size="15" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">16</text>
|
||||
<text x="925.7" y="166.0" fill="#D7F7FF" font-size="15" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">20</text>
|
||||
<text x="1060.0" y="173.5" fill="#D7F7FF" font-size="15" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">19</text>
|
||||
<circle cx="130.0" cy="184.3" r="7" fill="#00C2FF" stroke="#D7F7FF" stroke-width="2"/>
|
||||
<circle cx="264.3" cy="141.4" r="7" fill="#00D7D2" stroke="#D7F7FF" stroke-width="2"/>
|
||||
<circle cx="398.6" cy="212.9" r="7" fill="#1AE7C0" stroke="#D7F7FF" stroke-width="2"/>
|
||||
<circle cx="532.9" cy="198.6" r="7" fill="#34EDAA" stroke="#D7F7FF" stroke-width="2"/>
|
||||
<circle cx="667.1" cy="198.6" r="7" fill="#47F193" stroke="#D7F7FF" stroke-width="2"/>
|
||||
<circle cx="801.4" cy="205.7" r="7" fill="#5AF57D" stroke="#D7F7FF" stroke-width="2"/>
|
||||
<circle cx="935.7" cy="177.1" r="7" fill="#72FA64" stroke="#D7F7FF" stroke-width="2"/>
|
||||
<circle cx="1070.0" cy="184.3" r="7" fill="#8CFF5A" stroke="#D7F7FF" stroke-width="2"/>
|
||||
<text x="116.0" y="352" fill="#D7E8F8" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">v0.4.31</text>
|
||||
<text x="250.3" y="352" fill="#D7E8F8" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">v0.4.32</text>
|
||||
<text x="384.6" y="352" fill="#D7E8F8" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">v0.4.33</text>
|
||||
<text x="518.9" y="352" fill="#D7E8F8" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">v0.4.34</text>
|
||||
<text x="653.1" y="352" fill="#D7E8F8" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">v0.5.0</text>
|
||||
<text x="787.4" y="352" fill="#D7E8F8" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">v0.5.1</text>
|
||||
<text x="921.7" y="352" fill="#D7E8F8" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">v0.5.2</text>
|
||||
<text x="1056.0" y="352" fill="#D7E8F8" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">v0.5.3</text>
|
||||
<text x="120.0" y="170.3" fill="#D7F7FF" font-size="15" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">19</text>
|
||||
<text x="254.3" y="163.4" fill="#D7F7FF" font-size="15" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">25</text>
|
||||
<text x="388.6" y="198.9" fill="#D7F7FF" font-size="15" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">15</text>
|
||||
<text x="522.9" y="184.6" fill="#D7F7FF" font-size="15" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">17</text>
|
||||
<text x="657.1" y="184.6" fill="#D7F7FF" font-size="15" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">17</text>
|
||||
<text x="791.4" y="191.7" fill="#D7F7FF" font-size="15" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">16</text>
|
||||
<text x="925.7" y="163.1" fill="#D7F7FF" font-size="15" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">20</text>
|
||||
<text x="1060.0" y="170.3" fill="#D7F7FF" font-size="15" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">19</text>
|
||||
|
||||
<text x="776" y="56" fill="#D7F7FF" font-size="15" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">Release trend line with highlighted points</text>
|
||||
<rect x="58" y="390" width="1084" height="132" rx="12" fill="#0A1A2B" stroke="#2A4762" stroke-width="1"/>
|
||||
<text x="84" y="420" fill="#E6F3FF" font-size="18" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">Repository Traffic (last 14 days)</text>
|
||||
<text x="86" y="434" fill="#C4B5FD" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">Clones: 2624</text>
|
||||
<rect x="86" y="442" width="1024" height="18" rx="9" fill="#15263A" stroke="#2B4255" stroke-width="1"/>
|
||||
<rect x="86" y="442" width="959.6" height="18" rx="9" fill="url(#cloneFill)"/>
|
||||
<text x="86" y="466" fill="#7DD3FC" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">Views: 865</text>
|
||||
<rect x="86" y="474" width="1024" height="18" rx="9" fill="#15263A" stroke="#2B4255" stroke-width="1"/>
|
||||
<rect x="86" y="474" width="316.3" height="18" rx="9" fill="url(#viewFill)"/>
|
||||
<line x1="86" y1="426" x2="86" y2="500" stroke="#436280" stroke-width="1"/>
|
||||
<line x1="598.0" y1="426" x2="598.0" y2="500" stroke="#436280" stroke-width="1"/>
|
||||
<line x1="1110" y1="426" x2="1110" y2="500" stroke="#436280" stroke-width="1"/>
|
||||
<text x="84" y="512" text-anchor="start" fill="#9CC3E6" font-size="12" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">0</text>
|
||||
<text x="598.0" y="512" text-anchor="middle" fill="#9CC3E6" font-size="12" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">1400</text>
|
||||
<text x="1112" y="512" text-anchor="end" fill="#9CC3E6" font-size="12" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">2800</text>
|
||||
<text x="86" y="526" fill="#9CC3E6" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">Shared scale: 0 to 2800 events in the last 14 days.</text>
|
||||
<rect x="58" y="378" width="1084" height="210" rx="12" fill="#0A1A2B" stroke="#2A4762" stroke-width="1"/>
|
||||
<text x="84" y="412" fill="#E6F3FF" font-size="20" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="700">Repository Traffic (last 14 days)</text>
|
||||
<text x="86" y="438" fill="#C4B5FD" font-size="15" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">Clones: 2624</text>
|
||||
<rect x="86" y="450" width="1024" height="26" rx="10" fill="#15263A" stroke="#2B4255" stroke-width="1"/>
|
||||
<rect x="86" y="450" width="959.6" height="26" rx="10" fill="url(#cloneFill)"/>
|
||||
<text x="86" y="498" fill="#7DD3FC" font-size="15" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">Views: 865</text>
|
||||
<rect x="86" y="510" width="1024" height="26" rx="10" fill="#15263A" stroke="#2B4255" stroke-width="1"/>
|
||||
<rect x="86" y="510" width="316.3" height="26" rx="10" fill="url(#viewFill)"/>
|
||||
<line x1="86" y1="430" x2="86" y2="548" stroke="#436280" stroke-width="1"/>
|
||||
<line x1="598.0" y1="430" x2="598.0" y2="548" stroke="#436280" stroke-width="1"/>
|
||||
<line x1="1110" y1="430" x2="1110" y2="548" stroke="#436280" stroke-width="1"/>
|
||||
<text x="84" y="566" text-anchor="start" fill="#9CC3E6" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">0</text>
|
||||
<text x="598.0" y="566" text-anchor="middle" fill="#9CC3E6" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">1400</text>
|
||||
<text x="1112" y="566" text-anchor="end" fill="#9CC3E6" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">2800</text>
|
||||
<text x="86" y="588" fill="#9CC3E6" font-size="14" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">Shared scale: 0 to 2800 events in the last 14 days.</text>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
|
@ -219,11 +219,11 @@ def y_top(max_value: int, ticks: int = 4) -> int:
|
|||
|
||||
def generate_svg(points: list[ReleasePoint], clone_total: int, view_total: int, snapshot_date: str) -> str:
|
||||
width = 1200
|
||||
height = 560
|
||||
height = 620
|
||||
left = 130
|
||||
right = 1070
|
||||
top = 120
|
||||
bottom = 330
|
||||
bottom = 320
|
||||
|
||||
max_downloads = max(p.downloads for p in points)
|
||||
top_value = y_top(max_downloads, ticks=4)
|
||||
|
|
@ -266,7 +266,7 @@ def generate_svg(points: list[ReleasePoint], clone_total: int, view_total: int,
|
|||
f' <circle cx="{x:.1f}" cy="{y:.1f}" r="7" fill="{fill}" stroke="#D7F7FF" stroke-width="2"/>'
|
||||
)
|
||||
x_labels.append(
|
||||
f' <text x="{x - 14:.1f}" y="362" fill="#D7E8F8" font-size="13" '
|
||||
f' <text x="{x - 14:.1f}" y="352" fill="#D7E8F8" font-size="13" '
|
||||
'font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">'
|
||||
f"{point.tag}</text>"
|
||||
)
|
||||
|
|
@ -280,15 +280,15 @@ def generate_svg(points: list[ReleasePoint], clone_total: int, view_total: int,
|
|||
polyline_points = " ".join(f"{x:.1f},{y:.1f}" for x, y in coords)
|
||||
|
||||
clone_panel: list[str] = [
|
||||
' <rect x="58" y="390" width="1084" height="132" rx="12" fill="#0A1A2B" stroke="#2A4762" stroke-width="1"/>',
|
||||
f' <text x="84" y="420" fill="#E6F3FF" font-size="18" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">Repository Traffic (last {CLONES_WINDOW_DAYS} days)</text>',
|
||||
' <rect x="58" y="378" width="1084" height="210" rx="12" fill="#0A1A2B" stroke="#2A4762" stroke-width="1"/>',
|
||||
f' <text x="84" y="412" fill="#E6F3FF" font-size="20" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="700">Repository Traffic (last {CLONES_WINDOW_DAYS} days)</text>',
|
||||
]
|
||||
panel_left = 86
|
||||
panel_right = 1110
|
||||
clone_bar_top = 442
|
||||
clone_bar_bottom = 460
|
||||
view_bar_top = 474
|
||||
view_bar_bottom = 492
|
||||
clone_bar_top = 450
|
||||
clone_bar_bottom = 476
|
||||
view_bar_top = 510
|
||||
view_bar_bottom = 536
|
||||
track_width = panel_right - panel_left
|
||||
traffic_scale_max = max(100, y_top(max(1, clone_total, view_total), ticks=4))
|
||||
clone_fill_ratio = min(1.0, clone_total / traffic_scale_max)
|
||||
|
|
@ -299,27 +299,27 @@ def generate_svg(points: list[ReleasePoint], clone_total: int, view_total: int,
|
|||
mid_x = panel_left + (track_width * 0.5)
|
||||
clone_panel.extend(
|
||||
[
|
||||
f' <text x="{panel_left}" y="{clone_bar_top - 8}" fill="#C4B5FD" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">Clones: {clone_total}</text>',
|
||||
f' <rect x="{panel_left}" y="{clone_bar_top}" width="{track_width}" height="{clone_bar_bottom - clone_bar_top}" rx="9" fill="#15263A" stroke="#2B4255" stroke-width="1"/>',
|
||||
f' <rect x="{panel_left}" y="{clone_bar_top}" width="{clone_fill_width:.1f}" height="{clone_bar_bottom - clone_bar_top}" rx="9" fill="url(#cloneFill)"/>',
|
||||
f' <text x="{panel_left}" y="{view_bar_top - 8}" fill="#7DD3FC" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">Views: {view_total}</text>',
|
||||
f' <rect x="{panel_left}" y="{view_bar_top}" width="{track_width}" height="{view_bar_bottom - view_bar_top}" rx="9" fill="#15263A" stroke="#2B4255" stroke-width="1"/>',
|
||||
f' <rect x="{panel_left}" y="{view_bar_top}" width="{view_fill_width:.1f}" height="{view_bar_bottom - view_bar_top}" rx="9" fill="url(#viewFill)"/>',
|
||||
f' <line x1="{panel_left}" y1="{clone_bar_top - 16}" x2="{panel_left}" y2="{view_bar_bottom + 8}" stroke="#436280" stroke-width="1"/>',
|
||||
f' <line x1="{mid_x:.1f}" y1="{clone_bar_top - 16}" x2="{mid_x:.1f}" y2="{view_bar_bottom + 8}" stroke="#436280" stroke-width="1"/>',
|
||||
f' <line x1="{panel_right}" y1="{clone_bar_top - 16}" x2="{panel_right}" y2="{view_bar_bottom + 8}" stroke="#436280" stroke-width="1"/>',
|
||||
f' <text x="{panel_left - 2}" y="{view_bar_bottom + 20}" text-anchor="start" fill="#9CC3E6" font-size="12" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">0</text>',
|
||||
f' <text x="{mid_x:.1f}" y="{view_bar_bottom + 20}" text-anchor="middle" fill="#9CC3E6" font-size="12" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">{mid_value}</text>',
|
||||
f' <text x="{panel_right + 2}" y="{view_bar_bottom + 20}" text-anchor="end" fill="#9CC3E6" font-size="12" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">{traffic_scale_max}</text>',
|
||||
f' <text x="{panel_left}" y="{view_bar_bottom + 34}" fill="#9CC3E6" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">Shared scale: 0 to {traffic_scale_max} events in the last {CLONES_WINDOW_DAYS} days.</text>',
|
||||
f' <text x="{panel_left}" y="{clone_bar_top - 12}" fill="#C4B5FD" font-size="15" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">Clones: {clone_total}</text>',
|
||||
f' <rect x="{panel_left}" y="{clone_bar_top}" width="{track_width}" height="{clone_bar_bottom - clone_bar_top}" rx="10" fill="#15263A" stroke="#2B4255" stroke-width="1"/>',
|
||||
f' <rect x="{panel_left}" y="{clone_bar_top}" width="{clone_fill_width:.1f}" height="{clone_bar_bottom - clone_bar_top}" rx="10" fill="url(#cloneFill)"/>',
|
||||
f' <text x="{panel_left}" y="{view_bar_top - 12}" fill="#7DD3FC" font-size="15" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="600">Views: {view_total}</text>',
|
||||
f' <rect x="{panel_left}" y="{view_bar_top}" width="{track_width}" height="{view_bar_bottom - view_bar_top}" rx="10" fill="#15263A" stroke="#2B4255" stroke-width="1"/>',
|
||||
f' <rect x="{panel_left}" y="{view_bar_top}" width="{view_fill_width:.1f}" height="{view_bar_bottom - view_bar_top}" rx="10" fill="url(#viewFill)"/>',
|
||||
f' <line x1="{panel_left}" y1="{clone_bar_top - 20}" x2="{panel_left}" y2="{view_bar_bottom + 12}" stroke="#436280" stroke-width="1"/>',
|
||||
f' <line x1="{mid_x:.1f}" y1="{clone_bar_top - 20}" x2="{mid_x:.1f}" y2="{view_bar_bottom + 12}" stroke="#436280" stroke-width="1"/>',
|
||||
f' <line x1="{panel_right}" y1="{clone_bar_top - 20}" x2="{panel_right}" y2="{view_bar_bottom + 12}" stroke="#436280" stroke-width="1"/>',
|
||||
f' <text x="{panel_left - 2}" y="{view_bar_bottom + 30}" text-anchor="start" fill="#9CC3E6" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">0</text>',
|
||||
f' <text x="{mid_x:.1f}" y="{view_bar_bottom + 30}" text-anchor="middle" fill="#9CC3E6" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">{mid_value}</text>',
|
||||
f' <text x="{panel_right + 2}" y="{view_bar_bottom + 30}" text-anchor="end" fill="#9CC3E6" font-size="13" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">{traffic_scale_max}</text>',
|
||||
f' <text x="{panel_left}" y="{view_bar_bottom + 52}" fill="#9CC3E6" font-size="14" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">Shared scale: 0 to {traffic_scale_max} events in the last {CLONES_WINDOW_DAYS} days.</text>',
|
||||
]
|
||||
)
|
||||
|
||||
return """<svg width="1200" height="560" viewBox="0 0 1200 560" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="title desc">
|
||||
return """<svg width="1200" height="620" viewBox="0 0 1200 620" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="title desc">
|
||||
<title id="title">GitHub Release Downloads and Traffic Trend</title>
|
||||
<desc id="desc">Line chart of release downloads with 14-day traffic bars for clones and views.</desc>
|
||||
<defs>
|
||||
<linearGradient id="bg" x1="0" y1="0" x2="1200" y2="560" gradientUnits="userSpaceOnUse">
|
||||
<linearGradient id="bg" x1="0" y1="0" x2="1200" y2="620" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#061423"/>
|
||||
<stop offset="1" stop-color="#041C16"/>
|
||||
</linearGradient>
|
||||
|
|
@ -345,8 +345,8 @@ def generate_svg(points: list[ReleasePoint], clone_total: int, view_total: int,
|
|||
</filter>
|
||||
</defs>
|
||||
|
||||
<rect width="1200" height="560" rx="18" fill="url(#bg)"/>
|
||||
<rect x="24" y="24" width="1152" height="512" rx="14" stroke="#2A4762" stroke-width="1.5"/>
|
||||
<rect width="1200" height="620" rx="18" fill="url(#bg)"/>
|
||||
<rect x="24" y="24" width="1152" height="572" rx="14" stroke="#2A4762" stroke-width="1.5"/>
|
||||
|
||||
<text x="70" y="68" fill="#E6F3FF" font-size="30" font-family="SF Pro Display, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-weight="700">GitHub Release Downloads</text>
|
||||
<text x="70" y="96" fill="#9CC3E6" font-size="18" font-family="SF Pro Text, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">Snapshot: SNAPSHOT_DATE</text>
|
||||
|
|
@ -425,11 +425,15 @@ def parse_existing_view_snapshot(content: str) -> str | None:
|
|||
|
||||
|
||||
def shields_badge(label: str, message: str, color: str, style: str = "for-the-badge") -> str:
|
||||
encoded_label = urllib.parse.quote(label, safe="")
|
||||
encoded_message = urllib.parse.quote(message, safe="")
|
||||
return (
|
||||
f"https://img.shields.io/badge/{encoded_label}-{encoded_message}-{color}?style={style}"
|
||||
query = urllib.parse.urlencode(
|
||||
{
|
||||
"label": label,
|
||||
"message": message,
|
||||
"color": color,
|
||||
"style": style,
|
||||
}
|
||||
)
|
||||
return f"https://img.shields.io/static/v1?{query}"
|
||||
|
||||
|
||||
def update_readme(
|
||||
|
|
|
|||
Loading…
Reference in a new issue