10 lines
704 B
Python
10 lines
704 B
Python
from pathlib import Path
|
|
import urllib.request, json
|
|
root=Path(__file__).resolve().parents[1]/'ikar_server/src/Ikar.Server/wwwroot/stickers'
|
|
root.mkdir(exist_ok=True)
|
|
items=[('1f600','😀'),('1f60a','😊'),('1f607','😇'),('1f44b','👋'),('1f44d','👍'),('1f44c','👌'),('1f49b','💛'),('1f525','🔥')]
|
|
for code,tag in items:
|
|
urllib.request.urlretrieve(f'https://raw.githubusercontent.com/googlefonts/noto-emoji/v2.047/png/128/emoji_u{code}.png',root/f'{code}.png')
|
|
urllib.request.urlretrieve('https://raw.githubusercontent.com/googlefonts/noto-emoji/v2.047/LICENSE',root/'LICENSE-NOTO.txt')
|
|
print(json.dumps({'stickers':len(items),'source':'googlefonts/noto-emoji','license':'Apache-2.0'}))
|