MCPcopy
hub / github.com/Adpro-Team/GKD_THS_List / writeUrlListMd

Function writeUrlListMd

scripts/writeFile.ts:31–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29};
30
31export const writeUrlListMd = async() => {
32 let list = ``;
33 List.forEach((a)=>{
34 list += `# ${a.name}\r`;
35 const subUrls = a.subUrls;
36 subUrls.forEach((b)=>{
37 let index = 1;
38 const urlName = (b.hasOwnProperty('name') ? `${a.name}-${b.name}` : `${a.name}-订阅链接${String(index)}`) + (b.defaultUpdateUrl ? '(内置的更新链接)' : '');
39 list += `## ${urlName}\r`;
40 list += `\`\`\`text\r${b.importUrl}\r\`\`\`\r`;
41 index++;
42 });
43 });
44 await fs.writeFile(process.cwd() + '/importUrlsList.md', list);
45}

Callers 1

update.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected