diff --git a/common b/common index 0a18304..3d3d297 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 0a183043ab72cb0ea4e3a918c9a5f9d19245e4d9 +Subproject commit 3d3d297486a820f97e64b20c5aad5ea5d13baaf5 diff --git a/scripts/build-common.py b/scripts/build-common.py index eaece3d..50e96e3 100644 --- a/scripts/build-common.py +++ b/scripts/build-common.py @@ -22,4 +22,6 @@ file.with_suffix( "." + hashlib.sha3_256(file.read_bytes()).hexdigest()[:6] + ".json" ).name - ).write_bytes(json.dumps(yaml.safe_load(file.read_bytes())).encode()) + ).write_bytes( + json.dumps(yaml.safe_load(file.read_bytes()), ensure_ascii=False, indent=2).encode() + ) diff --git a/server/templates/new-subject.html.jinja2 b/server/templates/new-subject.html.jinja2 index 344dfb4..6e9d351 100644 --- a/server/templates/new-subject.html.jinja2 +++ b/server/templates/new-subject.html.jinja2 @@ -133,9 +133,9 @@ } from '/static/@bgm38/wiki/0.2.8/dist/index.js'; import platforms - from '/static/common/subject_platforms.370f9e.json' assert {type: 'json'}; + from '/static/common/subject_platforms.fc5f5a.json' assert {type: 'json'}; import templates - from '/static/common/wiki_template.7ce1ba.json' assert {type: 'json'}; + from '/static/common/wiki_template.2ffc41.json' assert {type: 'json'}; const subjectType = {{ subject_type | tojson }}; const configForSubjectType = platforms.platforms[subjectType]; diff --git a/static/common/subject_platforms.370f9e.json b/static/common/subject_platforms.370f9e.json deleted file mode 100644 index ee17827..0000000 --- a/static/common/subject_platforms.370f9e.json +++ /dev/null @@ -1 +0,0 @@ -{"define": {"type": {"book": 1, "anime": 2, "music": 3, "game": 4, "real": 6}, "types": {"book": {"none": 0, "comic": 1001, "novel": 1002, "illustration": 1003, "picture": 1004, "photo": 1005, "official": 1006}, "book_series": {"offprint": 0, "series": 1}, "anime": {"tv": 1, "ova": 2, "movie": 3, "short_film": 4, "web": 5, "anime_comic": 2006}, "real": {"none": 0, "jp": 1, "en": 2, "cn": 3, "tv": 6001, "movie": 6002, "live": 6003, "show": 6004}, "music": {"album": 3001, "drama": 3002, "audio": 3003, "radio": 3004}, "game": {"none": 0, "games": 4001, "software": 4002, "dlc": 4003, "demo": 4004, "table": 4005}}}, "default": {"1": {"sort_keys": ["\u53d1\u552e\u65e5"], "wiki_tpl": "Book"}, "2": {"sort_keys": ["\u653e\u9001\u5f00\u59cb"], "wiki_tpl": "Anime"}, "3": {"sort_keys": ["\u53d1\u552e\u65e5\u671f"], "wiki_tpl": "Music"}, "4": {"sort_keys": ["\u53d1\u884c\u65e5\u671f"], "wiki_tpl": "Game"}, "6": {"sort_keys": ["\u4e0a\u6620\u65e5", "\u5f00\u59cb"], "wiki_tpl": "TV"}}, "platforms": {"1": {"1001": {"id": 1001, "type": "Comic", "type_cn": "\u6f2b\u753b", "alias": "comic", "wiki_tpl": "Manga", "enable_header": true, "order": 0}, "1002": {"id": 1002, "type": "Novel", "type_cn": "\u5c0f\u8bf4", "alias": "novel", "wiki_tpl": "Novel", "enable_header": true, "order": 1}, "1003": {"id": 1003, "type": "Illustration", "type_cn": "\u753b\u96c6", "alias": "illustration", "wiki_tpl": "Book", "enable_header": true, "order": 2}, "1004": {"id": 1004, "type": "Picture", "type_cn": "\u7ed8\u672c", "alias": "picture", "wiki_tpl": "Book", "enable_header": true, "order": 3}, "1006": {"id": 1006, "type": "Official", "type_cn": "\u516c\u5f0f\u4e66", "alias": "official", "wiki_tpl": "Book", "enable_header": true, "order": 4}, "1005": {"id": 1005, "type": "Photo", "type_cn": "\u5199\u771f", "alias": "photo", "wiki_tpl": "PhotoBook", "enable_header": true, "order": 5}, "0": {"id": 0, "type": "other", "type_cn": "\u5176\u4ed6", "alias": "misc", "wiki_tpl": "Book", "order": 6}}, "2": {"1": {"id": 1, "type": "TV", "type_cn": "TV", "alias": "tv", "enable_header": true, "wiki_tpl": "TVAnime", "order": 0, "sort_keys": ["\u653e\u9001\u5f00\u59cb"]}, "5": {"id": 5, "type": "web", "type_cn": "WEB", "alias": "web", "enable_header": true, "wiki_tpl": "TVAnime", "order": 1, "sort_keys": ["\u653e\u9001\u5f00\u59cb"]}, "2": {"id": 2, "type": "OVA", "type_cn": "OVA", "alias": "ova", "enable_header": true, "wiki_tpl": "OVA", "order": 2, "sort_keys": ["\u53d1\u552e\u65e5", "\u53d1\u552e\u65e5\u671f"]}, "3": {"id": 3, "type": "movie", "type_cn": "\u5267\u573a\u7248", "alias": "movie", "enable_header": true, "wiki_tpl": "Movie", "order": 3, "sort_keys": ["\u4e0a\u6620\u5e74\u5ea6", "\u4e0a\u6620\u65e5"]}, "2006": {"id": 2006, "type": "anime_comic", "type_cn": "\u52a8\u6001\u6f2b\u753b", "alias": "anime_comic", "enable_header": true, "wiki_tpl": "TVAnime", "order": 4}, "0": {"id": 0, "type": "other", "type_cn": "\u5176\u4ed6", "alias": "misc", "wiki_tpl": "Anime", "order": 5}}, "6": {"1": {"id": 1, "type": "jp", "type_cn": "\u65e5\u5267", "alias": "jp", "enable_header": true, "wiki_tpl": "TV", "order": 0}, "2": {"id": 2, "type": "en", "type_cn": "\u6b27\u7f8e\u5267", "alias": "en", "enable_header": true, "wiki_tpl": "TV", "order": 1}, "3": {"id": 3, "type": "cn", "type_cn": "\u534e\u8bed\u5267", "alias": "cn", "enable_header": true, "wiki_tpl": "TV", "order": 2}, "6001": {"id": 6001, "type": "tv", "type_cn": "\u7535\u89c6\u5267", "alias": "tv", "enable_header": true, "wiki_tpl": "TV", "order": 3}, "6002": {"id": 6002, "type": "movie", "type_cn": "\u7535\u5f71", "alias": "movie", "enable_header": true, "wiki_tpl": "realMovie", "order": 4}, "6003": {"id": 6003, "type": "live", "type_cn": "\u6f14\u51fa", "alias": "live", "enable_header": true, "wiki_tpl": "TV", "order": 5}, "6004": {"id": 6004, "type": "show", "type_cn": "\u7efc\u827a", "alias": "show", "enable_header": true, "wiki_tpl": "TV", "order": 6}, "0": {"id": 0, "type": "other", "type_cn": "\u5176\u4ed6", "alias": "misc", "wiki_tpl": "TV", "order": 7}}, "4": {"4001": {"id": 4001, "type": "games", "type_cn": "\u6e38\u620f", "alias": "games", "enable_header": true, "order": 0}, "4003": {"id": 4003, "type": "dlc", "type_cn": "\u6269\u5c55\u5305", "alias": "dlc", "enable_header": true, "order": 1}, "4002": {"id": 4002, "type": "software", "type_cn": "\u8f6f\u4ef6", "alias": "software", "enable_header": true, "order": 2}, "4005": {"id": 4005, "type": "tabletop", "type_cn": "\u684c\u6e38", "alias": "tabletop", "enable_header": true, "order": 3}, "0": {"id": 0, "type": "other", "type_cn": "\u5176\u4ed6", "alias": "misc", "order": 4}}, "book_series": {"1": {"id": 1, "type": "series", "type_cn": "\u7cfb\u5217", "alias": "series", "order": 0}, "0": {"id": 0, "type": "offprint", "type_cn": "\u5355\u884c\u672c", "alias": "offprint", "order": 1}}, "game_platforms": {"4": {"id": 4, "type": "PC", "alias": "pc", "search_string": "pc|windows", "type_cn": "PC", "order": 0}, "33": {"id": 33, "type": "Mac OS", "alias": "mac", "search_string": "mac", "type_cn": "Mac OS", "order": 1}, "38": {"id": 38, "type": "PS5", "alias": "ps5", "search_string": "PS5", "type_cn": "PS5", "order": 2}, "39": {"id": 39, "type": "Xbox Series X/S", "alias": "xbox_series_xs", "search_string": "XSX|XSS|(Xbox Series X)|(Xbox Series S)", "type_cn": "Xbox Series X/S", "order": 3}, "34": {"id": 34, "type": "PS4", "alias": "ps4", "search_string": "PS4", "type_cn": "PS4", "order": 4}, "35": {"id": 35, "type": "Xbox One", "alias": "xbox_one", "search_string": "(Xbox One)", "type_cn": "Xbox One", "order": 5}, "37": {"id": 37, "type": "Nintendo Switch", "alias": "ns", "search_string": "(Nintendo Switch)|NS", "type_cn": "Nintendo Switch", "order": 6}, "36": {"id": 36, "type": "Wii U", "alias": "wii_u", "search_string": "(Wii U)|WiiU", "type_cn": "Wii U", "order": 7}, "8": {"id": 8, "type": "PS3", "alias": "ps3", "search_string": "PS3|(PlayStation 3)", "type_cn": "PS3", "order": 8}, "9": {"id": 9, "type": "Xbox360", "alias": "xbox360", "search_string": "xbox360", "type_cn": "Xbox360", "order": 9}, "10": {"id": 10, "type": "Wii", "alias": "wii", "search_string": "Wii", "type_cn": "Wii", "order": 10}, "30": {"id": 30, "type": "PSVita", "alias": "psv", "search_string": "psv|vita", "type_cn": "PS Vita", "order": 11}, "31": {"id": 31, "type": "3DS", "alias": "3ds", "search_string": "3ds", "type_cn": "3DS", "order": 12}, "11": {"id": 11, "type": "iOS", "alias": "iphone", "search_string": "iphone|ipad|ios", "type_cn": "iOS", "order": 13}, "32": {"id": 32, "type": "Android", "alias": "android", "search_string": "android", "type_cn": "Android", "order": 14}, "12": {"id": 12, "type": "ARC", "alias": "arc", "search_string": "ARC|\u8857\u673a", "type_cn": "\u8857\u673a", "order": 15}, "5": {"id": 5, "type": "NDS", "alias": "nds", "search_string": "nds", "type_cn": "NDS", "order": 16}, "6": {"id": 6, "type": "PSP", "alias": "psp", "search_string": "psp", "type_cn": "PSP", "order": 17}, "7": {"id": 7, "type": "PS2", "alias": "ps2", "search_string": "PS2", "type_cn": "PS2", "order": 18}, "15": {"id": 15, "type": "XBOX", "alias": "xbox", "search_string": "XBOX", "type_cn": "XBOX", "order": 19}, "17": {"id": 17, "type": "GameCube", "alias": "gamecube", "search_string": "GameCube|ngc", "type_cn": "GameCube", "order": 20}, "27": {"id": 27, "type": "Dreamcast", "alias": "dreamcast", "search_string": "dc", "type_cn": "Dreamcast", "order": 21}, "21": {"id": 21, "type": "Nintendo 64", "alias": "n64", "search_string": "n64", "type_cn": "Nintendo 64", "order": 22}, "28": {"id": 28, "type": "PlayStation", "alias": "ps", "search_string": "ps", "type_cn": "PlayStation", "order": 23}, "19": {"id": 19, "type": "SFC", "alias": "sfc", "search_string": "SFC", "type_cn": "SFC", "order": 24}, "20": {"id": 20, "type": "FC", "alias": "fc", "search_string": "FC", "type_cn": "FC", "order": 25}, "29": {"id": 29, "type": "WonderSwan", "alias": "ws", "search_string": "ws", "type_cn": "WonderSwan", "order": 26}, "26": {"id": 26, "type": "WonderSwan Color", "alias": "wsc", "search_string": "wsc", "type_cn": "WonderSwan Color", "order": 27}, "18": {"id": 18, "type": "NEOGEO Pocket Color", "alias": "ngp", "search_string": "ngp", "type_cn": "NEOGEO Pocket Color", "order": 28}, "22": {"id": 22, "type": "GBA", "alias": "GBA", "search_string": "GBA", "type_cn": "GBA", "order": 29}, "23": {"id": 23, "type": "GB", "alias": "GB", "search_string": "GB", "type_cn": "GB", "order": 30}, "25": {"id": 25, "type": "Virtual Boy", "alias": "vb", "search_string": "Virtual Boy", "type_cn": "Virtual Boy", "order": 31}}}} \ No newline at end of file diff --git a/static/common/wiki_template.7ce1ba.json b/static/common/wiki_template.7ce1ba.json deleted file mode 100644 index 309f91b..0000000 --- a/static/common/wiki_template.7ce1ba.json +++ /dev/null @@ -1 +0,0 @@ -{"TVAnime": "{{Infobox animanga/TVAnime\n|\u4e2d\u6587\u540d=\n|\u522b\u540d= {\n\n}\n|\u8bdd\u6570= *\n|\u653e\u9001\u5f00\u59cb= *\n|\u653e\u9001\u661f\u671f=\n|\u5b98\u65b9\u7f51\u7ad9=\n|\u5728\u7ebf\u64ad\u653e\u5e73\u53f0=\n|\u64ad\u653e\u7535\u89c6\u53f0=\n|\u5176\u4ed6\u7535\u89c6\u53f0=\n|\u64ad\u653e\u7ed3\u675f=\n|\u5bfc\u6f14=\n|\u97f3\u4e50=\n|\u5176\u4ed6=\n|Copyright=\n}}\n", "OVA": "{{Infobox animanga/OVA\n|\u4e2d\u6587\u540d=\n|\u522b\u540d= {\n\n}\n|\u8bdd\u6570= *\n|\u53d1\u552e\u65e5= *\n|\u5b98\u65b9\u7f51\u7ad9=\n|\u5f00\u59cb=\n|\u7ed3\u675f=\n|\u5176\u4ed6=\n}}\n", "Movie": "{{Infobox animanga/Movie\n|\u4e2d\u6587\u540d=\n|\u522b\u540d= {\n\n}\n|\u4e0a\u6620\u5e74\u5ea6= *\n|\u7247\u957f=\n|\u5b98\u65b9\u7f51\u7ad9=\n|\u5176\u4ed6=\n|Copyright=\n}}\n", "Anime": "{{Infobox animanga/Anime\n|\u4e2d\u6587\u540d=\n|\u522b\u540d= {\n\n}\n|\u4e0a\u6620\u5e74\u5ea6= *\n|\u7247\u957f=\n|\u5b98\u65b9\u7f51\u7ad9=\n|\u5176\u4ed6=\n|Copyright=\n}}\n", "Book": "{{Infobox animanga/Book\n|\u4e2d\u6587\u540d=\n|\u522b\u540d= {\n\n}\n|\u4f5c\u8005=\n|\u63d2\u56fe=\n|\u51fa\u7248\u793e=\n|\u4ef7\u683c=\n|\u5176\u4ed6\u51fa\u7248\u793e=\n|\u8fde\u8f7d\u6742\u5fd7=\n|\u53d1\u552e\u65e5=\n|\u9875\u6570=\n|ISBN=\n|\u5176\u4ed6=\n}}\n", "PhotoBook": "{{Infobox Book/PhotoBook\n|\u4e2d\u6587\u540d=\n|\u522b\u540d= {\n\n}\n|\u4f5c\u8005=\n|\u6444\u5f71=\n|\u51fa\u7248\u793e=\n|\u4ef7\u683c=\n|\u5176\u4ed6\u51fa\u7248\u793e=\n|\u8fde\u8f7d\u6742\u5fd7=\n|\u53d1\u552e\u65e5=\n|\u9875\u6570=\n|ISBN=\n|\u5176\u4ed6=\n}}\n", "Manga": "{{Infobox animanga/Manga\n|\u4e2d\u6587\u540d=\n|\u522b\u540d= {\n\n}\n|\u4f5c\u8005=\n|\u4f5c\u753b=\n|\u811a\u672c=\n|\u539f\u4f5c=\n|\u51fa\u7248\u793e= *\n|\u4ef7\u683c=\n|\u5176\u4ed6\u51fa\u7248\u793e=\n|\u8fde\u8f7d\u6742\u5fd7=\n|\u53d1\u552e\u65e5=\n|\u518c\u6570=\n|\u9875\u6570=\n|\u8bdd\u6570=\n|ISBN=\n|\u5176\u4ed6=\n}}\n", "Novel": "{{Infobox animanga/Novel\n|\u4e2d\u6587\u540d=\n|\u522b\u540d= {\n\n}\n|\u4f5c\u8005=\n|\u63d2\u56fe=\n|\u51fa\u7248\u793e= *\n|\u4ef7\u683c=\n|\u8fde\u8f7d\u6742\u5fd7=\n|\u53d1\u552e\u65e5=\n|\u518c\u6570=\n|\u9875\u6570=\n|\u8bdd\u6570=\n|ISBN=\n|\u5176\u4ed6=\n}}\n", "BookSeries": "{{Infobox animanga/BookSeries\n|\u4e2d\u6587\u540d=\n|\u522b\u540d= {\n\n}\n|\u51fa\u7248\u793e= *\n|\u8fde\u8f7d\u6742\u5fd7=\n|\u5f00\u59cb=\n|\u7ed3\u675f=\n|\u518c\u6570=\n|\u8bdd\u6570=\n|\u539f\u4f5c=\n|\u5176\u4ed6=\n}}\n", "Album": "{{Infobox Album\n|\u4e2d\u6587\u540d=\n|\u522b\u540d= {\n\n}\n|\u827a\u672f\u5bb6=\n|\u4f5c\u66f2=\n|\u7f16\u66f2=\n|\u4f5c\u8bcd=\n|\u5382\u724c=\n|\u53d1\u552e\u65e5\u671f=\n|\u4ef7\u683c=\n|\u7248\u672c\u7279\u6027=\n|\u64ad\u653e\u65f6\u957f=\n|\u5f55\u97f3=\n|\u789f\u7247\u6570\u91cf=\n}}\n", "Game": "{{Infobox Game\n|\u4e2d\u6587\u540d=\n|\u522b\u540d= {\n\n}\n|\u5e73\u53f0= {\n\n}\n|\u6e38\u620f\u7c7b\u578b=\n|\u6e38\u620f\u5f15\u64ce=\n|\u6e38\u73a9\u4eba\u6570=\n|\u53d1\u884c\u65e5\u671f=\n|\u552e\u4ef7=\n|\u5f00\u53d1=\n|\u53d1\u884c=\n|\u5267\u672c=\n|\u7a0b\u5e8f=\n|website=\n}}\n", "TV": "{{Infobox real/Television\n|\u4e2d\u6587\u540d=\n|\u522b\u540d= {\n\n}\n|\u96c6\u6570=\n|\u5b63\u6570=\n|\u653e\u9001\u661f\u671f=\n|\u5f00\u59cb=\n|\u7ed3\u675f=\n|\u4e3b\u6f14=\n|\u5bfc\u6f14=\n|\u97f3\u4e50=\n|\u539f\u4f5c=\n|\u5236\u4f5c=\n|\u7c7b\u578b=\n|\u56fd\u5bb6/\u5730\u533a=\n|\u8bed\u8a00=\n|\u6bcf\u96c6\u957f=\n|\u5728\u7ebf\u64ad\u653e\u5e73\u53f0=\n|\u7535\u89c6\u7f51=\n|\u7535\u89c6\u53f0=\n|\u9891\u9053=\n|\u89c6\u9891\u5236\u5f0f=\n|\u97f3\u9891\u5236\u5f0f=\n|\u9996\u64ad\u56fd\u5bb6=\n|\u9996\u64ad\u5730\u533a=\n|\u53f0\u6e7e\u540d\u79f0=\n|\u6e2f\u6fb3\u540d\u79f0=\n|\u9a6c\u65b0\u540d\u79f0=\n|\u5b98\u65b9\u7f51\u7ad9=\n|imdb_id=\n|tvdb_id=\n}}\n", "Music": "{{Infobox Album\n|\u4e2d\u6587\u540d= \n|\u522b\u540d={\n}\n|\u827a\u672f\u5bb6= \n|\u4f5c\u66f2= \n|\u7f16\u66f2= \n|\u4f5c\u8bcd= \n|\u5382\u724c= \n|\u53d1\u552e\u65e5\u671f= \n|\u4ef7\u683c= \n|\u7248\u672c\u7279\u6027= \n|\u64ad\u653e\u65f6\u957f= \n|\u5f55\u97f3= \n|\u789f\u7247\u6570\u91cf= \n}}\n", "realMovie": "{{Infobox real/Movie\n|\u4e2d\u6587\u540d=\n|\u522b\u540d= {\n\n}\n|\u4e0a\u6620\u65e5=\n|\u7247\u957f=\n|\u7c7b\u578b=\n|\u56fd\u5bb6/\u5730\u533a=\n|\u8bed\u8a00=\n|\u5b98\u65b9\u7f51\u7ad9=\n|imdb_id=\n|tmdb_id=\n|tvdb_id=\n}}\n", "Crt": "{{Infobox Crt\n|\u7b80\u4f53\u4e2d\u6587\u540d=\n|\u522b\u540d={\n[\u7b2c\u4e8c\u4e2d\u6587\u540d|]\n[\u82f1\u6587\u540d|]\n[\u65e5\u6587\u540d|]\n[\u7eaf\u5047\u540d|]\n[\u7f57\u9a6c\u5b57|]\n[\u6635\u79f0|]\n}\n|\u6027\u522b=\n|\u751f\u65e5=\n|\u8840\u578b=\n|\u8eab\u9ad8=\n|\u4f53\u91cd=\n|BWH=\n|\u5f15\u7528\u6765\u6e90={\n}\n}}\n", "doujinBook": "{{Infobox doujin/Book\n|\u4f5c\u8005={\n\n}\n|\u539f\u4f5c=\n|CP=\n|\u8bed\u8a00=\n|\u9875\u6570=\n|\u5c3a\u5bf8=\n|\u4ef7\u683c=\n|\u53d1\u552e\u65e5=\n}}\n", "doujinMusic": "{{Infobox doujin/Album\n|\u827a\u672f\u5bb6={\n\n}\n|\u539f\u4f5c=\n|\u8bed\u8a00=\n|\u7248\u672c\u7279\u6027=\n|\u789f\u7247\u6570\u91cf=\n|\u64ad\u653e\u65f6\u957f=\n|\u4ef7\u683c=\n|\u53d1\u552e\u65e5=\n}}\n", "doujinGame": "{{Infobox doujin/Game\n|\u522b\u540d= {\n\n}\n|\u5f00\u53d1\u8005={\n\n}\n|\u539f\u4f5c=\n|\u5e73\u53f0=\n|\u6e38\u620f\u7c7b\u578b=\n|\u6e38\u620f\u5f15\u64ce=\n|\u6e38\u73a9\u4eba\u6570=\n|\u8bed\u8a00=\n|\u4ef7\u683c=\n|\u53d1\u552e\u65e5=\n}\n"} \ No newline at end of file