LeafLeafLeaf commited on
Commit
de89ca4
·
1 Parent(s): 69fda13

feat: 同步https://github.com/MeetWq/meme-generator/releases/tag/v0.0.18

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitignore +1 -0
  2. .pre-commit-config.yaml +22 -11
  3. Dockerfile +1 -1
  4. README.md +1 -0
  5. docker/config.toml.template +1 -1
  6. docs/develop.md +0 -1
  7. docs/docker.md +9 -12
  8. docs/images/bluearchive.jpg +0 -0
  9. docs/images/certificate.png +3 -0
  10. docs/images/clown.png +3 -0
  11. docs/images/clown_instance0.png +3 -0
  12. docs/images/clown_instance1.png +3 -0
  13. docs/images/daynight.jpg +0 -0
  14. docs/images/dog_dislike.gif +3 -0
  15. docs/images/dog_dislike_instance0.gif +3 -0
  16. docs/images/dog_dislike_instance1.gif +3 -0
  17. docs/images/frieren_take.jpg +0 -0
  18. docs/images/lim_x_0.jpg +0 -0
  19. docs/images/listen_music.gif +3 -0
  20. docs/images/little_angel.jpg +0 -0
  21. docs/images/loading.jpg +0 -0
  22. docs/images/look_flat.jpg +0 -0
  23. docs/images/look_this_icon.jpg +0 -0
  24. docs/images/lost_dog.jpg +0 -0
  25. docs/images/love_you.gif +3 -0
  26. docs/images/luoyonghao_say.jpg +0 -0
  27. docs/images/luxun_say.jpg +0 -0
  28. docs/images/maikease.gif +3 -0
  29. docs/images/maimai_awaken.jpg +0 -0
  30. docs/images/maimai_join.jpg +0 -0
  31. docs/images/make_friend.jpg +0 -0
  32. docs/images/marriage.jpg +0 -0
  33. docs/images/meteor.jpg +0 -0
  34. docs/images/mihoyo.png +3 -0
  35. docs/images/mourning.jpg +0 -0
  36. docs/images/mourning_instance0.jpg +0 -0
  37. docs/images/mourning_instance1.jpg +0 -0
  38. docs/images/murmur.jpg +0 -0
  39. docs/images/my_friend.jpg +0 -0
  40. docs/images/my_wife.jpg +0 -0
  41. docs/images/name_generator.jpg +0 -0
  42. docs/images/need.jpg +0 -0
  43. docs/images/nekoha_holdsign.jpg +0 -0
  44. docs/images/nihaosaoa.gif +3 -0
  45. docs/images/nijika_holdsign.jpg +0 -0
  46. docs/images/no_response.jpg +0 -0
  47. docs/images/nokia.jpg +0 -0
  48. docs/images/not_call_me.png +3 -0
  49. docs/images/note_for_leave.jpg +0 -0
  50. docs/images/oshi_no_ko.png +3 -0
.gitignore CHANGED
@@ -4,6 +4,7 @@ dist/
4
  .idea/
5
  venv/
6
  .venv/
 
7
 
8
  result.png
9
  result.jpg
 
4
  .idea/
5
  venv/
6
  .venv/
7
+ pdm.lock
8
 
9
  result.png
10
  result.jpg
.pre-commit-config.yaml CHANGED
@@ -1,26 +1,37 @@
1
- default_install_hook_types: [pre-commit, prepare-commit-msg]
2
  ci:
3
- autofix_commit_msg: ":rotating_light: auto fix by pre-commit hooks"
4
  autofix_prs: true
5
- autoupdate_branch: master
6
- autoupdate_schedule: monthly
7
- autoupdate_commit_msg: ":arrow_up: auto update by pre-commit hooks"
8
  repos:
9
- - repo: https://github.com/hadialqattan/pycln
10
- rev: v2.1.3
11
  hooks:
12
- - id: pycln
13
- args: [--config, pyproject.toml]
 
14
 
15
  - repo: https://github.com/pycqa/isort
16
- rev: 5.12.0
17
  hooks:
18
  - id: isort
19
  stages: [commit]
20
 
21
  - repo: https://github.com/psf/black
22
- rev: 23.1.0
23
  hooks:
24
  - id: black
25
  stages: [commit]
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ci:
2
+ autofix_commit_msg: "style: auto fix by pre-commit hooks"
3
  autofix_prs: true
4
+ autoupdate_branch: main
5
+ autoupdate_schedule: quarterly
6
+ autoupdate_commit_msg: "chore: auto update by pre-commit hooks"
7
  repos:
8
+ - repo: https://github.com/astral-sh/ruff-pre-commit
9
+ rev: v0.1.9
10
  hooks:
11
+ - id: ruff
12
+ args: [--fix, --exit-non-zero-on-fix]
13
+ stages: [commit]
14
 
15
  - repo: https://github.com/pycqa/isort
16
+ rev: 5.13.2
17
  hooks:
18
  - id: isort
19
  stages: [commit]
20
 
21
  - repo: https://github.com/psf/black
