{"id":20030209,"url":"https://github.com/sb-child/ohmyduo","last_synced_at":"2025-05-05T03:32:50.563Z","repository":{"id":174173370,"uuid":"651877526","full_name":"sb-child/OhMyDuo","owner":"sb-child","description":"(pre-release) 多邻国(Duolingo)贴纸生成器！ Duolingo stickers generator!","archived":false,"fork":false,"pushed_at":"2023-11-06T10:20:07.000Z","size":46679,"stargazers_count":46,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-08T16:53:41.752Z","etag":null,"topics":["duolingo","go","goframe","goframe2","golang","image","image-processing","images","sticker","stickers","telegram","telegram-bot","web"],"latest_commit_sha":null,"homepage":"https://sbchild.top/blog/tools/duo","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sb-child.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-10T11:14:10.000Z","updated_at":"2025-03-14T09:55:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"8813540b-1a34-4294-9919-7dfcc0f83789","html_url":"https://github.com/sb-child/OhMyDuo","commit_stats":null,"previous_names":["sb-child/ohmyduo"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sb-child%2FOhMyDuo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sb-child%2FOhMyDuo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sb-child%2FOhMyDuo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sb-child%2FOhMyDuo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sb-child","download_url":"https://codeload.github.com/sb-child/OhMyDuo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252435540,"owners_count":21747452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["duolingo","go","goframe","goframe2","golang","image","image-processing","images","sticker","stickers","telegram","telegram-bot","web"],"created_at":"2024-11-13T09:25:22.593Z","updated_at":"2025-05-05T03:32:45.543Z","avatar_url":"https://github.com/sb-child.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Oh My Duo\n\n[![Go](https://github.com/sb-child/OhMyDuo/actions/workflows/go.yml/badge.svg)](https://github.com/sb-child/OhMyDuo/actions/workflows/go.yml) ![GitHub release](https://img.shields.io/github/v/release/sb-child/OhMyDuo)\n\n## [\u003e View the English version of README \u003c](./translate/en/)\n\n~~你是 [Duolingo](https://duolingo.com/) 的忠实用户吗？~~\n\n本 Repo 可以帮助你生成自定义的可爱贴纸！\n\n## demo\n\n|                               默认内容                               |\n| :------------------------------------------------------------------: |\n| \u003cimg src=\"https://sbchild.top/omd/_?x=fj32j340if\" width=\"50%\"\u003e |\n|                  https://sbchild.top `/omd/_`                  |\n\n|                                                   更改角色，原文和翻译                                                   |\n| :----------------------------------------------------------------------------------------------------------------------: |\n| \u003cimg src=\"https://sbchild.top/omd/_?c=lily\u0026o=do%20not%20talk%20with%20me\u0026t=不要和我讲话\u0026x=fyufyudtry\" width=\"50%\"\u003e |\n|                      https://sbchild.top `/omd/_?c=lily\u0026o=do not talk with me\u0026t=不要和我讲话`                      |\n\n你在用 Telegram 嘛? 快快试试 \u003chttps://t.me/sbchild_bot\u003e 吧~\n\n当然这个服务也有供大家try的网页版，[在这里](https://sbchild.top/blog/tools/duo)\n\n## 用途\n\n制作可爱贴纸！还可以在自己的主页上展示！\n\n## 怎么用\n\n0. `clone`本项目, 或下载压缩包并解压\n\n\u003e 不想自己编译的可以去 Release ![GitHub release](https://img.shields.io/github/v/release/sb-child/OhMyDuo) 下载预编译版\n\n1. 在 `manifest/config` 目录下, 复制`config.example.toml`到`config.toml`, 按需编辑`config.toml`:\n\n- 更改 HTTP 监听端口\n- 更改 `rootDir` 为 URL 地址前缀\n- 更改 `httpServer`，如果不需要启用 HTTP 服务，请将值修改为 `false`\n- 更改 `telegramBotToken`，如果不需要启用 Telegram Bot，请将值修改为空\n- 更改 `telegramBotHttpTimeout`，推荐设为 `3000`\n- 更改 `telegramBotHttpProxy`，如果不需要启用 Telegram 代理，请将值修改为空\n- 更改 `telegramBotImageServer` 为 Telegram 使用的 OhMyDuo 地址\n\n2. 编译\n\n- 准备好`golang 1.20+`和`gfcli`环境\n- `./build.sh`\n\n3. 部署\n\n- 确保`oh-my-duo-*`和`config.yaml`在同一目录下\n- 运行`oh-my-duo-*`\n- (可选) 按需修改`OhMyDuo.service`, 并拷贝至`/etc/systemd/system/OhMyDuo.service`, 即可创建一个 systemd 服务\n- 接下来你可以尝试使用 Web 服务器的反向代理功能，可以方便使用，以及允许 Telegram 从这个服务器请求图片!\n\n4. 测试\n\n- 打开浏览器，输入`你的域名或ip地址/你的地址前缀/_`，例如`https://sbchild.top/omd/_`\n- 如果浏览器显示了一张多儿的照片，恭喜你，它能用啦\n\n5. 到底怎么用\n\n目前有两个方式调用这个生成器:\n\n1. 在`/_`后面添加参数, 第一个参数前加上`?`, 参数之间使用`\u0026`分隔\n\n- `/_` 默认\n- `/_?c=lily` 指定角色，不区分大小写, 默认为 Duo\n  - Duo\n  - Bea\n  - Vikram\n  - Oscar\n  - Junior\n  - Eddy\n  - Zari\n  - Lily\n  - Lin\n  - Lucy\n  - Falstaff\n- `/_?o=text...` 原文。某些情况下，空格需要使用`%20`代替\n- `/_?t=text...` 译文(原文和译文需要一起指定)。某些情况下，空格需要使用`%20`代替\n\n2. 在`/_/`后面按照如下格式指定参数, 参数之间使用`|`分隔\n\n- `/_/Hello-world|你好-世界` 默认使用 Duo 角色, 原文为`Hello world`, 译文为`你好 世界`。空格使用`-`代替\n\n- `/_/Can-you-speak--English%3f|你会讲英语吗？` 原文为`Can you speak-English?`, 译文为`你会讲英语吗？`。问号`?`使用`%3f`代替, 连字符`-`使用`--`代替\n\n- `/_/lucy|Can-you-speak--English%3f|你会讲英语吗？` 指定`Lucy`角色, 原文为`Can you speak-English?`, 译文为`你会讲英语吗？`\n\n但是在 Telegram Bot 中，需要这样使用:\n\n- `@some_bot Hello world|你好 世界` 列出所有角色的图片, 原文为`Hello world`, 译文为`你好 世界`\n\n- `@some_bot Can u speak english|你能讲英语嘛|zari` 使用 Zari 角色, 原文为`Can u speak english`, 译文为`你能讲英语嘛`\n\n## TODO\n\n- [ ] emoji 支持 😊\n- [x] 日文支持\n- [ ] 自动截断超长单词\n- [ ] 更多语言旗帜 (欢迎 PR)\n\n## 贡献\n\n欢迎提交 PR 来改进这个程序!\n\n## 框架\n\n[GoFrame](https://goframe.org)\n\n## 许可证\n\nApache 2.0\n\n## Makefile 子命令\n\nProject Makefile Commands:\n\n- `make cli`: Install or Update to the latest GoFrame CLI tool.\n- `make dao`: Generate go files for `Entity/DAO/DO` according to the configuration file from `hack` folder.\n- `make service`: Parse `logic` folder to generate interface go files into `service` folder.\n- `make image TAG=xxx`: Run `docker build` to build image according `manifest/docker`.\n- `make image.push TAG=xxx`: Run `docker build` and `docker push` to build and push image according `manifest/docker`.\n- `make deploy TAG=xxx`: Run `kustomize build` to build and deploy deployment to kubernetes server group according `manifest/deploy`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsb-child%2Fohmyduo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsb-child%2Fohmyduo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsb-child%2Fohmyduo/lists"}