Spaces:
Running
Running
ikeda
commited on
Commit
·
1c5bad2
1
Parent(s):
6810bed
add 'No Designation' to mark_list(list of designation type ex. Country, City etc.) and skip mark paste process if mark is 'No Designation'
Browse files
src/display_message_en.json
CHANGED
@@ -29,7 +29,7 @@
|
|
29 |
"紫": "Purple: Ruins related to foreigners and foreign countries"
|
30 |
},
|
31 |
"label_mark": "Designation Type",
|
32 |
-
"mark_list": ["国指定", "都指定", "道指定", "府指定", "県指定", "区指定", "市指定", "町指定", "村指定"],
|
33 |
"label_historic_site_type": "Historic Site Type",
|
34 |
"placeholder_historic_site_type": "ex. Statue, Monument, Site, etc.",
|
35 |
"label_difficulty": "Difficulty",
|
|
|
29 |
"紫": "Purple: Ruins related to foreigners and foreign countries"
|
30 |
},
|
31 |
"label_mark": "Designation Type",
|
32 |
+
"mark_list": ["国指定", "都指定", "道指定", "府指定", "県指定", "区指定", "市指定", "町指定", "村指定", "指定無し"],
|
33 |
"label_historic_site_type": "Historic Site Type",
|
34 |
"placeholder_historic_site_type": "ex. Statue, Monument, Site, etc.",
|
35 |
"label_difficulty": "Difficulty",
|
src/display_message_ja.json
CHANGED
@@ -29,7 +29,7 @@
|
|
29 |
"紫": "「紫」: 外国及び外国人に関する遺跡"
|
30 |
},
|
31 |
"label_mark": "指定種類",
|
32 |
-
"mark_list": ["国指定", "都指定", "道指定", "府指定", "県指定", "区指定", "市指定", "町指定", "村指定"],
|
33 |
"label_historic_site_type": "史跡種類",
|
34 |
"placeholder_historic_site_type": "ex.銅像、石碑、記念碑、跡地、モニュメントなど。",
|
35 |
"label_difficulty": "訪問難度",
|
|
|
29 |
"紫": "「紫」: 外国及び外国人に関する遺跡"
|
30 |
},
|
31 |
"label_mark": "指定種類",
|
32 |
+
"mark_list": ["国指定", "都指定", "道指定", "府指定", "県指定", "区指定", "市指定", "町指定", "村指定", "指定無し"],
|
33 |
"label_historic_site_type": "史跡種類",
|
34 |
"placeholder_historic_site_type": "ex.銅像、石碑、記念碑、跡地、モニュメントなど。",
|
35 |
"label_difficulty": "訪問難度",
|
src/front_card_image_historic_site.py
CHANGED
@@ -81,8 +81,9 @@ def create_historic_site_card_image(img_bytearray, option_dict):
|
|
81 |
card_img = Image.open(card_frame_path_dict[option_dict['色']])
|
82 |
|
83 |
# Adding a Marker
|
84 |
-
|
85 |
-
|
|
|
86 |
|
87 |
# Embedding a Picture in the Card
|
88 |
card_img.paste(picture_img, PICTURE_LT_XY)
|
|
|
81 |
card_img = Image.open(card_frame_path_dict[option_dict['色']])
|
82 |
|
83 |
# Adding a Marker
|
84 |
+
if option_dict['マーク'] in card_mark_path_dict:
|
85 |
+
mark_image = Image.open(card_mark_path_dict[option_dict['マーク']])
|
86 |
+
card_img.paste(mark_image, mask=mark_image)
|
87 |
|
88 |
# Embedding a Picture in the Card
|
89 |
card_img.paste(picture_img, PICTURE_LT_XY)
|