Are you a loyal Duolingo user?
This repository can help you generate custom Duolingo stickers!
default content |
---|
https://sbchild.top /omd/_ |
change the character, origin text and translated text |
---|
https://sbchild.top /omd/_?c=lily&o=do not talk with me&t=不要和我讲话 |
Are you a Telegram user? Try https://t.me/sbchild_bot !
And the web page for try out just here(currently Chinese...)
Make some cute stickers, and show it on your site easily!
clone
or download this repository
- In
manifest/config
, copyconfig.example.toml
toconfig.toml
, then edit it:
-
httpServer
: if you need to enable this http server, then set totrue
otherwisefalse
-
set
telegramBotToken
to your telegram bot token. if you don't need this, set the value to empty -
change the HTTP server address
-
change the
rootDir
ofohmyduo
-
set
telegramBotHttpTimeout
to3000
, depends on your networking -
set
telegramBotHttpProxy
to your proxy server address. if you don't need this, set the value to empty -
set
telegramBotImageServer
to a Oh My Duo http server URL
- Compile
- Install
golang 1.20+
andgfcli
(executemake cli
command to install) - Run
./build.sh
- Deploy
- On your server, make sure
oh-my-duo-*
andconfig.yaml
are at the same directory - Run
oh-my-duo-*
- (optional) modify
OhMyDuo.service
, then copy to/etc/systemd/system/OhMyDuo.service
to create a systemd service - Now you can configure the reverse proxy settings of your web server, then you can let Telegram Bot use your server to process requests
- Test
- Open your web browser and open
your-domain-or-ip/your-root-dir/_
, for examplehttps://sbchild.top/omd/_
- If it shows a picture of Duo, then it finally works!
- Generate your own sticker
There are two ways to use this service for now:
- Add some parameters after
/_
, add?
before the first parameter, use&
to separate every parameters
/_
default parameters/_?c=lily
set the character, the default is Duo- Duo
- Bea
- Vikram
- Oscar
- Junior
- Eddy
- Zari
- Lily
- Lin
- Lucy
- Falstaff
/_?o=text...
the origin text, replace the space to%20
/_?t=text...
the translated text
- Add some parameters after
/_/
, use|
to separate every parameters
-
/_/Hello-world|你好-世界
use the default character, origin text isHello world
, translated text is你好 世界
. replace the space to-
-
/_/Can-you-speak--English%3f|你会讲英语吗?
origin text isCan you speak-English?
, translated text is你会讲英语吗?
. replace?
to%3f
, and replace-
to--
-
/_/lucy|Can-you-speak--English%3f|你会讲英语吗?
set the character toLucy
, origin text isCan you speak-English?
, translated text is你会讲英语吗?
But in Telegram:
-
@some_bot Hello world|你好 世界
list pictures of all characters, origin text isHello world
, translated text is你好 世界
-
@some_bot Can u speak english|你能讲英语嘛|zari
use the Zari character, origin text isCan u speak english
, translated text is你能讲英语嘛
- emoji support 🙂
- Japanese support
- split very long words automatically
- more language flags (PR welcome)
Pull requests are welcome to improve this program
Apache 2.0
Project Makefile Commands:
make cli
: Install or Update to the latest GoFrame CLI tool.make dao
: Generate go files forEntity/DAO/DO
according to the configuration file fromhack
folder.make service
: Parselogic
folder to generate interface go files intoservice
folder.make image TAG=xxx
: Rundocker build
to build image accordingmanifest/docker
.make image.push TAG=xxx
: Rundocker build
anddocker push
to build and push image accordingmanifest/docker
.make deploy TAG=xxx
: Runkustomize build
to build and deploy deployment to kubernetes server group accordingmanifest/deploy
.