aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2026-05-11 22:39:03 -0700
committerPinapelz <yukais@pinapelz.com>2026-05-11 22:39:03 -0700
commit434a0414377d098671ba92c33100943ca0c328fe (patch)
tree17b84c2fcea83d3562fbdcbfff5f1d28004a963a
parent4c13a2c254d68980bcf43f132e0b78e3c08ed3b1 (diff)
add stickersHEADmaster
-rw-r--r--build/lib/sticker/__init__.py2
-rw-r--r--build/lib/sticker/download_thumbnails.py58
-rw-r--r--build/lib/sticker/get_version.py50
-rw-r--r--build/lib/sticker/lib/__init__.py0
-rw-r--r--build/lib/sticker/lib/matrix.py90
-rw-r--r--build/lib/sticker/lib/util.py94
-rw-r--r--build/lib/sticker/pack.py150
-rw-r--r--build/lib/sticker/scalar_convert.py56
-rw-r--r--build/lib/sticker/stickerimport.py168
-rw-r--r--build/lib/sticker/version.py6
-rw-r--r--dank/aware.pngbin0 -> 10833 bytes
-rw-r--r--dank/classic.pngbin0 -> 26222 bytes
-rw-r--r--dank/pack.json1
-rw-r--r--dank/smiley_good.pngbin0 -> 91409 bytes
-rw-r--r--dank/smiley_grrr.pngbin0 -> 90479 bytes
-rw-r--r--dank/smiley_no_no.pngbin0 -> 93323 bytes
-rw-r--r--dank/smiley_whatever.pngbin0 -> 59102 bytes
-rw-r--r--dank/xqc_ok.pngbin0 -> 40569 bytes
-rw-r--r--sticker/version.py7
-rw-r--r--web/packs/dank.json1
-rw-r--r--web/packs/index.json7
-rw-r--r--web/packs/thumbnails/APyHPuZmyRfUwwsEHijRGdjPbin0 -> 47309 bytes
-rw-r--r--web/packs/thumbnails/ASWmCLdLLTVqLwXptdkBMtwsbin0 -> 29637 bytes
-rw-r--r--web/packs/thumbnails/CLkWhgAkDubZmahPWinNMaScbin0 -> 31164 bytes
-rw-r--r--web/packs/thumbnails/DlLllEJSQYkOCBBzqVzdxuwRbin0 -> 35734 bytes
-rw-r--r--web/packs/thumbnails/MjoQgqCbNmTRuQfDngBPPoOCbin0 -> 52103 bytes
-rw-r--r--web/packs/thumbnails/OddXtQLRutxvLZWWxNicguMcbin0 -> 28353 bytes
-rw-r--r--web/packs/thumbnails/PdyEJxgwOfBCxySfSFYlgPzPbin0 -> 90928 bytes
-rw-r--r--web/packs/thumbnails/QURUNgNThYmIdzyasFdcLJnrbin0 -> 17080 bytes
-rw-r--r--web/packs/thumbnails/SzxfhuJJdFPYzoPvSDIBhWxbbin0 -> 37322 bytes
-rw-r--r--web/packs/thumbnails/XmPidyRFUqsIUfMJXlyMqKTgbin0 -> 58621 bytes
-rw-r--r--web/packs/thumbnails/ZBxiNUARoFZGoETjySzbKoAcbin0 -> 26042 bytes
-rw-r--r--web/packs/thumbnails/ZTckkllzHDrGCbrXBEqzDUYBbin0 -> 45997 bytes
-rw-r--r--web/packs/thumbnails/aUBbgTfxxfWapJXDzOGsGWGxbin0 -> 39863 bytes
-rw-r--r--web/packs/thumbnails/xpwjfgHzxJFTiJWIXMEvBBckbin0 -> 89762 bytes
-rw-r--r--web/packs/thumbnails/yLAyUjCErrmXBfcAAUxYygsPbin0 -> 93010 bytes
-rw-r--r--web/packs/weeb.json1
-rw-r--r--weeb/erina_i_may_be_dumb.pngbin0 -> 33393 bytes
-rw-r--r--weeb/miku_honest_reaction.pngbin0 -> 25032 bytes
-rw-r--r--weeb/not_bad.pngbin0 -> 31453 bytes
-rw-r--r--weeb/pack.json1
-rw-r--r--weeb/peko_interesting.pngbin0 -> 31442 bytes
-rw-r--r--weeb/peko_unbelievable.pngbin0 -> 46652 bytes
-rw-r--r--weeb/senmei_caught_4k.pngbin0 -> 39702 bytes
-rw-r--r--weeb/tsukasa_lewd.pngbin0 -> 29793 bytes
-rw-r--r--weeb/weeb_fuck_everything.pngbin0 -> 42264 bytes
46 files changed, 691 insertions, 1 deletions
diff --git a/build/lib/sticker/__init__.py b/build/lib/sticker/__init__.py
new file mode 100644
index 0000000..86e4dc2
--- /dev/null
+++ b/build/lib/sticker/__init__.py
@@ -0,0 +1,2 @@
+__version__ = "0.1.0+dev"
+__author__ = "Tulir Asokan <tulir@maunium.net>"
diff --git a/build/lib/sticker/download_thumbnails.py b/build/lib/sticker/download_thumbnails.py
new file mode 100644
index 0000000..e082914
--- /dev/null
+++ b/build/lib/sticker/download_thumbnails.py
@@ -0,0 +1,58 @@
+# maunium-stickerpicker - A fast and simple Matrix sticker picker widget.
+# Copyright (C) 2025 Tulir Asokan
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+from pathlib import Path
+from typing import Dict
+import argparse
+import asyncio
+import json
+
+from aiohttp import ClientSession
+from yarl import URL
+
+from .lib import matrix, util
+
+parser = argparse.ArgumentParser()
+parser.add_argument("--config",
+ help="Path to JSON file with Matrix homeserver and access_token",
+ type=str, default="config.json", metavar="file")
+parser.add_argument("path", help="Path to the sticker pack JSON file", type=str)
+
+
+async def main(args: argparse.Namespace) -> None:
+ await matrix.load_config(args.config)
+ with util.open_utf8(args.path) as pack_file:
+ pack = json.load(pack_file)
+ print(f"Loaded existing pack meta from {args.path}")
+
+ stickers_data: Dict[str, bytes] = {}
+ async with ClientSession() as sess:
+ for sticker in pack["stickers"]:
+ dl_url = URL(matrix.homeserver_url) / "_matrix/client/v1/media/download" / sticker["url"].removeprefix("mxc://")
+ print("Downloading", sticker["url"])
+ async with sess.get(dl_url, headers={"Authorization": f"Bearer {matrix.access_token}"}) as resp:
+ resp.raise_for_status()
+ stickers_data[sticker["url"]] = await resp.read()
+
+ print("All stickers downloaded, generating thumbnails...")
+ util.add_thumbnails(pack["stickers"], stickers_data, Path(args.path).parent)
+ print("Done!")
+
+def cmd():
+ asyncio.run(main(parser.parse_args()))
+
+
+if __name__ == "__main__":
+ cmd()
diff --git a/build/lib/sticker/get_version.py b/build/lib/sticker/get_version.py
new file mode 100644
index 0000000..3149eb0
--- /dev/null
+++ b/build/lib/sticker/get_version.py
@@ -0,0 +1,50 @@
+import subprocess
+import shutil
+import os
+
+from . import __version__
+
+cmd_env = {
+ "PATH": os.environ["PATH"],
+ "HOME": os.environ["HOME"],
+ "LANG": "C",
+ "LC_ALL": "C",
+}
+
+
+def run(cmd):
+ return subprocess.check_output(cmd, stderr=subprocess.DEVNULL, env=cmd_env)
+
+
+if (os.path.exists("../.git") or os.path.exists(".git")) and shutil.which("git"):
+ try:
+ git_revision = run(["git", "rev-parse", "HEAD"]).strip().decode("ascii")
+ git_revision_url = f"https://github.com/maunium/stickerpicker/commit/{git_revision}"
+ git_revision = git_revision[:8]
+ except (subprocess.SubprocessError, OSError):
+ git_revision = "unknown"
+ git_revision_url = None
+
+ try:
+ git_tag = run(["git", "describe", "--exact-match", "--tags"]).strip().decode("ascii")
+ except (subprocess.SubprocessError, OSError):
+ git_tag = None
+else:
+ git_revision = "unknown"
+ git_revision_url = None
+ git_tag = None
+
+git_tag_url = (f"https://github.com/maunium/stickerpicker/releases/tag/{git_tag}"
+ if git_tag else None)
+
+if git_tag and __version__ == git_tag[1:].replace("-", ""):
+ version = __version__
+ linkified_version = f"[{version}]({git_tag_url})"
+else:
+ if not __version__.endswith("+dev"):
+ __version__ += "+dev"
+ version = f"{__version__}.{git_revision}"
+ if git_revision_url:
+ linkified_version = f"{__version__}.[{git_revision}]({git_revision_url})"
+ else:
+ linkified_version = version
diff --git a/build/lib/sticker/lib/__init__.py b/build/lib/sticker/lib/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/build/lib/sticker/lib/__init__.py
diff --git a/build/lib/sticker/lib/matrix.py b/build/lib/sticker/lib/matrix.py
new file mode 100644
index 0000000..2216b04
--- /dev/null
+++ b/build/lib/sticker/lib/matrix.py
@@ -0,0 +1,90 @@
+# maunium-stickerpicker - A fast and simple Matrix sticker picker widget.
+# Copyright (C) 2020 Tulir Asokan
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+from typing import Optional, TYPE_CHECKING
+import json
+
+from aiohttp import ClientSession
+from yarl import URL
+
+access_token: Optional[str] = None
+homeserver_url: Optional[str] = None
+
+upload_url: Optional[URL] = None
+
+if TYPE_CHECKING:
+ from typing import TypedDict
+
+
+ class MediaInfo(TypedDict):
+ w: int
+ h: int
+ size: int
+ mimetype: str
+ thumbnail_url: Optional[str]
+ thumbnail_info: Optional['MediaInfo']
+
+
+ class StickerInfo(TypedDict, total=False):
+ body: str
+ url: str
+ info: MediaInfo
+ id: str
+ msgtype: str
+else:
+ MediaInfo = None
+ StickerInfo = None
+
+
+async def load_config(path: str) -> None:
+ global access_token, homeserver_url, upload_url
+ try:
+ with open(path) as config_file:
+ config = json.load(config_file)
+ homeserver_url = config["homeserver"]
+ access_token = config["access_token"]
+ except FileNotFoundError:
+ print("Matrix config file not found. Please enter your homeserver and access token.")
+ homeserver_url = input("Homeserver URL: ")
+ access_token = input("Access token: ")
+ whoami_url = URL(homeserver_url) / "_matrix" / "client" / "v3" / "account" / "whoami"
+ if whoami_url.scheme not in ("https", "http"):
+ whoami_url = whoami_url.with_scheme("https")
+ user_id = await whoami(whoami_url, access_token)
+ with open(path, "w") as config_file:
+ json.dump({
+ "homeserver": homeserver_url,
+ "user_id": user_id,
+ "access_token": access_token,
+ }, config_file)
+ print(f"Wrote config to {path}")
+
+ upload_url = URL(homeserver_url) / "_matrix" / "media" / "v3" / "upload"
+
+
+async def whoami(url: URL, access_token: str) -> str:
+ headers = {"Authorization": f"Bearer {access_token}"}
+ async with ClientSession() as sess, sess.get(url, headers=headers) as resp:
+ resp.raise_for_status()
+ user_id = (await resp.json())["user_id"]
+ print(f"Access token validated (user ID: {user_id})")
+ return user_id
+
+
+async def upload(data: bytes, mimetype: str, filename: str) -> str:
+ url = upload_url.with_query({"filename": filename})
+ headers = {"Content-Type": mimetype, "Authorization": f"Bearer {access_token}"}
+ async with ClientSession() as sess, sess.post(url, data=data, headers=headers) as resp:
+ return (await resp.json())["content_uri"]
diff --git a/build/lib/sticker/lib/util.py b/build/lib/sticker/lib/util.py
new file mode 100644
index 0000000..1d2b84c
--- /dev/null
+++ b/build/lib/sticker/lib/util.py
@@ -0,0 +1,94 @@
+# maunium-stickerpicker - A fast and simple Matrix sticker picker widget.
+# Copyright (C) 2020 Tulir Asokan
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+from functools import partial
+from io import BytesIO
+import os.path
+import json
+from pathlib import Path
+from typing import Dict, List
+
+from PIL import Image
+
+from . import matrix
+
+open_utf8 = partial(open, encoding='UTF-8')
+
+def convert_image(data: bytes, max_w=256, max_h=256) -> (bytes, int, int):
+ image: Image.Image = Image.open(BytesIO(data)).convert("RGBA")
+ new_file = BytesIO()
+ image.save(new_file, "png")
+ w, h = image.size
+ if w > max_w or h > max_h:
+ # Set the width and height to lower values so clients wouldn't show them as huge images
+ if w > h:
+ h = int(h / (w / max_w))
+ w = max_w
+ else:
+ w = int(w / (h / max_h))
+ h = max_h
+ return new_file.getvalue(), w, h
+
+
+def add_to_index(name: str, output_dir: str) -> None:
+ index_path = os.path.join(output_dir, "index.json")
+ try:
+ with open_utf8(index_path) as index_file:
+ index_data = json.load(index_file)
+ except (FileNotFoundError, json.JSONDecodeError):
+ index_data = {"packs": []}
+ if "homeserver_url" not in index_data and matrix.homeserver_url:
+ index_data["homeserver_url"] = matrix.homeserver_url
+ if name not in index_data["packs"]:
+ index_data["packs"].append(name)
+ with open_utf8(index_path, "w") as index_file:
+ json.dump(index_data, index_file, indent=" ")
+ print(f"Added {name} to {index_path}")
+
+
+def make_sticker(mxc: str, width: int, height: int, size: int,
+ body: str = "") -> matrix.StickerInfo:
+ return {
+ "body": body,
+ "url": mxc,
+ "info": {
+ "w": width,
+ "h": height,
+ "size": size,
+ "mimetype": "image/png",
+
+ # Element iOS compatibility hack
+ "thumbnail_url": mxc,
+ "thumbnail_info": {
+ "w": width,
+ "h": height,
+ "size": size,
+ "mimetype": "image/png",
+ },
+ },
+ "msgtype": "m.sticker",
+ }
+
+
+def add_thumbnails(stickers: List[matrix.StickerInfo], stickers_data: Dict[str, bytes], output_dir: str) -> None:
+ thumbnails = Path(output_dir, "thumbnails")
+ thumbnails.mkdir(parents=True, exist_ok=True)
+
+ for sticker in stickers:
+ image_data, _, _ = convert_image(stickers_data[sticker["url"]], 128, 128)
+
+ name = sticker["url"].split("/")[-1]
+ thumbnail_path = thumbnails / name
+ thumbnail_path.write_bytes(image_data) \ No newline at end of file
diff --git a/build/lib/sticker/pack.py b/build/lib/sticker/pack.py
new file mode 100644
index 0000000..1a0bb41
--- /dev/null
+++ b/build/lib/sticker/pack.py
@@ -0,0 +1,150 @@
+# maunium-stickerpicker - A fast and simple Matrix sticker picker widget.
+# Copyright (C) 2020 Tulir Asokan
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+from pathlib import Path
+from typing import Dict, Optional
+from hashlib import sha256
+import mimetypes
+import argparse
+import os.path
+import asyncio
+import string
+import json
+
+try:
+ import magic
+except ImportError:
+ print("[Warning] Magic is not installed, using file extensions to guess mime types")
+ magic = None
+
+from .lib import matrix, util
+
+
+def convert_name(name: str) -> str:
+ name_translate = {
+ ord(" "): ord("_"),
+ }
+ allowed_chars = string.ascii_letters + string.digits + "_-/.#"
+ return "".join(filter(lambda char: char in allowed_chars, name.translate(name_translate)))
+
+
+async def upload_sticker(file: str, directory: str, old_stickers: Dict[str, matrix.StickerInfo]
+ ) -> Optional[matrix.StickerInfo]:
+ if file.startswith("."):
+ return None
+ path = os.path.join(directory, file)
+ if not os.path.isfile(path):
+ return None
+
+ if magic:
+ mime = magic.from_file(path, mime=True)
+ else:
+ mime, _ = mimetypes.guess_type(file)
+ if not mime.startswith("image/"):
+ return None
+
+ print(f"Processing {file}", end="", flush=True)
+ try:
+ with open(path, "rb") as image_file:
+ image_data = image_file.read()
+ except Exception as e:
+ print(f"... failed to read file: {e}")
+ return None
+ name = os.path.splitext(file)[0]
+
+ # If the name starts with "number-", remove the prefix
+ name_split = name.split("-", 1)
+ if len(name_split) == 2 and name_split[0].isdecimal():
+ name = name_split[1]
+
+ sticker_id = f"sha256:{sha256(image_data).hexdigest()}"
+ print(".", end="", flush=True)
+ if sticker_id in old_stickers:
+ sticker = {
+ **old_stickers[sticker_id],
+ "body": name,
+ }
+ print(f".. using existing upload")
+ else:
+ image_data, width, height = util.convert_image(image_data)
+ print(".", end="", flush=True)
+ mxc = await matrix.upload(image_data, "image/png", file)
+ print(".", end="", flush=True)
+ sticker = util.make_sticker(mxc, width, height, len(image_data), name)
+ sticker["id"] = sticker_id
+ print(" uploaded", flush=True)
+ return sticker
+
+
+async def main(args: argparse.Namespace) -> None:
+ await matrix.load_config(args.config)
+
+ dirname = os.path.basename(os.path.abspath(args.path))
+ meta_path = os.path.join(args.path, "pack.json")
+ try:
+ with util.open_utf8(meta_path) as pack_file:
+ pack = json.load(pack_file)
+ print(f"Loaded existing pack meta from {meta_path}")
+ except FileNotFoundError:
+ pack = {
+ "title": args.title or dirname,
+ "id": args.id or convert_name(dirname),
+ "stickers": [],
+ }
+ old_stickers = {}
+ else:
+ old_stickers = {sticker["id"]: sticker for sticker in pack["stickers"]}
+ pack["stickers"] = []
+
+ stickers_data: Dict[str, bytes] = {}
+ for file in sorted(os.listdir(args.path)):
+ sticker = await upload_sticker(file, args.path, old_stickers=old_stickers)
+ if sticker:
+ stickers_data[sticker["url"]] = Path(args.path, file).read_bytes()
+ pack["stickers"].append(sticker)
+
+ with util.open_utf8(meta_path, "w") as pack_file:
+ json.dump(pack, pack_file)
+ print(f"Wrote pack to {meta_path}")
+
+ if args.add_to_index:
+ picker_file_name = f"{pack['id']}.json"
+ picker_pack_path = os.path.join(args.add_to_index, picker_file_name)
+ with util.open_utf8(picker_pack_path, "w") as pack_file:
+ json.dump(pack, pack_file)
+ print(f"Copied pack to {picker_pack_path}")
+
+ util.add_thumbnails(pack["stickers"], stickers_data, args.add_to_index)
+ util.add_to_index(picker_file_name, args.add_to_index)
+
+
+parser = argparse.ArgumentParser()
+parser.add_argument("--config",
+ help="Path to JSON file with Matrix homeserver and access_token",
+ type=str, default="config.json", metavar="file")
+parser.add_argument("--title", help="Override the sticker pack displayname", type=str,
+ metavar="title")
+parser.add_argument("--id", help="Override the sticker pack ID", type=str, metavar="id")
+parser.add_argument("--add-to-index", help="Sticker picker pack directory (usually 'web/packs/')",
+ type=str, metavar="path")
+parser.add_argument("path", help="Path to the sticker pack directory", type=str)
+
+
+def cmd():
+ asyncio.run(main(parser.parse_args()))
+
+
+if __name__ == "__main__":
+ cmd()
diff --git a/build/lib/sticker/scalar_convert.py b/build/lib/sticker/scalar_convert.py
new file mode 100644
index 0000000..76a0101
--- /dev/null
+++ b/build/lib/sticker/scalar_convert.py
@@ -0,0 +1,56 @@
+# maunium-stickerpicker - A fast and simple Matrix sticker picker widget.
+# Copyright (C) 2020 Tulir Asokan
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+import sys
+import json
+
+index_path = "../web/packs/index.json"
+
+try:
+ with util.open_utf8(index_path) as index_file:
+ index_data = json.load(index_file)
+except (FileNotFoundError, json.JSONDecodeError):
+ index_data = {"packs": []}
+
+with util.open_utf8(sys.argv[-1]) as file:
+ data = json.load(file)
+
+for pack in data["assets"]:
+ title = pack["name"].title()
+ if "images" not in pack["data"]:
+ print(f"Skipping {title}")
+ continue
+ pack_id = f"scalar-{pack['asset_id']}"
+ stickers = []
+ for sticker in pack["data"]["images"]:
+ sticker_data = sticker["content"]
+ sticker_data["id"] = sticker_data["url"].split("/")[-1]
+ stickers.append(sticker_data)
+ pack_data = {
+ "title": title,
+ "id": pack_id,
+ "stickers": stickers,
+ }
+ filename = f"scalar-{pack['name'].replace(' ', '_')}.json"
+ pack_path = f"web/packs/{filename}"
+ with util.open_utf8(pack_path, "w") as pack_file:
+ json.dump(pack_data, pack_file)
+ print(f"Wrote {title} to {pack_path}")
+ if filename not in index_data["packs"]:
+ index_data["packs"].append(filename)
+
+with util.open_utf8(index_path, "w") as index_file:
+ json.dump(index_data, index_file, indent=" ")
+print(f"Updated {index_path}")
diff --git a/build/lib/sticker/stickerimport.py b/build/lib/sticker/stickerimport.py
new file mode 100644
index 0000000..2b9ff12
--- /dev/null
+++ b/build/lib/sticker/stickerimport.py
@@ -0,0 +1,168 @@
+# maunium-stickerpicker - A fast and simple Matrix sticker picker widget.
+# Copyright (C) 2020 Tulir Asokan
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+from typing import Dict, Tuple
+import argparse
+import asyncio
+import os.path
+import json
+import re
+
+from telethon import TelegramClient
+from telethon.tl.functions.messages import GetAllStickersRequest, GetStickerSetRequest
+from telethon.tl.types.messages import AllStickers
+from telethon.tl.types import InputStickerSetShortName, Document, DocumentAttributeSticker
+from telethon.tl.types.messages import StickerSet as StickerSetFull
+
+from .lib import matrix, util
+
+
+async def reupload_document(client: TelegramClient, document: Document) -> Tuple[matrix.StickerInfo, bytes]:
+ print(f"Reuploading {document.id}", end="", flush=True)
+ data = await client.download_media(document, file=bytes)
+ print(".", end="", flush=True)
+ data, width, height = util.convert_image(data)
+ print(".", end="", flush=True)
+ mxc = await matrix.upload(data, "image/png", f"{document.id}.png")
+ print(".", flush=True)
+ return util.make_sticker(mxc, width, height, len(data)), data
+
+
+def add_meta(document: Document, info: matrix.StickerInfo, pack: StickerSetFull) -> None:
+ for attr in document.attributes:
+ if isinstance(attr, DocumentAttributeSticker):
+ info["body"] = attr.alt
+ info["id"] = f"tg-{document.id}"
+ info["net.maunium.telegram.sticker"] = {
+ "pack": {
+ "id": str(pack.set.id),
+ "short_name": pack.set.short_name,
+ },
+ "id": str(document.id),
+ "emoticons": [],
+ }
+
+
+async def reupload_pack(client: TelegramClient, pack: StickerSetFull, output_dir: str) -> None:
+ pack_path = os.path.join(output_dir, f"{pack.set.short_name}.json")
+ try:
+ os.mkdir(os.path.dirname(pack_path))
+ except FileExistsError:
+ pass
+
+ print(f"Reuploading {pack.set.title} with {pack.set.count} stickers "
+ f"and writing output to {pack_path}")
+
+ already_uploaded = {}
+ try:
+ with util.open_utf8(pack_path) as pack_file:
+ existing_pack = json.load(pack_file)
+ already_uploaded = {int(sticker["net.maunium.telegram.sticker"]["id"]): sticker
+ for sticker in existing_pack["stickers"]}
+ print(f"Found {len(already_uploaded)} already reuploaded stickers")
+ except FileNotFoundError:
+ pass
+
+ stickers_data: Dict[str, bytes] = {}
+ reuploaded_documents: Dict[int, matrix.StickerInfo] = {}
+ for document in pack.documents:
+ try:
+ reuploaded_documents[document.id] = already_uploaded[document.id]
+ print(f"Skipped reuploading {document.id}")
+ except KeyError:
+ reuploaded_documents[document.id], data = await reupload_document(client, document)
+ # Always ensure the body and telegram metadata is correct
+ add_meta(document, reuploaded_documents[document.id], pack)
+ stickers_data[reuploaded_documents[document.id]["url"]] = data
+
+ for sticker in pack.packs:
+ if not sticker.emoticon:
+ continue
+ for document_id in sticker.documents:
+ doc = reuploaded_documents[document_id]
+ # If there was no sticker metadata, use the first emoji we find
+ if doc["body"] == "":
+ doc["body"] = sticker.emoticon
+ doc["net.maunium.telegram.sticker"]["emoticons"].append(sticker.emoticon)
+
+ with util.open_utf8(pack_path, "w") as pack_file:
+ json.dump({
+ "title": pack.set.title,
+ "id": f"tg-{pack.set.id}",
+ "net.maunium.telegram.pack": {
+ "short_name": pack.set.short_name,
+ "hash": str(pack.set.hash),
+ },
+ "stickers": list(reuploaded_documents.values()),
+ }, pack_file, ensure_ascii=False)
+ print(f"Saved {pack.set.title} as {pack.set.short_name}.json")
+
+ util.add_thumbnails(list(reuploaded_documents.values()), stickers_data, output_dir)
+ util.add_to_index(os.path.basename(pack_path), output_dir)
+
+
+pack_url_regex = re.compile(r"^(?:(?:https?://)?(?:t|telegram)\.(?:me|dog)/addstickers/)?"
+ r"([A-Za-z0-9-_]+)"
+ r"(?:\.json)?$")
+
+parser = argparse.ArgumentParser()
+
+parser.add_argument("--list", help="List your saved sticker packs", action="store_true")
+parser.add_argument("--session", help="Telethon session file name", default="sticker-import")
+parser.add_argument("--config",
+ help="Path to JSON file with Matrix homeserver and access_token",
+ type=str, default="config.json")
+parser.add_argument("--output-dir", help="Directory to write packs to", default="web/packs/",
+ type=str)
+parser.add_argument("pack", help="Sticker pack URLs to import", action="append", nargs="*")
+
+
+async def main(args: argparse.Namespace) -> None:
+ await matrix.load_config(args.config)
+ client = TelegramClient(args.session, 298751, "cb676d6bae20553c9996996a8f52b4d7")
+ await client.start()
+
+ if args.list:
+ stickers: AllStickers = await client(GetAllStickersRequest(hash=0))
+ index = 1
+ width = len(str(len(stickers.sets)))
+ print("Your saved sticker packs:")
+ for saved_pack in stickers.sets:
+ print(f"{index:>{width}}. {saved_pack.title} "
+ f"(t.me/addstickers/{saved_pack.short_name})")
+ index += 1
+ elif args.pack[0]:
+ input_packs = []
+ for pack_url in args.pack[0]:
+ match = pack_url_regex.match(pack_url)
+ if not match:
+ print(f"'{pack_url}' doesn't look like a sticker pack URL")
+ return
+ input_packs.append(InputStickerSetShortName(short_name=match.group(1)))
+ for input_pack in input_packs:
+ pack: StickerSetFull = await client(GetStickerSetRequest(input_pack, hash=0))
+ await reupload_pack(client, pack, args.output_dir)
+ else:
+ parser.print_help()
+
+ await client.disconnect()
+
+
+def cmd() -> None:
+ asyncio.run(main(parser.parse_args()))
+
+
+if __name__ == "__main__":
+ cmd()
diff --git a/build/lib/sticker/version.py b/build/lib/sticker/version.py
new file mode 100644
index 0000000..e4afb86
--- /dev/null
+++ b/build/lib/sticker/version.py
@@ -0,0 +1,6 @@
+# Generated in setup.py
+
+git_tag = None
+git_revision = '4c13a2c2'
+version = '0.1.0+dev.4c13a2c2'
+linkified_version = '0.1.0+dev.[4c13a2c2](https://github.com/maunium/stickerpicker/commit/4c13a2c254d68980bcf43f132e0b78e3c08ed3b1)'
diff --git a/dank/aware.png b/dank/aware.png
new file mode 100644
index 0000000..5029557
--- /dev/null
+++ b/dank/aware.png
Binary files differ
diff --git a/dank/classic.png b/dank/classic.png
new file mode 100644
index 0000000..619d4d3
--- /dev/null
+++ b/dank/classic.png
Binary files differ
diff --git a/dank/pack.json b/dank/pack.json
new file mode 100644
index 0000000..e5f2766
--- /dev/null
+++ b/dank/pack.json
@@ -0,0 +1 @@
+{"title": "dank", "id": "dank", "stickers": [{"body": "aware", "url": "mxc://chat.moekyun.me/QURUNgNThYmIdzyasFdcLJnr", "info": {"w": 112, "h": 112, "size": 17080, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/QURUNgNThYmIdzyasFdcLJnr", "thumbnail_info": {"w": 112, "h": 112, "size": 17080, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:3f0e3edace04fed69af1606f7c3c74591e4b1e3d1a296ad7340dd2b39214f099"}, {"body": "classic", "url": "mxc://chat.moekyun.me/ZBxiNUARoFZGoETjySzbKoAc", "info": {"w": 128, "h": 128, "size": 26042, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/ZBxiNUARoFZGoETjySzbKoAc", "thumbnail_info": {"w": 128, "h": 128, "size": 26042, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:b9bec6f6748663456f72c7689db38e0f76e64a0e0496529d9515139fee067922"}, {"body": "smiley_good", "url": "mxc://chat.moekyun.me/PdyEJxgwOfBCxySfSFYlgPzP", "info": {"w": 256, "h": 256, "size": 90928, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/PdyEJxgwOfBCxySfSFYlgPzP", "thumbnail_info": {"w": 256, "h": 256, "size": 90928, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:57878fa8ccf13f58320c8cf07b266130984b4ed5ad35cfc87b67bc78fb2f7625"}, {"body": "smiley_grrr", "url": "mxc://chat.moekyun.me/xpwjfgHzxJFTiJWIXMEvBBck", "info": {"w": 256, "h": 256, "size": 89762, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/xpwjfgHzxJFTiJWIXMEvBBck", "thumbnail_info": {"w": 256, "h": 256, "size": 89762, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:76efdc3e86754261cfb6c93afe9ff5d25f2d4adbd45235a9670f5dbea6e1f74e"}, {"body": "smiley_no_no", "url": "mxc://chat.moekyun.me/yLAyUjCErrmXBfcAAUxYygsP", "info": {"w": 256, "h": 256, "size": 93010, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/yLAyUjCErrmXBfcAAUxYygsP", "thumbnail_info": {"w": 256, "h": 256, "size": 93010, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:1071abbf8e31ed12d226d5f078630d46b13ae377c9a3276e27f458076e42759a"}, {"body": "smiley_whatever", "url": "mxc://chat.moekyun.me/XmPidyRFUqsIUfMJXlyMqKTg", "info": {"w": 256, "h": 256, "size": 58621, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/XmPidyRFUqsIUfMJXlyMqKTg", "thumbnail_info": {"w": 256, "h": 256, "size": 58621, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:0f22af4ab47f63fcb9676537aa74aa3d0b6c8f606fe9e956f52b7ddfdc67ebf7"}, {"body": "xqc_ok", "url": "mxc://chat.moekyun.me/ZTckkllzHDrGCbrXBEqzDUYB", "info": {"w": 160, "h": 160, "size": 45997, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/ZTckkllzHDrGCbrXBEqzDUYB", "thumbnail_info": {"w": 160, "h": 160, "size": 45997, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:bb49d28ed249cd3f01023ecfa99e2be2af901f737a0249aefbe53b31203197f5"}]} \ No newline at end of file
diff --git a/dank/smiley_good.png b/dank/smiley_good.png
new file mode 100644
index 0000000..af9df91
--- /dev/null
+++ b/dank/smiley_good.png
Binary files differ
diff --git a/dank/smiley_grrr.png b/dank/smiley_grrr.png
new file mode 100644
index 0000000..637808c
--- /dev/null
+++ b/dank/smiley_grrr.png
Binary files differ
diff --git a/dank/smiley_no_no.png b/dank/smiley_no_no.png
new file mode 100644
index 0000000..5f1ae6c
--- /dev/null
+++ b/dank/smiley_no_no.png
Binary files differ
diff --git a/dank/smiley_whatever.png b/dank/smiley_whatever.png
new file mode 100644
index 0000000..e26f9d2
--- /dev/null
+++ b/dank/smiley_whatever.png
Binary files differ
diff --git a/dank/xqc_ok.png b/dank/xqc_ok.png
new file mode 100644
index 0000000..8248adc
--- /dev/null
+++ b/dank/xqc_ok.png
Binary files differ
diff --git a/sticker/version.py b/sticker/version.py
index 47f7fff..e4afb86 100644
--- a/sticker/version.py
+++ b/sticker/version.py
@@ -1 +1,6 @@
-from .get_version import git_tag, git_revision, version, linkified_version
+# Generated in setup.py
+
+git_tag = None
+git_revision = '4c13a2c2'
+version = '0.1.0+dev.4c13a2c2'
+linkified_version = '0.1.0+dev.[4c13a2c2](https://github.com/maunium/stickerpicker/commit/4c13a2c254d68980bcf43f132e0b78e3c08ed3b1)'
diff --git a/web/packs/dank.json b/web/packs/dank.json
new file mode 100644
index 0000000..e5f2766
--- /dev/null
+++ b/web/packs/dank.json
@@ -0,0 +1 @@
+{"title": "dank", "id": "dank", "stickers": [{"body": "aware", "url": "mxc://chat.moekyun.me/QURUNgNThYmIdzyasFdcLJnr", "info": {"w": 112, "h": 112, "size": 17080, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/QURUNgNThYmIdzyasFdcLJnr", "thumbnail_info": {"w": 112, "h": 112, "size": 17080, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:3f0e3edace04fed69af1606f7c3c74591e4b1e3d1a296ad7340dd2b39214f099"}, {"body": "classic", "url": "mxc://chat.moekyun.me/ZBxiNUARoFZGoETjySzbKoAc", "info": {"w": 128, "h": 128, "size": 26042, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/ZBxiNUARoFZGoETjySzbKoAc", "thumbnail_info": {"w": 128, "h": 128, "size": 26042, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:b9bec6f6748663456f72c7689db38e0f76e64a0e0496529d9515139fee067922"}, {"body": "smiley_good", "url": "mxc://chat.moekyun.me/PdyEJxgwOfBCxySfSFYlgPzP", "info": {"w": 256, "h": 256, "size": 90928, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/PdyEJxgwOfBCxySfSFYlgPzP", "thumbnail_info": {"w": 256, "h": 256, "size": 90928, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:57878fa8ccf13f58320c8cf07b266130984b4ed5ad35cfc87b67bc78fb2f7625"}, {"body": "smiley_grrr", "url": "mxc://chat.moekyun.me/xpwjfgHzxJFTiJWIXMEvBBck", "info": {"w": 256, "h": 256, "size": 89762, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/xpwjfgHzxJFTiJWIXMEvBBck", "thumbnail_info": {"w": 256, "h": 256, "size": 89762, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:76efdc3e86754261cfb6c93afe9ff5d25f2d4adbd45235a9670f5dbea6e1f74e"}, {"body": "smiley_no_no", "url": "mxc://chat.moekyun.me/yLAyUjCErrmXBfcAAUxYygsP", "info": {"w": 256, "h": 256, "size": 93010, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/yLAyUjCErrmXBfcAAUxYygsP", "thumbnail_info": {"w": 256, "h": 256, "size": 93010, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:1071abbf8e31ed12d226d5f078630d46b13ae377c9a3276e27f458076e42759a"}, {"body": "smiley_whatever", "url": "mxc://chat.moekyun.me/XmPidyRFUqsIUfMJXlyMqKTg", "info": {"w": 256, "h": 256, "size": 58621, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/XmPidyRFUqsIUfMJXlyMqKTg", "thumbnail_info": {"w": 256, "h": 256, "size": 58621, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:0f22af4ab47f63fcb9676537aa74aa3d0b6c8f606fe9e956f52b7ddfdc67ebf7"}, {"body": "xqc_ok", "url": "mxc://chat.moekyun.me/ZTckkllzHDrGCbrXBEqzDUYB", "info": {"w": 160, "h": 160, "size": 45997, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/ZTckkllzHDrGCbrXBEqzDUYB", "thumbnail_info": {"w": 160, "h": 160, "size": 45997, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:bb49d28ed249cd3f01023ecfa99e2be2af901f737a0249aefbe53b31203197f5"}]} \ No newline at end of file
diff --git a/web/packs/index.json b/web/packs/index.json
new file mode 100644
index 0000000..cdb8d7d
--- /dev/null
+++ b/web/packs/index.json
@@ -0,0 +1,7 @@
+{
+ "packs": [
+ "weeb.json",
+ "dank.json"
+ ],
+ "homeserver_url": "https://chat.moekyun.me"
+} \ No newline at end of file
diff --git a/web/packs/thumbnails/APyHPuZmyRfUwwsEHijRGdjP b/web/packs/thumbnails/APyHPuZmyRfUwwsEHijRGdjP
new file mode 100644
index 0000000..931a057
--- /dev/null
+++ b/web/packs/thumbnails/APyHPuZmyRfUwwsEHijRGdjP
Binary files differ
diff --git a/web/packs/thumbnails/ASWmCLdLLTVqLwXptdkBMtws b/web/packs/thumbnails/ASWmCLdLLTVqLwXptdkBMtws
new file mode 100644
index 0000000..cdf240a
--- /dev/null
+++ b/web/packs/thumbnails/ASWmCLdLLTVqLwXptdkBMtws
Binary files differ
diff --git a/web/packs/thumbnails/CLkWhgAkDubZmahPWinNMaSc b/web/packs/thumbnails/CLkWhgAkDubZmahPWinNMaSc
new file mode 100644
index 0000000..20ab20f
--- /dev/null
+++ b/web/packs/thumbnails/CLkWhgAkDubZmahPWinNMaSc
Binary files differ
diff --git a/web/packs/thumbnails/DlLllEJSQYkOCBBzqVzdxuwR b/web/packs/thumbnails/DlLllEJSQYkOCBBzqVzdxuwR
new file mode 100644
index 0000000..e486283
--- /dev/null
+++ b/web/packs/thumbnails/DlLllEJSQYkOCBBzqVzdxuwR
Binary files differ
diff --git a/web/packs/thumbnails/MjoQgqCbNmTRuQfDngBPPoOC b/web/packs/thumbnails/MjoQgqCbNmTRuQfDngBPPoOC
new file mode 100644
index 0000000..a912611
--- /dev/null
+++ b/web/packs/thumbnails/MjoQgqCbNmTRuQfDngBPPoOC
Binary files differ
diff --git a/web/packs/thumbnails/OddXtQLRutxvLZWWxNicguMc b/web/packs/thumbnails/OddXtQLRutxvLZWWxNicguMc
new file mode 100644
index 0000000..5a12b37
--- /dev/null
+++ b/web/packs/thumbnails/OddXtQLRutxvLZWWxNicguMc
Binary files differ
diff --git a/web/packs/thumbnails/PdyEJxgwOfBCxySfSFYlgPzP b/web/packs/thumbnails/PdyEJxgwOfBCxySfSFYlgPzP
new file mode 100644
index 0000000..4ce4ec4
--- /dev/null
+++ b/web/packs/thumbnails/PdyEJxgwOfBCxySfSFYlgPzP
Binary files differ
diff --git a/web/packs/thumbnails/QURUNgNThYmIdzyasFdcLJnr b/web/packs/thumbnails/QURUNgNThYmIdzyasFdcLJnr
new file mode 100644
index 0000000..f161e15
--- /dev/null
+++ b/web/packs/thumbnails/QURUNgNThYmIdzyasFdcLJnr
Binary files differ
diff --git a/web/packs/thumbnails/SzxfhuJJdFPYzoPvSDIBhWxb b/web/packs/thumbnails/SzxfhuJJdFPYzoPvSDIBhWxb
new file mode 100644
index 0000000..706c10d
--- /dev/null
+++ b/web/packs/thumbnails/SzxfhuJJdFPYzoPvSDIBhWxb
Binary files differ
diff --git a/web/packs/thumbnails/XmPidyRFUqsIUfMJXlyMqKTg b/web/packs/thumbnails/XmPidyRFUqsIUfMJXlyMqKTg
new file mode 100644
index 0000000..2cdcf19
--- /dev/null
+++ b/web/packs/thumbnails/XmPidyRFUqsIUfMJXlyMqKTg
Binary files differ
diff --git a/web/packs/thumbnails/ZBxiNUARoFZGoETjySzbKoAc b/web/packs/thumbnails/ZBxiNUARoFZGoETjySzbKoAc
new file mode 100644
index 0000000..11f60e7
--- /dev/null
+++ b/web/packs/thumbnails/ZBxiNUARoFZGoETjySzbKoAc
Binary files differ
diff --git a/web/packs/thumbnails/ZTckkllzHDrGCbrXBEqzDUYB b/web/packs/thumbnails/ZTckkllzHDrGCbrXBEqzDUYB
new file mode 100644
index 0000000..e6e259b
--- /dev/null
+++ b/web/packs/thumbnails/ZTckkllzHDrGCbrXBEqzDUYB
Binary files differ
diff --git a/web/packs/thumbnails/aUBbgTfxxfWapJXDzOGsGWGx b/web/packs/thumbnails/aUBbgTfxxfWapJXDzOGsGWGx
new file mode 100644
index 0000000..79a10b8
--- /dev/null
+++ b/web/packs/thumbnails/aUBbgTfxxfWapJXDzOGsGWGx
Binary files differ
diff --git a/web/packs/thumbnails/xpwjfgHzxJFTiJWIXMEvBBck b/web/packs/thumbnails/xpwjfgHzxJFTiJWIXMEvBBck
new file mode 100644
index 0000000..581048b
--- /dev/null
+++ b/web/packs/thumbnails/xpwjfgHzxJFTiJWIXMEvBBck
Binary files differ
diff --git a/web/packs/thumbnails/yLAyUjCErrmXBfcAAUxYygsP b/web/packs/thumbnails/yLAyUjCErrmXBfcAAUxYygsP
new file mode 100644
index 0000000..2b949b8
--- /dev/null
+++ b/web/packs/thumbnails/yLAyUjCErrmXBfcAAUxYygsP
Binary files differ
diff --git a/web/packs/weeb.json b/web/packs/weeb.json
new file mode 100644
index 0000000..80550cf
--- /dev/null
+++ b/web/packs/weeb.json
@@ -0,0 +1 @@
+{"title": "weeb", "id": "weeb", "stickers": [{"body": "erina_i_may_be_dumb", "url": "mxc://chat.moekyun.me/SzxfhuJJdFPYzoPvSDIBhWxb", "info": {"w": 146, "h": 160, "size": 37322, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/SzxfhuJJdFPYzoPvSDIBhWxb", "thumbnail_info": {"w": 146, "h": 160, "size": 37322, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:a8e636aef053b1b3214e7afeb8f2539a3fc5dee9a011fabe0c9e4300f73da242"}, {"body": "miku_honest_reaction", "url": "mxc://chat.moekyun.me/OddXtQLRutxvLZWWxNicguMc", "info": {"w": 160, "h": 112, "size": 28353, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/OddXtQLRutxvLZWWxNicguMc", "thumbnail_info": {"w": 160, "h": 112, "size": 28353, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:d4dde21efae2eab7be830a3d65bc78176d898052c8bfaf96d784083b58668ef2"}, {"body": "not_bad", "url": "mxc://chat.moekyun.me/CLkWhgAkDubZmahPWinNMaSc", "info": {"w": 160, "h": 160, "size": 31164, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/CLkWhgAkDubZmahPWinNMaSc", "thumbnail_info": {"w": 160, "h": 160, "size": 31164, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:575e12e9e5452bb44270f13c1942c1ec3c5598a1a59f35358fbf90cb4e1cc71d"}, {"body": "peko_interesting", "url": "mxc://chat.moekyun.me/DlLllEJSQYkOCBBzqVzdxuwR", "info": {"w": 160, "h": 156, "size": 35734, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/DlLllEJSQYkOCBBzqVzdxuwR", "thumbnail_info": {"w": 160, "h": 156, "size": 35734, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:752763fa8f4d19f77b131267ca2a35ed233d62335bafb27b165ca248d00e0b84"}, {"body": "peko_unbelievable", "url": "mxc://chat.moekyun.me/MjoQgqCbNmTRuQfDngBPPoOC", "info": {"w": 160, "h": 160, "size": 52103, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/MjoQgqCbNmTRuQfDngBPPoOC", "thumbnail_info": {"w": 160, "h": 160, "size": 52103, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:618e4ea2b509bdb2c761f8fcafdbe42f56690b028edaa68e510843bd8859d5f1"}, {"body": "senmei_caught_4k", "url": "mxc://chat.moekyun.me/aUBbgTfxxfWapJXDzOGsGWGx", "info": {"w": 160, "h": 160, "size": 39863, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/aUBbgTfxxfWapJXDzOGsGWGx", "thumbnail_info": {"w": 160, "h": 160, "size": 39863, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:04e25a3a8de7d9da6eac994c013c831ada8c674b6dc5d61628ec0a082a45dc4c"}, {"body": "tsukasa_lewd", "url": "mxc://chat.moekyun.me/ASWmCLdLLTVqLwXptdkBMtws", "info": {"w": 160, "h": 160, "size": 29637, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/ASWmCLdLLTVqLwXptdkBMtws", "thumbnail_info": {"w": 160, "h": 160, "size": 29637, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:8dac5d9222770fe41ad4a120042416cb5db9e76501561942e0c0ffcbc78681dc"}, {"body": "weeb_fuck_everything", "url": "mxc://chat.moekyun.me/APyHPuZmyRfUwwsEHijRGdjP", "info": {"w": 140, "h": 160, "size": 47309, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/APyHPuZmyRfUwwsEHijRGdjP", "thumbnail_info": {"w": 140, "h": 160, "size": 47309, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:53246fc04cf8899b6311be5c8ca25673012d061b5f9245e13bc6e3271ef53892"}]} \ No newline at end of file
diff --git a/weeb/erina_i_may_be_dumb.png b/weeb/erina_i_may_be_dumb.png
new file mode 100644
index 0000000..1a98edd
--- /dev/null
+++ b/weeb/erina_i_may_be_dumb.png
Binary files differ
diff --git a/weeb/miku_honest_reaction.png b/weeb/miku_honest_reaction.png
new file mode 100644
index 0000000..72199cc
--- /dev/null
+++ b/weeb/miku_honest_reaction.png
Binary files differ
diff --git a/weeb/not_bad.png b/weeb/not_bad.png
new file mode 100644
index 0000000..9b52723
--- /dev/null
+++ b/weeb/not_bad.png
Binary files differ
diff --git a/weeb/pack.json b/weeb/pack.json
new file mode 100644
index 0000000..80550cf
--- /dev/null
+++ b/weeb/pack.json
@@ -0,0 +1 @@
+{"title": "weeb", "id": "weeb", "stickers": [{"body": "erina_i_may_be_dumb", "url": "mxc://chat.moekyun.me/SzxfhuJJdFPYzoPvSDIBhWxb", "info": {"w": 146, "h": 160, "size": 37322, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/SzxfhuJJdFPYzoPvSDIBhWxb", "thumbnail_info": {"w": 146, "h": 160, "size": 37322, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:a8e636aef053b1b3214e7afeb8f2539a3fc5dee9a011fabe0c9e4300f73da242"}, {"body": "miku_honest_reaction", "url": "mxc://chat.moekyun.me/OddXtQLRutxvLZWWxNicguMc", "info": {"w": 160, "h": 112, "size": 28353, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/OddXtQLRutxvLZWWxNicguMc", "thumbnail_info": {"w": 160, "h": 112, "size": 28353, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:d4dde21efae2eab7be830a3d65bc78176d898052c8bfaf96d784083b58668ef2"}, {"body": "not_bad", "url": "mxc://chat.moekyun.me/CLkWhgAkDubZmahPWinNMaSc", "info": {"w": 160, "h": 160, "size": 31164, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/CLkWhgAkDubZmahPWinNMaSc", "thumbnail_info": {"w": 160, "h": 160, "size": 31164, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:575e12e9e5452bb44270f13c1942c1ec3c5598a1a59f35358fbf90cb4e1cc71d"}, {"body": "peko_interesting", "url": "mxc://chat.moekyun.me/DlLllEJSQYkOCBBzqVzdxuwR", "info": {"w": 160, "h": 156, "size": 35734, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/DlLllEJSQYkOCBBzqVzdxuwR", "thumbnail_info": {"w": 160, "h": 156, "size": 35734, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:752763fa8f4d19f77b131267ca2a35ed233d62335bafb27b165ca248d00e0b84"}, {"body": "peko_unbelievable", "url": "mxc://chat.moekyun.me/MjoQgqCbNmTRuQfDngBPPoOC", "info": {"w": 160, "h": 160, "size": 52103, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/MjoQgqCbNmTRuQfDngBPPoOC", "thumbnail_info": {"w": 160, "h": 160, "size": 52103, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:618e4ea2b509bdb2c761f8fcafdbe42f56690b028edaa68e510843bd8859d5f1"}, {"body": "senmei_caught_4k", "url": "mxc://chat.moekyun.me/aUBbgTfxxfWapJXDzOGsGWGx", "info": {"w": 160, "h": 160, "size": 39863, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/aUBbgTfxxfWapJXDzOGsGWGx", "thumbnail_info": {"w": 160, "h": 160, "size": 39863, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:04e25a3a8de7d9da6eac994c013c831ada8c674b6dc5d61628ec0a082a45dc4c"}, {"body": "tsukasa_lewd", "url": "mxc://chat.moekyun.me/ASWmCLdLLTVqLwXptdkBMtws", "info": {"w": 160, "h": 160, "size": 29637, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/ASWmCLdLLTVqLwXptdkBMtws", "thumbnail_info": {"w": 160, "h": 160, "size": 29637, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:8dac5d9222770fe41ad4a120042416cb5db9e76501561942e0c0ffcbc78681dc"}, {"body": "weeb_fuck_everything", "url": "mxc://chat.moekyun.me/APyHPuZmyRfUwwsEHijRGdjP", "info": {"w": 140, "h": 160, "size": 47309, "mimetype": "image/png", "thumbnail_url": "mxc://chat.moekyun.me/APyHPuZmyRfUwwsEHijRGdjP", "thumbnail_info": {"w": 140, "h": 160, "size": 47309, "mimetype": "image/png"}}, "msgtype": "m.sticker", "id": "sha256:53246fc04cf8899b6311be5c8ca25673012d061b5f9245e13bc6e3271ef53892"}]} \ No newline at end of file
diff --git a/weeb/peko_interesting.png b/weeb/peko_interesting.png
new file mode 100644
index 0000000..8218d80
--- /dev/null
+++ b/weeb/peko_interesting.png
Binary files differ
diff --git a/weeb/peko_unbelievable.png b/weeb/peko_unbelievable.png
new file mode 100644
index 0000000..bc7a4a7
--- /dev/null
+++ b/weeb/peko_unbelievable.png
Binary files differ
diff --git a/weeb/senmei_caught_4k.png b/weeb/senmei_caught_4k.png
new file mode 100644
index 0000000..baa6c02
--- /dev/null
+++ b/weeb/senmei_caught_4k.png
Binary files differ
diff --git a/weeb/tsukasa_lewd.png b/weeb/tsukasa_lewd.png
new file mode 100644
index 0000000..8a25063
--- /dev/null
+++ b/weeb/tsukasa_lewd.png
Binary files differ
diff --git a/weeb/weeb_fuck_everything.png b/weeb/weeb_fuck_everything.png
new file mode 100644
index 0000000..871136d
--- /dev/null
+++ b/weeb/weeb_fuck_everything.png
Binary files differ
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage