Skip to content

Commit

Permalink
新增SVG
Browse files Browse the repository at this point in the history
  • Loading branch information
lunzhiPenxil committed Dec 25, 2023
1 parent a405a50 commit 0b9d2c7
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 71 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# 扩展市场

![json](./script/JSON.svg)
![classic](./script/classic.svg)
![yaml](./script/yaml.svg)
![excel](./script/excel.svg)

本仓库用于供应扩展文件内容和对应的接口

Expand Down
6 changes: 3 additions & 3 deletions script/JSON.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions script/releaseDeck.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def formatUTF8WithBOM(data:bytes):
print('releaseDeck done!')

for typeName in dictCount:
str_this = f'''<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="130" height="20" role="img" aria-label="JSON">
str_this = f'''<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="80" height="20" role="img" aria-label="JSON">
<title>test: test</title>
<linearGradient id="s" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
Expand All @@ -139,8 +139,8 @@ def formatUTF8WithBOM(data:bytes):
</clipPath>
<g clip-path="url(#r)">
<rect width="40" height="20" fill="#555"/>
<rect x="40" width="130" height="20" fill="#007ec6"/>
<rect width="130" height="20" fill="url(#s)"/>
<rect x="40" width="40" height="20" fill="#007ec6"/>
<rect width="80" height="20" fill="url(#s)"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110">
<text aria-hidden="true" x="210" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="">{dictMappping.get(typeName, "N/A")}</text>
Expand All @@ -150,7 +150,7 @@ def formatUTF8WithBOM(data:bytes):
</g>
</svg>
'''
with open(f'../target/deck/{typeName}.svg', 'w', encoding='utf-8') as f:
with open(f'../script/{typeName}.svg', 'w', encoding='utf-8') as f:
f.write(str_this)

print('releaseSvg done!')
21 changes: 0 additions & 21 deletions target/deck/classic.svg

This file was deleted.

21 changes: 0 additions & 21 deletions target/deck/excel.svg

This file was deleted.

21 changes: 0 additions & 21 deletions target/deck/yaml.svg

This file was deleted.

0 comments on commit 0b9d2c7

Please sign in to comment.