diff --git a/README.md b/README.md index a49e272e6..dcb6b9aef 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,16 @@ Whether you're automating workflows, managing AI-powered channels, or scheduling --- +## Community + +Join our community to connect with other users, get support, and share your experiences. + +| Enterprise WeChat | Feishu Group | Discord | +| :---: | :---: | :---: | +| WeChat QR Code | Feishu QR Code | Discord QR Code | + +--- + ## Why ClawX Building AI agents shouldn't require mastering the command line. ClawX was designed with a simple philosophy: **powerful technology deserves an interface that respects your time.** @@ -297,6 +307,9 @@ ClawX is built on the shoulders of excellent open-source projects: --- + + + ## License ClawX is released under the [MIT License](LICENSE). You're free to use, modify, and distribute this software. diff --git a/scripts/crop_qr.py b/scripts/crop_qr.py new file mode 100644 index 000000000..6b90d34f7 --- /dev/null +++ b/scripts/crop_qr.py @@ -0,0 +1,54 @@ + +import os +from PIL import Image, ImageChops + +def trim_whitespace(im): + bg = Image.new(im.mode, im.size, im.getpixel((0,0))) + diff = ImageChops.difference(im, bg) + diff = ImageChops.add(diff, diff, 2.0, -100) + bbox = diff.getbbox() + if bbox: + return im.crop(bbox) + return im + +def process_image(path): + try: + img = Image.open(path) + img = img.convert("RGBA") + + # Simple trim of uniform background + cropped = trim_whitespace(img) + + # If the image is a "photo", simple trim might not work if lighting is uneven. + # But let's assume digital image for now based on typical user behavior. + # Function to find the QR code area more robustly: + # Convert to grayscale, threshold, invert, find bbox of black pixels. + gray = img.convert("L") + # Threshold: anything darker than 200 is "black" (QR code), else white + bw = gray.point(lambda x: 0 if x < 200 else 255, '1') + # Invert to make QR code white on black background for getbbox + bw_inv = ImageChops.invert(bw) + bbox = bw_inv.getbbox() + + if bbox: + # Add a small padding + left, upper, right, lower = bbox + width, height = img.size + left = max(0, left - padding) + upper = max(0, upper - padding) + right = min(width, right + padding) + lower = min(height, lower + padding) + cropped = img.crop((left, upper, right, lower)) + + cropped.save(path) + print(f"Processed {path}") + except Exception as e: + print(f"Error processing {path}: {e}") + +assets_dir = "src/assets/community" +for filename in ["feishu-qr.png", "wecom-qr.png"]: + file_path = os.path.join(assets_dir, filename) + if os.path.exists(file_path): + process_image(file_path) + else: + print(f"File not found: {file_path}") diff --git a/src/assets/community/20260212-185822.png b/src/assets/community/20260212-185822.png new file mode 100644 index 000000000..d6672ef11 Binary files /dev/null and b/src/assets/community/20260212-185822.png differ diff --git a/src/assets/community/feishu-qr.png b/src/assets/community/feishu-qr.png new file mode 100644 index 000000000..79095719c Binary files /dev/null and b/src/assets/community/feishu-qr.png differ diff --git a/src/assets/community/wecom-qr.png b/src/assets/community/wecom-qr.png new file mode 100644 index 000000000..f7ad5e33d Binary files /dev/null and b/src/assets/community/wecom-qr.png differ