22
+ rev: 23.12.1
23
  hooks:
24
  - id: black
25
  stages: [commit]
26
 
27
+ - repo: https://github.com/pre-commit/mirrors-prettier
28
+ rev: v4.0.0-alpha.8
29
+ hooks:
30
+ - id: prettier
31
+ types_or: [javascript, jsx, ts, tsx, markdown, yaml, json]
32
+ stages: [commit]
33
+ exclude: |
34
+ (?x)^(
35
+ resources/resource_list.json|
36
+ docs/memes.md
37
+ )$
Dockerfile CHANGED
@@ -13,7 +13,7 @@ FROM python:3.10-slim as app
13
 
14
  WORKDIR /app
15
 
16
- EXPOSE 7860
17
 
18
  VOLUME /data
19
 
 
13
 
14
  WORKDIR /app
15
 
16
+ EXPOSE 2233
17
 
18
  VOLUME /data
19
 
README.md CHANGED
@@ -4,6 +4,7 @@ emoji: 🌖
4
  colorFrom: purple
5
  colorTo: indigo
6
  sdk: docker
 
7
  pinned: false
8
  ---
9
 
 
4
  colorFrom: purple
5
  colorTo: indigo
6
  sdk: docker
7
+ app_port: 2233
8
  pinned: false
9
  ---
10
 
docker/config.toml.template CHANGED
@@ -13,7 +13,7 @@ baidu_trans_apikey = "$BAIDU_TRANS_APIKEY"
13
 
14
  [server]
15
  host = "0.0.0.0"
16
- port = 7860
17
 
18
  [log]
19
  log_level = "$LOG_LEVEL"
 
13
 
14
  [server]
15
  host = "0.0.0.0"
16
+ port = 2233
17
 
18
  [log]
19
  log_level = "$LOG_LEVEL"
