mixtiles-it
将照片发送至 Mixtiles 以订购墙砖。当用户转发/发送照片并希望将其作为 Mixtile 订购、将其添加到 Mixtiles 购物车或说“混合此图块”、“将其设为图块”或类似命令时使用。还处理图像 URL。
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~saharcarmel-mixtiles-itcURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~saharcarmel-mixtiles-it/file -o saharcarmel-mixtiles-it.md# Mixtiles It Turn any photo into a Mixtiles order link. User sends a photo (or image URL) → get back a ready-to-order Mixtiles cart link. ## How It Works 1. User sends/forwards a photo or image URL 2. Run the upload script to get a public URL and Mixtiles cart link 3. Send the cart link back — user taps it to customize and order ## Usage ```bash # Single photo python3 scripts/mixtiles-cart.py <local-file-or-url> [--size SIZE] # Multiple photos (one cart link with all photos) python3 scripts/mixtiles-cart.py --batch <image1> <image2> ... [--size SIZE] ``` The script handles: - **Local files**: Uploads to Cloudinary (the only host Mixtiles can display from) - **URLs**: Downloads first, then uploads to Cloudinary - **Batch mode**: Uploads all images and builds a single multi-photo cart URL - **Output**: Prints the Mixtiles cart URL to stdout ### Size Options Default is `RECTANGLE_12X16`. Other known sizes from Mixtiles: - `SQUARE_8X8` — Classic square - `RECTANGLE_12X16` — Portrait rectangle (default) - `RECTANGLE_16X12` — Landscape rectangle ### Environment Variables (optional) - `CLOUDINARY_CLOUD` — Cloudinary cloud name (default: `demo`) - `CLOUDINARY_PRESET` — Cloudinary unsigned upload preset (default: `unsigned`) - `MIXTILES_UPLOAD_URL` — Override the upload API endpoint (Railway fallback) - `MIXTILES_UPLOAD_KEY` — Override the upload API key (Railway fallback) ## Workflow When a user sends a photo with intent to mixtile it: 1. Identify the image file path (from media attachment) or URL 2. Run: `python3 <skill-dir>/scripts/mixtiles-cart.py <path-or-url>` 3. Send the resulting URL to the user with a brief message like "Here's your Mixtiles link! 🖼️ Tap to customize size, frame, and order." If multiple photos are sent, use `--batch` to create a single cart link with all photos: `python3 <skill-dir>/scripts/mixtiles-cart.py --batch <path1> <path2> ...` --- ## 中文说明 # Mixtiles It 将任何照片变成一个 Mixtiles 订购链接。用户发送一张照片(或图像 URL)→ 返回一个可直接下单的 Mixtiles 购物车链接。 ## 工作原理 1. 用户发送/转发一张照片或图像 URL 2. 运行上传脚本以获取一个公开 URL 和 Mixtiles 购物车链接 3. 将购物车链接发回 —— 用户点击它即可自定义并下单 ## 用法 ```bash # Single photo python3 scripts/mixtiles-cart.py <local-file-or-url> [--size SIZE] # Multiple photos (one cart link with all photos) python3 scripts/mixtiles-cart.py --batch <image1> <image2> ... [--size SIZE] ``` 该脚本会处理: - **本地文件**:上传到 Cloudinary(Mixtiles 唯一能展示的托管来源) - **URL**:先下载,然后上传到 Cloudinary - **批量模式**:上传所有图像并构建一个包含多张照片的单一购物车 URL - **输出**:将 Mixtiles 购物车 URL 打印到 stdout ### 尺寸选项 默认值是 `RECTANGLE_12X16`。Mixtiles 的其他已知尺寸: - `SQUARE_8X8` — 经典方形 - `RECTANGLE_12X16` — 纵向矩形(默认) - `RECTANGLE_16X12` — 横向矩形 ### 环境变量(可选) - `CLOUDINARY_CLOUD` — Cloudinary 云名称(默认:`demo`) - `CLOUDINARY_PRESET` — Cloudinary 无签名上传预设(默认:`unsigned`) - `MIXTILES_UPLOAD_URL` — 覆盖上传 API 端点(Railway 回退) - `MIXTILES_UPLOAD_KEY` — 覆盖上传 API 密钥(Railway 回退) ## 工作流程 当用户发送一张照片并意图将其制成 mixtile 时: 1. 识别图像文件路径(来自媒体附件)或 URL 2. 运行:`python3 <skill-dir>/scripts/mixtiles-cart.py <path-or-url>` 3. 将得到的 URL 发送给用户,并附上一句简短消息,例如 "Here's your Mixtiles link! 🖼️ Tap to customize size, frame, and order." 如果发送了多张照片,使用 `--batch` 创建一个包含所有照片的单一购物车链接: `python3 <skill-dir>/scripts/mixtiles-cart.py --batch <path1> <path2> ...`