MCPcopy
hub / github.com/MisterBooo/LeetCodeAnimation / buildManifest

Function buildManifest

tools/scripts/sync-algomooc-index.js:109–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107}
108
109function buildManifest() {
110 const dirs = problemDirs();
111 return readProblems(sourceFile)
112 .filter((item) => /^lc\d+$/.test(item.pid) && Number.isInteger(item.num))
113 .sort((a, b) => a.num - b.num)
114 .map((item) => {
115 const repoPath = findRepoPath(item.num, dirs);
116 return {
117 leetcodeId: item.num,
118 sourcePid: item.pid,
119 slug: item.slug,
120 titleZh: item.title,
121 difficulty: difficulty(item.diff),
122 categoryZh: item.cat,
123 topicsZh: topics(item.cat),
124 status: "site-animation",
125 repoPath,
126 gifPath: findFirstGif(repoPath),
127 siteUrl: `${siteBase}/${item.slug}`,
128 };
129 });
130}
131
132function renderProblemIndex(items) {
133 const rows = items.map((item) => {

Callers 1

Calls 6

problemDirsFunction · 0.85
findRepoPathFunction · 0.85
topicsFunction · 0.85
findFirstGifFunction · 0.85
readProblemsFunction · 0.70
difficultyFunction · 0.70

Tested by

no test coverage detected