docs/develop.md CHANGED
@@ -72,7 +72,6 @@ add_meme(
72
 
73
  也可以一个文件中注册多个表情,如:[gif_subtitle](../meme_generator/memes/gif_subtitle/__init__.py)
74
 
75
-
76
  ## 参数定义
77
 
78
  部分表情需要额外的参数。表情参数的类型定义如下:
 
72
 
73
  也可以一个文件中注册多个表情,如:[gif_subtitle](../meme_generator/memes/gif_subtitle/__init__.py)
74
 
 
75
  ## 参数定义
76
 
77
  部分表情需要额外的参数。表情参数的类型定义如下:
docs/docker.md CHANGED
@@ -14,19 +14,17 @@ docker run -d \
14
 
15
  运行后可通过 api 方式调用
16
 
17
-
18
  ### 环境变量
19
 
20
- | 变量名 | 默认值 | 说明 |
21
- | --- | --- | --- |
22
- | `MEME_DIRS` | `'["/data/memes"]'` | 额外表情路径 |
23
- | `MEME_DISABLED_LIST` | `'[]'` | 禁用表情列表 |
24
- | `GIF_MAX_SIZE` | `10.0` | 限制生成的 gif 文件大小 |
25
- | `GIF_MAX_FRAMES` | `100` | 限制生成的 gif 文件帧数 |
26
- | `BAIDU_TRANS_APPID` | `''` | 百度翻译 appid |
27
- | `BAIDU_TRANS_APIKEY` | `''` | 百度翻译 apikey |
28
- | `LOG_LEVEL` | `'INFO'` | 日志等级 |
29
-
30
 
31
  ### 加载额外表情
32
 
@@ -36,7 +34,6 @@ docker run -d \
36
 
37
  将额外表情放置于 `<YOUR_DATA_DIR>/memes` 即可
38
 
39
-
40
  完整的运行示例:
41
 
42
  ```shell
 
14
 
15
  运行后可通过 api 方式调用
16
 
 
17
  ### 环境变量
18
 
19
+ | 变量名 | 默认值 | 说明 |
20
+ | -------------------- | ------------------- | ----------------------- |
21
+ | `MEME_DIRS` | `'["/data/memes"]'` | 额外表情路径 |
22
+ | `MEME_DISABLED_LIST` | `'[]'` | 禁用表情列表 |
23
+ | `GIF_MAX_SIZE` | `10.0` | 限制生成的 gif 文件大小 |
24
+ | `GIF_MAX_FRAMES` | `100` | 限制生成的 gif 文件帧数 |
25
+ | `BAIDU_TRANS_APPID` | `''` | 百度翻译 appid |
26
+ | `BAIDU_TRANS_APIKEY` | `''` | 百度翻译 apikey |
27
+ | `LOG_LEVEL` | `'INFO'` | 日志等级 |
 
28
 
29
  ### 加载额外表情
30
 
 
34
 
35
  将额外表情放置于 `<YOUR_DATA_DIR>/memes` 即可
36
 
 
37
  完整的运行示例:
38
 
39
  ```shell
docs/images/bluearchive.jpg ADDED
docs/images/certificate.png ADDED

Git LFS Details

  • SHA256: 2ba077918e7fed9ad1617e82e8b15e25833efe7a9381553fccf0ab24b2b87dec
  • Pointer size: 132 Bytes
  • Size of remote file: 1.83 MB
docs/images/clown.png ADDED

Git LFS Details

  • SHA256: 017a9a7467b61b65c478f0b72e1e0f115f865746af196fb779115b6199d415d4
  • Pointer size: 131 Bytes
  • Size of remote file: 467 kB
docs/images/clown_instance0.png ADDED

Git LFS Details

  • SHA256: 610cd9e872c4c4c78731b4ac493f303ffe2ed6580c3091ffaae50d5528d08ee5
  • Pointer size: 131 Bytes
  • Size of remote file: 477 kB
docs/images/clown_instance1.png ADDED

Git LFS Details

  • SHA256: 8ea0f59962e0d5eaeecfa8eff729b0d65f7d8f8e1f97ca89b34d1d7e2d0fa022
  • Pointer size: 131 Bytes
  • Size of remote file: 506 kB
docs/images/daynight.jpg ADDED
docs/images/dog_dislike.gif ADDED

Git LFS Details

  • SHA256: 6bfa37e78e853a4d2f6418509a40ca5382f48089b72780810f5164540d786f52
  • Pointer size: 132 Bytes
  • Size of remote file: 1.17 MB
docs/images/dog_dislike_instance0.gif ADDED

Git LFS Details

  • SHA256: 251033bc6ed4dcce37943d46e5a02961da0cb69cb3055e307faaa1df56d2756d
  • Pointer size: 132 Bytes
  • Size of remote file: 1.2 MB
docs/images/dog_dislike_instance1.gif ADDED

Git LFS Details

  • SHA256: ab8738f588608466129783ad1618733512cb54fce594b88e2699a0e4eac9bb5d
  • Pointer size: 132 Bytes
  • Size of remote file: 1.21 MB
docs/images/frieren_take.jpg ADDED
docs/images/lim_x_0.jpg ADDED
docs/images/listen_music.gif ADDED

Git LFS Details

  • SHA256: a5c9e11105067999e47422feda856c9dd7e5d6817ff1b0264702d06419495d13
  • Pointer size: 131 Bytes
  • Size of remote file: 778 kB
docs/images/little_angel.jpg ADDED
docs/images/loading.jpg ADDED
docs/images/look_flat.jpg ADDED
docs/images/look_this_icon.jpg ADDED
docs/images/lost_dog.jpg ADDED
docs/images/love_you.gif ADDED

Git LFS Details

  • SHA256: c2a50ea572f11f657fbc34293fa5b293d0fd8ed56e5b168ae391eafdbba5f999
  • Pointer size: 130 Bytes
  • Size of remote file: 15.2 kB
docs/images/luoyonghao_say.jpg ADDED
docs/images/luxun_say.jpg ADDED
docs/images/maikease.gif ADDED

Git LFS Details

  • SHA256: bed930e075b151063738c9ed6915bcba2a746a37b3d2fbb3e4df66babbbdccc7
  • Pointer size: 132 Bytes
  • Size of remote file: 2.99 MB
docs/images/maimai_awaken.jpg ADDED
docs/images/maimai_join.jpg ADDED
docs/images/make_friend.jpg ADDED
docs/images/marriage.jpg ADDED
docs/images/meteor.jpg ADDED
docs/images/mihoyo.png ADDED

Git LFS Details

  • SHA256: 9b6e53d99ee6206791821fea74de00f5dd29c1acc60864561fc833bd4d1923eb
  • Pointer size: 131 Bytes
  • Size of remote file: 147 kB
docs/images/mourning.jpg ADDED
docs/images/mourning_instance0.jpg ADDED
docs/images/mourning_instance1.jpg ADDED
docs/images/murmur.jpg ADDED
docs/images/my_friend.jpg ADDED
docs/images/my_wife.jpg ADDED
docs/images/name_generator.jpg ADDED
docs/images/need.jpg ADDED
docs/images/nekoha_holdsign.jpg ADDED
docs/images/nihaosaoa.gif ADDED

Git LFS Details

  • SHA256: 40a3ba7497a2b7c4ba28d33d114b13102f77dbdb243fc3995a6578c5d5a4c217
  • Pointer size: 132 Bytes
  • Size of remote file: 1.11 MB
docs/images/nijika_holdsign.jpg ADDED
docs/images/no_response.jpg ADDED
docs/images/nokia.jpg ADDED
docs/images/not_call_me.png ADDED

Git LFS Details

  • SHA256: c8a826fb18ebf65b5b334e94eedfdc0848a09f579912f0b65c38d2a8b000a93f
  • Pointer size: 131 Bytes
  • Size of remote file: 132 kB
docs/images/note_for_leave.jpg ADDED
docs/images/oshi_no_ko.png ADDED

Git LFS Details

  • SHA256: 975bac38ce96a7aa26d9e0b1079bed864d1bd443ae7f33bd83abaecc05ea88f2
  • Pointer size: 131 Bytes
  • Size of remote file: 407 kB