Taka005 commited on
Commit
ecb21b5
·
1 Parent(s): 298a9fe
Files changed (3) hide show
  1. README.md +5 -5
  2. main.py +12 -12
  3. requirements.txt +1 -1
README.md CHANGED
@@ -7,11 +7,11 @@
7
  - `/`で生成
8
  ## パラメーター
9
  - type: タイプ
10
- - - `color` カラーアイコン
11
- - - `reverse` アイコンの位置反転
12
- - - `reverseColor` カラーアイコン・アイコンの位置反転
13
- - - `white` 色反転
14
- - - `reverseWhite` 色反転・アイコンの位置反転
15
  - name: 名前
16
  - id: ID
17
  - content: 内容
 
7
  - `/`で生成
8
  ## パラメーター
9
  - type: タイプ
10
+ - `color` カラーアイコン
11
+ - `reverse` アイコンの位置反転
12
+ - `reverseColor` カラーアイコン・アイコンの位置反転
13
+ - `white` 色反転
14
+ - `reverseWhite` 色反転・アイコンの位置反転
15
  - name: 名前
16
  - id: ID
17
  - content: 内容
main.py CHANGED
@@ -91,10 +91,10 @@ def make(name, id, content, icon):
91
 
92
  tx = ImageDraw.Draw(img)
93
 
94
- tsize_t = drawText(img, (890, 270), content, size=45, color=(255, 255, 255, 255), split_len=16)
95
 
96
  name_y = tsize_t[2] + 40
97
- tsize_name = drawText(img, (890, name_y), f"@{name}", size=25, color=(255, 255, 255, 255), split_len=25, disable_dot_wrap=True)
98
 
99
  id_y = name_y + tsize_name[1] + 4
100
  drawText(img, (890, id_y), id, size=18, color=(180, 180, 180, 255), split_len=45, disable_dot_wrap=True)
@@ -117,10 +117,10 @@ def colorMake(name, id, content, icon):
117
 
118
  tx = ImageDraw.Draw(img)
119
 
120
- tsize_t = drawText(img, (890, 270), content, size=45, color=(255, 255, 255, 255), split_len=16)
121
 
122
  name_y = tsize_t[2] + 40
123
- tsize_name = drawText(img, (890, name_y), f"@{name}", size=25, color=(255, 255, 255, 255), split_len=25, disable_dot_wrap=True)
124
 
125
  id_y = name_y + tsize_name[1] + 4
126
  drawText(img, (890, id_y), id, size=18, color=(180, 180, 180, 255), split_len=45, disable_dot_wrap=True)
@@ -145,10 +145,10 @@ def reverseMake(name, id, content, icon):
145
 
146
  tx = ImageDraw.Draw(img)
147
 
148
- tsize_t = drawText(img, (390, 270), content, size=45, color=(255, 255, 255, 255), split_len=16)
149
 
150
  name_y = tsize_t[2] + 40
151
- tsize_name = drawText(img, (390, name_y), f"@{name}", size=25, color=(255, 255, 255, 255), split_len=25, disable_dot_wrap=True)
152
 
153
  id_y = name_y + tsize_name[1] + 4
154
  drawText(img, (390, id_y), id, size=18, color=(180, 180, 180, 255), split_len=45, disable_dot_wrap=True)
@@ -171,10 +171,10 @@ def reverseColorMake(name, id, content, icon):
171
 
172
  tx = ImageDraw.Draw(img)
173
 
174
- tsize_t = drawText(img, (390, 270), content, size=45, color=(255, 255, 255, 255), split_len=16)
175
 
176
  name_y = tsize_t[2] + 40
177
- tsize_name = drawText(img, (390, name_y), f"@{name}", size=25, color=(255, 255, 255, 255), split_len=25, disable_dot_wrap=True)
178
 
179
  id_y = name_y + tsize_name[1] + 4
180
  drawText(img, (390, id_y), id, size=18, color=(180, 180, 180, 255), split_len=45, disable_dot_wrap=True)
@@ -197,10 +197,10 @@ def whiteMake(name, id, content, icon):
197
 
198
  tx = ImageDraw.Draw(img)
199
 
200
- tsize_t = drawText(img, (890, 270), content, size=45, color=(0, 0, 0, 0), split_len=16)
201
 
202
  name_y = tsize_t[2] + 40
203
- tsize_name = drawText(img, (890, name_y), f"@{name}", size=25, color=(0, 0, 0, 0), split_len=25, disable_dot_wrap=True)
204
 
205
  id_y = name_y + tsize_name[1] + 4
206
  drawText(img, (890, id_y), id, size=18, color=(90, 90, 90, 255), split_len=45, disable_dot_wrap=True)
@@ -223,10 +223,10 @@ def reverseWhiteMake(name, id, content, icon):
223
 
