곡 제목 특수문자(' &) 깨짐 수정: 멜론 차트가 16진수 엔티티를 못 풀고 norabose는 아예 안 풀던 것 → decodeEntities 한 곳에서(차트 파싱·카탈로그 저장), 이미 저장된 곡·차트 기록은 cli fix-text로 복구(키 다시 계산, 원곡 찾기 다시 시도, 깨진 키로 생긴 중복은 오래된 곡으로 합치기). 곡 합치기가 차트 기록도 옮기도록

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-19 22:27:10 +09:00
parent 0c0b822adc
commit 127513db63
6 changed files with 148 additions and 12 deletions

View File

@@ -7,6 +7,7 @@
* bun apps/server/src/collector/cli.ts melon-detail [--limit N]
* bun apps/server/src/collector/cli.ts heatmap [--limit N]
* bun apps/server/src/collector/cli.ts levels
* bun apps/server/src/collector/cli.ts fix-text (one-off: decode `&#x27;`/`&amp;` saved in titles, let 원곡 찾기 retry them)
* bun apps/server/src/collector/cli.ts stats
* In the container: docker exec music_quiz-app-1 bun apps/server/src/collector/cli.ts …
*/
@@ -21,6 +22,7 @@ import { currentJob } from './catalog';
import { collectCharts, fillMelonDetails } from './charts';
import { collectHeatmaps } from './heatmap';
import { computeLevels } from './levels';
import { fixEntities } from './text';
const [cmd, ...rest] = process.argv.slice(2);
const flag = (name: string) => {
@@ -65,11 +67,14 @@ switch (cmd) {
case 'levels':
console.log(computeLevels(db));
break;
case 'fix-text':
console.log(JSON.stringify(fixEntities(db), null, 1));
break;
case 'stats':
console.log(JSON.stringify(catalogStats(db), null, 1));
break;
default:
console.log('usage: cli.ts import-norabose|import-sta|match-youtube|charts|melon-detail|heatmap|levels|stats');
console.log('usage: cli.ts import-norabose|import-sta|match-youtube|charts|melon-detail|heatmap|levels|fix-text|stats');
process.exitCode = 1;
}
db.close();