[{"data":1,"prerenderedAt":531},["ShallowReactive",2],{"navigation":3,"blog:/blog/2026041300-silentselene-code-edit":78,"blog:/blog/2026041300-silentselene-code-edit:surround":528},[4],{"title":5,"path":6,"stem":7,"children":8,"page":77},"Blog","/blog","blog",[9,13,17,21,25,29,33,37,41,45,49,53,57,61,65,69,73],{"title":10,"path":11,"stem":12},"ホームページ作り直したンゴねぇ","/blog/2026021300-create-homepage","blog/2026021300-create-homepage",{"title":14,"path":15,"stem":16},"バレンタインデー食べ食べナイト","/blog/2026021301-chocolate","blog/2026021301-chocolate",{"title":18,"path":19,"stem":20},"ボーンナム1600万をだした","/blog/2026021600-bornam1600","blog/2026021600-bornam1600",{"title":22,"path":23,"stem":24},"レガシーの最先端を行く、とは","/blog/2026021700-l-uploader","blog/2026021700-l-uploader",{"title":26,"path":27,"stem":28},"日本ハイスコア協会のデータ集計ページ下調べ","/blog/2026021800-jha","blog/2026021800-jha",{"title":30,"path":31,"stem":32},"メールの話と絵文字リアクションの話","/blog/20260220-mail-chat","blog/20260220-mail-chat",{"title":34,"path":35,"stem":36},"日本ハイスコア協会のデータ集計ページ下調べ②","/blog/2026022200-jha-poc","blog/2026022200-jha-poc",{"title":38,"path":39,"stem":40},"日本ハイスコア協会のデータ集計ページ下調べ③","/blog/2026022300-jha3","blog/2026022300-jha3",{"title":42,"path":43,"stem":44},"パソコンのデータ全部飛んでわろたｗ","/blog/2026022600-wsl-deleted","blog/2026022600-wsl-deleted",{"title":46,"path":47,"stem":48},"人間は自分のボキャブラリーにない表現は理解できない話","/blog/2026030300-metaphor","blog/2026030300-metaphor",{"title":50,"path":51,"stem":52},"超かぐや姫見たので暇だし立川散歩してきた","/blog/2026030800-extreme-princess-kaguya","blog/2026030800-extreme-princess-kaguya",{"title":54,"path":55,"stem":56},"超かぐや姫の小説を読んで限界になりそうになってる人","/blog/2026031200-extreme-princess-kaguya-read-novel","blog/2026031200-extreme-princess-kaguya-read-novel",{"title":58,"path":59,"stem":60},"超かぐや姫を2回見てきた人","/blog/2026031500-extreme-princess-kaguya-2nd","blog/2026031500-extreme-princess-kaguya-2nd",{"title":62,"path":63,"stem":64},"3連休","/blog/2026032300-three-day-holliday","blog/2026032300-three-day-holliday",{"title":66,"path":67,"stem":68},"2連休","/blog/2026040500-two-day-holiday","blog/2026040500-two-day-holiday",{"title":70,"path":71,"stem":72},"レイトン教授ってSteamでできるんかい！！！！！！","/blog/2026041100-professor-layton","blog/2026041100-professor-layton",{"title":74,"path":75,"stem":76},"サイレントセレナに文花帖系作品追加してぇなぁ","/blog/2026041300-silentselene-code-edit","blog/2026041300-silentselene-code-edit",false,{"id":79,"title":74,"author":80,"body":81,"date":521,"description":522,"extension":523,"image":524,"meta":525,"minRead":246,"navigation":387,"path":75,"seo":526,"stem":76,"__hash__":527},"blog/blog/2026041300-silentselene-code-edit.md",null,{"type":82,"value":83,"toc":518},"minimark",[84,88,104,146,160,165,207,216,219,222,484,514],[85,86,87],"h1",{"id":87},"サイレントセレナのコードの解釈をつらつら書く",[89,90,91,98,99,103],"p",{},[92,93,97],"a",{"href":94,"rel":95},"https://github.com/n-rook/thscoreboard/blob/main/project/thscoreboard/thscoreboard/urls.py",[96],"nofollow","thscoreboard/project/thscoreboard/thscoreboard/urls.py"," がエントリポイント。 以下 ",[100,101,102],"code",{},"thscoreboard/project/thscoreboard"," のパスは省略する。",[89,105,106,109,110,115,116,127,128,133,134,139,140,145],{},[100,107,108],{},"/replays"," 配下にアクセスするときは",[92,111,114],{"href":112,"rel":113},"https://github.com/n-rook/thscoreboard/blob/main/project/thscoreboard/replays/urls/replay_urls.py",[96],"replays/urls/replay_urls.py"," にアクセスする.\nこの時ゲーム毎のリプレイページ",[117,118,119],"sup",{},[92,120,126],{"href":121,"ariaDescribedBy":122,"dataFootnoteRef":124,"id":125},"#user-content-fn-example-replay-game",[123],"footnote-label","","user-content-fnref-example-replay-game","1","は ",[92,129,132],{"href":130,"rel":131},"https://github.com/n-rook/thscoreboard/blob/main/project/thscoreboard/replays/views/replay_list.py#L50-L73",[96],"replays/views/replay_list.py"," にてレンダリングされる。\nなおこの時レンダリング元のhtmlは ",[92,135,138],{"href":136,"rel":137},"https://github.com/n-rook/thscoreboard/blob/main/project/thscoreboard/replays/templates/replays/game_scoreboard.html",[96],"replays/templates/replays/game_scoreboard.html"," であり、これは ",[92,141,144],{"href":142,"rel":143},"https://github.com/n-rook/thscoreboard/blob/main/project/thscoreboard/replays/templates/replays/replay_table.html",[96],"replays/templates/replays/replay_table.html"," をインクルードしている。",[89,147,148,149,152,153,152,156,159],{},"ここでレンダリング時に ",[100,150,151],{},"game",", ",[100,154,155],{},"filters",[100,157,158],{},"show_route"," を渡している。",[89,161,162,164],{},[100,163,155],{}," にはボタン選択でフィルタするための要素が渡される。\n文花帖系作品であればレベルとシーンが渡るのであろう。",[89,166,167,169,170,152,173,152,176,152,179,152,182,152,185,188,189,192,193,196,197,199,200,202,203,206],{},[100,168,158],{}," はテーブルの1つのデータにルートを表示するかのbool値である。\n通常であればテーブルには ",[100,171,172],{},"User",[100,174,175],{},"Difficulty",[100,177,178],{},"Shot",[100,180,181],{},"Score",[100,183,184],{},"Upload Date",[100,186,187],{},"Comment"," が表示されるが、これがあれば ",[100,190,191],{},"Route"," が表示されることになる。\n靈異伝, 永夜抄, 妖精大戦争はルートが存在するのでこれを ",[100,194,195],{},"True"," にすることで表示させる。\nもし仮にそれ以外の作品で ",[100,198,195],{}," にしてしまうと空の ",[100,201,191],{}," 列が表示されてしまう。\n文花帖系作品を実装するならデータ列にLevel-Sceneを追加するのが自然であろう。\nつまり ",[100,204,205],{},"show_level_scene"," というbool変数を追加して、これによってテーブルの表示を制御すべきだ。",[89,208,209,210,215],{},"あとは",[92,211,214],{"href":212,"rel":213},"https://github.com/n-rook/thscoreboard/pull/546",[96],"過去の自分の黄昏酒場のプルリクエスト","を見てれば書けると思った。",[89,217,218],{},"追記：",[89,220,221],{},"どこにlevel-sceneの情報を入れるか…",[223,224,228],"pre",{"className":225,"code":226,"language":227,"meta":124,"style":124},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","thscoreboard=# select * from replays_game;\n game_id | has_replays | num_difficulties\n---------+-------------+------------------\n th01    | f           |                4\n th02    | f           |                5\n th03    | f           |                5\n th04    | f           |                5\n th05    | f           |                5\n th06    | t           |                5\n th07    | t           |                6\n th08    | t           |                5\n th09    | t           |                5\n th10    | t           |                5\n th11    | t           |                5\n th12    | t           |                5\n th128   | t           |                5\n th13    | t           |                6\n th14    | t           |                5\n th15    | t           |                5\n th16    | t           |                5\n th17    | t           |                5\n th18    | t           |                5\n th20    | t           |                5\n alco    | t           |                0\n(21 rows)\n\nthscoreboard=# select * from replays_route;\n id | route_id | order_number | game_id\n----+----------+--------------+---------\n  1 | Jigoku   |            0 | th01\n  2 | Makai    |            1 | th01\n  3 | Final A  |            0 | th08\n  4 | Final B  |            1 | th08\n  5 | A-1      |            0 | th128\n  6 | A-2      |            1 | th128\n  7 | B-1      |            2 | th128\n  8 | B-2      |            3 | th128\n  9 | C-1      |            4 | th128\n 10 | C-2      |            5 | th128\n(10 rows)\n\nthscoreboard=#\n","sql",[100,229,230,238,244,250,256,262,268,274,280,286,292,298,304,310,316,322,328,334,340,346,352,358,364,370,376,382,389,395,401,407,413,419,425,431,437,443,449,455,461,467,473,478],{"__ignoreMap":124},[231,232,235],"span",{"class":233,"line":234},"line",1,[231,236,237],{},"thscoreboard=# select * from replays_game;\n",[231,239,241],{"class":233,"line":240},2,[231,242,243],{}," game_id | has_replays | num_difficulties\n",[231,245,247],{"class":233,"line":246},3,[231,248,249],{},"---------+-------------+------------------\n",[231,251,253],{"class":233,"line":252},4,[231,254,255],{}," th01    | f           |                4\n",[231,257,259],{"class":233,"line":258},5,[231,260,261],{}," th02    | f           |                5\n",[231,263,265],{"class":233,"line":264},6,[231,266,267],{}," th03    | f           |                5\n",[231,269,271],{"class":233,"line":270},7,[231,272,273],{}," th04    | f           |                5\n",[231,275,277],{"class":233,"line":276},8,[231,278,279],{}," th05    | f           |                5\n",[231,281,283],{"class":233,"line":282},9,[231,284,285],{}," th06    | t           |                5\n",[231,287,289],{"class":233,"line":288},10,[231,290,291],{}," th07    | t           |                6\n",[231,293,295],{"class":233,"line":294},11,[231,296,297],{}," th08    | t           |                5\n",[231,299,301],{"class":233,"line":300},12,[231,302,303],{}," th09    | t           |                5\n",[231,305,307],{"class":233,"line":306},13,[231,308,309],{}," th10    | t           |                5\n",[231,311,313],{"class":233,"line":312},14,[231,314,315],{}," th11    | t           |                5\n",[231,317,319],{"class":233,"line":318},15,[231,320,321],{}," th12    | t           |                5\n",[231,323,325],{"class":233,"line":324},16,[231,326,327],{}," th128   | t           |                5\n",[231,329,331],{"class":233,"line":330},17,[231,332,333],{}," th13    | t           |                6\n",[231,335,337],{"class":233,"line":336},18,[231,338,339],{}," th14    | t           |                5\n",[231,341,343],{"class":233,"line":342},19,[231,344,345],{}," th15    | t           |                5\n",[231,347,349],{"class":233,"line":348},20,[231,350,351],{}," th16    | t           |                5\n",[231,353,355],{"class":233,"line":354},21,[231,356,357],{}," th17    | t           |                5\n",[231,359,361],{"class":233,"line":360},22,[231,362,363],{}," th18    | t           |                5\n",[231,365,367],{"class":233,"line":366},23,[231,368,369],{}," th20    | t           |                5\n",[231,371,373],{"class":233,"line":372},24,[231,374,375],{}," alco    | t           |                0\n",[231,377,379],{"class":233,"line":378},25,[231,380,381],{},"(21 rows)\n",[231,383,385],{"class":233,"line":384},26,[231,386,388],{"emptyLinePlaceholder":387},true,"\n",[231,390,392],{"class":233,"line":391},27,[231,393,394],{},"thscoreboard=# select * from replays_route;\n",[231,396,398],{"class":233,"line":397},28,[231,399,400],{}," id | route_id | order_number | game_id\n",[231,402,404],{"class":233,"line":403},29,[231,405,406],{},"----+----------+--------------+---------\n",[231,408,410],{"class":233,"line":409},30,[231,411,412],{},"  1 | Jigoku   |            0 | th01\n",[231,414,416],{"class":233,"line":415},31,[231,417,418],{},"  2 | Makai    |            1 | th01\n",[231,420,422],{"class":233,"line":421},32,[231,423,424],{},"  3 | Final A  |            0 | th08\n",[231,426,428],{"class":233,"line":427},33,[231,429,430],{},"  4 | Final B  |            1 | th08\n",[231,432,434],{"class":233,"line":433},34,[231,435,436],{},"  5 | A-1      |            0 | th128\n",[231,438,440],{"class":233,"line":439},35,[231,441,442],{},"  6 | A-2      |            1 | th128\n",[231,444,446],{"class":233,"line":445},36,[231,447,448],{},"  7 | B-1      |            2 | th128\n",[231,450,452],{"class":233,"line":451},37,[231,453,454],{},"  8 | B-2      |            3 | th128\n",[231,456,458],{"class":233,"line":457},38,[231,459,460],{},"  9 | C-1      |            4 | th128\n",[231,462,464],{"class":233,"line":463},39,[231,465,466],{}," 10 | C-2      |            5 | th128\n",[231,468,470],{"class":233,"line":469},40,[231,471,472],{},"(10 rows)\n",[231,474,476],{"class":233,"line":475},41,[231,477,388],{"emptyLinePlaceholder":387},[231,479,481],{"class":233,"line":480},42,[231,482,483],{},"thscoreboard=#\n",[485,486,489,495],"section",{"className":487,"dataFootnotes":124},[488],"footnotes",[490,491,494],"h2",{"className":492,"id":123},[493],"sr-only","Footnotes",[496,497,498],"ol",{},[499,500,502,506,507],"li",{"id":501},"user-content-fn-example-replay-game",[92,503,504],{"href":504,"rel":505},"https://www.silentselene.net/replays/th128",[96]," ",[92,508,513],{"href":509,"ariaLabel":510,"className":511,"dataFootnoteBackref":124},"#user-content-fnref-example-replay-game","Back to reference 1",[512],"data-footnote-backref","↩",[515,516,517],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":124,"searchDepth":240,"depth":240,"links":519},[520],{"id":123,"depth":240,"text":494},"2026-04-13T00:00:00.000Z","コードの理解メモ","md","/blog/default.webp",{},{"title":74,"description":522},"Jzs_aWBEE_u_wM6KjymRv9F3TNybgP0rAr3K41bThSE",[529,80],{"title":70,"path":71,"stem":72,"description":530,"children":-1},"スプラトゥーンたのしい！！！！！！！！！！",1776093485305]