224
  tx = ImageDraw.Draw(img)
225
 
226
- tsize_t = drawText(img, (390, 270), content, size=45, color=(0, 0, 0, 0), split_len=16)
227
 
228
  name_y = tsize_t[2] + 40
229
- tsize_name = drawText(img, (390, name_y), f"@{name}", size=25, color=(0, 0, 0, 0), split_len=25, disable_dot_wrap=True)
230
 
231
  id_y = name_y + tsize_name[1] + 4
232
  drawText(img, (390, id_y), id, size=18, color=(90, 90, 90, 255), split_len=45, disable_dot_wrap=True)
 
91
 
92
  tx = ImageDraw.Draw(img)
93
 
94
+ tsize_t = drawText(img, (890, 270), content, size=55, color=(255, 255, 255, 255), split_len=16)
95
 
96
  name_y = tsize_t[2] + 40
97
+ tsize_name = drawText(img, (890, name_y), f"@{name}", size=28, color=(255, 255, 255, 255), split_len=25, disable_dot_wrap=True)
98
 
99
  id_y = name_y + tsize_name[1] + 4
100
  drawText(img, (890, id_y), id, size=18, color=(180, 180, 180, 255), split_len=45, disable_dot_wrap=True)
 
117
 
118
  tx = ImageDraw.Draw(img)
119
 
120
+ tsize_t = drawText(img, (890, 270), content, size=55, color=(255, 255, 255, 255), split_len=16)
121
 
122
  name_y = tsize_t[2] + 40
123
+ tsize_name = drawText(img, (890, name_y), f"@{name}", size=28, color=(255, 255, 255, 255), split_len=25, disable_dot_wrap=True)
124
 
125
  id_y = name_y + tsize_name[1] + 4
126
  drawText(img, (890, id_y), id, size=18, color=(180, 180, 180, 255), split_len=45, disable_dot_wrap=True)
 
145
 
146
  tx = ImageDraw.Draw(img)
147
 
148
+ tsize_t = drawText(img, (390, 270), content, size=55, color=(255, 255, 255, 255), split_len=16)
149
 
150
  name_y = tsize_t[2] + 40
151
+ tsize_name = drawText(img, (390, name_y), f"@{name}", size=28, color=(255, 255, 255, 255), split_len=25, disable_dot_wrap=True)
152
 
153
  id_y = name_y + tsize_name[1] + 4
154
  drawText(img, (390, id_y), id, size=18, color=(180, 180, 180, 255), split_len=45, disable_dot_wrap=True)
 
171
 
172
  tx = ImageDraw.Draw(img)
173
 
174
+ tsize_t = drawText(img, (390, 270), content, size=55, color=(255, 255, 255, 255), split_len=16)
175
 
176
  name_y = tsize_t[2] + 40
177
+ tsize_name = drawText(img, (390, name_y), f"@{name}", size=28, color=(255, 255, 255, 255), split_len=25, disable_dot_wrap=True)
178
 
179
  id_y = name_y + tsize_name[1] + 4
180
  drawText(img, (390, id_y), id, size=18, color=(180, 180, 180, 255), split_len=45, disable_dot_wrap=True)
 
197
 
198
  tx = ImageDraw.Draw(img)
199
 
200
+ tsize_t = drawText(img, (890, 270), content, size=55, color=(0, 0, 0, 0), split_len=16)
201
 
202
  name_y = tsize_t[2] + 40
203
+ tsize_name = drawText(img, (890, name_y), f"@{name}", size=28, color=(0, 0, 0, 0), split_len=25, disable_dot_wrap=True)
204
 
205
  id_y = name_y + tsize_name[1] + 4
206
  drawText(img, (890, id_y), id, size=18, color=(90, 90, 90, 255), split_len=45, disable_dot_wrap=True)
 
223
 
224
  tx = ImageDraw.Draw(img)
225
 
226
+ tsize_t = drawText(img, (390, 270), content, size=55, color=(0, 0, 0, 0), split_len=16)
227
 
228
  name_y = tsize_t[2] + 40
229
+ tsize_name = drawText(img, (390, name_y), f"@{name}", size=28, color=(0, 0, 0, 0), split_len=25, disable_dot_wrap=True)
230
 
231
  id_y = name_y + tsize_name[1] + 4
232
  drawText(img, (390, id_y), id, size=18, color=(90, 90, 90, 255), split_len=45, disable_dot_wrap=True)
requirements.txt CHANGED
@@ -1,4 +1,4 @@
1
  pillow==9.4.0
2
  pilmoji==2.0.2
3
- flask==2.2.3
4
  requests==2.28.2
 
1
  pillow==9.4.0
2
  pilmoji==2.0.2
3
+ flask==3.0.0
4
  requests==2.28.2