summaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorFushihara <1039534+fushihara@users.noreply.github.com>2024-09-28 19:47:44 +0900
committerFushihara <1039534+fushihara@users.noreply.github.com>2024-09-28 19:47:44 +0900
commit1d52b28e394983a8346e0ccb7ec1ed6b54dd6918 (patch)
tree2fec61d82326a9b69a74b44347a7e0de40c6d2ec /src/app
parent0acca62436a3521c67b3be423b07a57f9e829def (diff)
アニメまとめのリンクを追加
Diffstat (limited to 'src/app')
-rw-r--r--src/app/_components/archiveLinkElement.tsx9
-rw-r--r--src/app/_components/navigationHeader.tsx3
-rw-r--r--src/app/anime/matome/page.tsx78
-rw-r--r--src/app/iframe/page.tsx2
-rw-r--r--src/app/page.tsx4
5 files changed, 93 insertions, 3 deletions
diff --git a/src/app/_components/archiveLinkElement.tsx b/src/app/_components/archiveLinkElement.tsx
index d97d904..94daed5 100644
--- a/src/app/_components/archiveLinkElement.tsx
+++ b/src/app/_components/archiveLinkElement.tsx
@@ -19,8 +19,12 @@ type AnimeReviewItem = {
animeId: number,
reviewId: number,
};
+type AnimeMatome = {
+ type: "AnimeMatome",
+ matomeId: string,
+};
type Common = { showLinkUnderline?: boolean }
-type Option = (ArticlePage | AnimeTop | AnimeReviewList | AnimeReviewItem) & Common;
+type Option = (ArticlePage | AnimeTop | AnimeReviewList | AnimeReviewItem | AnimeMatome) & Common;
export function ArciveLinkElement(option: Option) {
const officialLinkTitle = `公式のakiba-souken.com へのリンク。閉鎖後は繋がらなくなるはず`;
const iaSearchResultLinkTitle = `InternetArchive の検索結果へのリンク`;
@@ -53,6 +57,9 @@ export function ArciveLinkElement(option: Option) {
} else if (option.type == "AnimeReviewItem") {
originalUrl = `https://akiba-souken.com/anime/${option.animeId}/review/${option.reviewId}`;
iframeSrc = `anime-${option.animeId}-review-${option.reviewId}`;
+ } else if (option.type == "AnimeMatome") {
+ originalUrl = `https://akiba-souken.com/anime/matome/${option.matomeId}/`;
+ iframeSrc = `anime-matome-${option.matomeId}`;
} else {
throw new Error();
}
diff --git a/src/app/_components/navigationHeader.tsx b/src/app/_components/navigationHeader.tsx
index 20cee95..7c4f4f3 100644
--- a/src/app/_components/navigationHeader.tsx
+++ b/src/app/_components/navigationHeader.tsx
@@ -24,6 +24,9 @@ export function NavigationHeader() {
<li>
<Link href={"/anime/all"}>アニメ一覧</Link>
</li>
+ <li>
+ <Link href={"/anime/matome"}>アニメまとめ</Link>
+ </li>
</ul>
</div>
</div>
diff --git a/src/app/anime/matome/page.tsx b/src/app/anime/matome/page.tsx
new file mode 100644
index 0000000..5437707
--- /dev/null
+++ b/src/app/anime/matome/page.tsx
@@ -0,0 +1,78 @@
+import dateformat from "dateformat";
+import { AnimeLoader, AnimeLoaderData } from "../../../util/animeLoader";
+import { ArciveLinkElement } from "../../_components/archiveLinkElement";
+dateformat.i18n.dayNames = [
+ '日', '月', '火', '水', '木', '金', '土',
+ '日曜日', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日'
+];
+type PageType = {
+ searchParams: Record<string, string>,
+ params: { animeId: string, }
+}
+export async function generateMetadata(context: PageType) {
+ const loadedData = await AnimeLoader.instance.loadData().then(d => {
+ const r = d.find(a => a.animeId == Number(context.params.animeId))!;
+ return r;
+ });
+ return {
+ title: `アキバ総研アーカイブ:アニメまとめ`,
+ }
+}
+export default async function Page(context: PageType) {
+ const className = "flex gap-4";
+ return (
+ <div className="p-8 pb-20 gap-16 sm:p-20">
+ <ul>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "anison", showLinkUnderline: true, })}:アニソンまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "kami_anime", showLinkUnderline: true, })}:神アニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "akuyaku", showLinkUnderline: true, })}:悪役令嬢アニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "tsukkomi", showLinkUnderline: true, })}:ツッコミアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "binge_watching", showLinkUnderline: true, })}:一気見アニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "youjo", showLinkUnderline: true, })}:幼女アニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "kuso", showLinkUnderline: true, })}:クソアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "emo", showLinkUnderline: true, })}:エモいアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "work", showLinkUnderline: true, })}:お仕事アニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "80s", showLinkUnderline: true, })}:懐かしいアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "adventure", showLinkUnderline: true, })}:冒険ファンタジーアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "journey", showLinkUnderline: true, })}:旅アニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "sexy", showLinkUnderline: true, })}:セクシーアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "isekai", showLinkUnderline: true, })}:異世界アニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "renai", showLinkUnderline: true, })}:恋愛アニメ(マンガ原作)まとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "seisyun", showLinkUnderline: true, })}:青春アニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "stronghero", showLinkUnderline: true, })}:主人公最強アニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "battle", showLinkUnderline: true, })}:バトルアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "90s", showLinkUnderline: true, })}:90年代アニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "harem", showLinkUnderline: true, })}:ハーレムアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "gag", showLinkUnderline: true, })}:ギャグアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "nakeru", showLinkUnderline: true, })}:泣けるアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "guro", showLinkUnderline: true, })}:グロアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "horror", showLinkUnderline: true, })}:ホラーアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "utu", showLinkUnderline: true, })}:鬱アニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "eiga", showLinkUnderline: true, })}:アニメ映画まとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "yuri", showLinkUnderline: true, })}:百合アニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "bl", showLinkUnderline: true, })}:BLアニメ(ボーイズラブ)まとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "otome", showLinkUnderline: true, })}:乙女アニメ(ゲーム原作)まとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "otona", showLinkUnderline: true, })}:大人向けアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "nichijou", showLinkUnderline: true, })}:日常系アニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "lightnovel", showLinkUnderline: true, })}:ラノベアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "moe", showLinkUnderline: true, })}:萌えアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "short", showLinkUnderline: true, })}:ショートアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "imouto", showLinkUnderline: true, })}:妹アニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "dark", showLinkUnderline: true, })}:ダークファンタジーアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "ikemen", showLinkUnderline: true, })}:イケメンアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "timeleap", showLinkUnderline: true, })}:タイムリープアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "zombie", showLinkUnderline: true, })}:ゾンビアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "key", showLinkUnderline: true, })}:Keyアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "survival", showLinkUnderline: true, })}:サバイバルアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "gourmet", showLinkUnderline: true, })}:グルメアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "tsundere", showLinkUnderline: true, })}:ツンデレアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "future", showLinkUnderline: true, })}:近未来アニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "esp", showLinkUnderline: true, })}:超能力アニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "idol", showLinkUnderline: true, })}:アイドルアニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "yokai", showLinkUnderline: true, })}:妖怪アニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "sengoku", showLinkUnderline: true, })}:戦国時代アニメまとめ</li>
+ <li className={className}>{ArciveLinkElement({ type: "AnimeMatome", matomeId: "musical", showLinkUnderline: true, })}:ミュージカルアニメまとめ</li>
+ </ul>
+ </div>
+ );
+}
diff --git a/src/app/iframe/page.tsx b/src/app/iframe/page.tsx
index e26e921..985671a 100644
--- a/src/app/iframe/page.tsx
+++ b/src/app/iframe/page.tsx
@@ -47,6 +47,8 @@ function parseParam(paramString: string) {
return `https://akiba-souken.com/anime/${m[1]}/review/?page=${m[2]}`;
} else if (m = paramString.match(/^anime-(\d+)-review-(\d+)$/)) {
return `https://akiba-souken.com/anime/${m[1]}/review/${m[2]}/`;
+ } else if (m = paramString.match(/^anime-matome-(.+?)$/)) {
+ return `https://akiba-souken.com/anime/matome/${m[1]}/`;
}
return null;
}
diff --git a/src/app/page.tsx b/src/app/page.tsx
index 58a7429..2ca4873 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -21,10 +21,10 @@ export default function Home() {
https://github.com/fushihara/akiba-souken-archive<br />
このサイトの記事一覧などが欲しい場合は、スクレイピングをするより上記レポジトリからファイルを落としたほうが早いです。<br />
スクレイピングに使ったツール一式は以下の通りです。こちらのスクリプトはdenoを使っています。DLしたhtmlをsqliteに保存して、同じ内容で複数アクセスが起きないように工夫しています。<br />
- xxxxx
+ https://github.com/fushihara/akiba-souken-crawler
<p />
このアーカイブサイトは閉鎖決定時点の全てのコンテンツを網羅している訳ではありません。<br />
- 通常のarticle形式以外の、投票( https://akiba-souken.com/vote/ )やアニメまとめ( https://akiba-souken.com/anime/matome/ )、アニメランキング( https://akiba-souken.com/anime/ranking/ )は抜けています。<br />
+ 通常のarticle形式以外の、投票( https://akiba-souken.com/vote/ )、アニメランキング( https://akiba-souken.com/anime/ranking/ )は抜けています。<br />
</div>
);
}