修复tcg的一些判断

This commit is contained in:
辉鸭蛋
2025-01-12 21:15:23 +08:00
parent 3837203f84
commit 6daf942530
2 changed files with 2548 additions and 2390 deletions

View File

@@ -113,7 +113,7 @@ function extractInfoFromTCGFile(filePath, parentFolder) {
const content = fs.readFileSync(filePath, 'utf8');
const authorMatch = content.match(/\/\/\s*作者:(.*)/);
const descriptionMatch = content.match(/\/\/\s*描述:(.*)/);
const characterMatches = content.match(/角色\d+=([^|\r\n{]+)/g);
const characterMatches = content.match(/角色\d+\s?=([^|\r\n{]+)/g);
let tags = characterMatches
? characterMatches.map(match => match.split('=')[1].trim())
@@ -123,6 +123,9 @@ function extractInfoFromTCGFile(filePath, parentFolder) {
if (filePath.includes('惊喜牌组')) {
tags = ['惊喜牌组', ...tags];
}
if (filePath.includes('酒馆挑战')) {
tags = ['酒馆挑战', ...tags];
}
return {
author: authorMatch ? authorMatch[1].trim() : '',

4933
repo.json

File diff suppressed because it is too large Load Diff