mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-07 06:18:03 +03:00
Merge branch 'develop'
This commit is contained in:
@@ -14762,12 +14762,12 @@
|
||||
{
|
||||
"data": {
|
||||
"levelNum": {
|
||||
"~gt": 1,
|
||||
"~lt": 9
|
||||
"~gte": 1,
|
||||
"~lte": 9
|
||||
},
|
||||
"versions": "peace"
|
||||
},
|
||||
"folderID": "Fef02823f752087ba553563dc0cba7dc2e14cfa38cf657098f2e7b354ee1886f6",
|
||||
"folderID": "F0eba4509733294349b3d9140e943f33c80cc545050a61f87b62ebd9980916f0a",
|
||||
"game": "popn",
|
||||
"inactive": false,
|
||||
"playtype": "9B",
|
||||
@@ -14791,12 +14791,12 @@
|
||||
{
|
||||
"data": {
|
||||
"levelNum": {
|
||||
"~gt": 10,
|
||||
"~lt": 19
|
||||
"~gte": 10,
|
||||
"~lte": 19
|
||||
},
|
||||
"versions": "peace"
|
||||
},
|
||||
"folderID": "F50d7a723770801693c15d2584cce3cbf8d1494127626ef6edcc3b4a37e604ad3",
|
||||
"folderID": "Fa30199d64c0e5c0962bd1a341a0da7c44a923e893d2746eb2d0d996cb1586c7b",
|
||||
"game": "popn",
|
||||
"inactive": false,
|
||||
"playtype": "9B",
|
||||
@@ -14950,12 +14950,12 @@
|
||||
{
|
||||
"data": {
|
||||
"levelNum": {
|
||||
"~gt": 20,
|
||||
"~lt": 29
|
||||
"~gte": 20,
|
||||
"~lte": 29
|
||||
},
|
||||
"versions": "peace"
|
||||
},
|
||||
"folderID": "F1c6fe86afeaaec12bb9f43eed2527b52aa113a51009450e1ce50a0f6f32b5f2f",
|
||||
"folderID": "Fb429c7dd6ccb37a4fdab99947c9af2532ac08342bd17acfd2e62898be2488310",
|
||||
"game": "popn",
|
||||
"inactive": false,
|
||||
"playtype": "9B",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1835,9 +1835,9 @@
|
||||
{
|
||||
"description": "All pop'n peace levels, with some folders joined together.",
|
||||
"folders": [
|
||||
"Fef02823f752087ba553563dc0cba7dc2e14cfa38cf657098f2e7b354ee1886f6",
|
||||
"F50d7a723770801693c15d2584cce3cbf8d1494127626ef6edcc3b4a37e604ad3",
|
||||
"F1c6fe86afeaaec12bb9f43eed2527b52aa113a51009450e1ce50a0f6f32b5f2f",
|
||||
"F0eba4509733294349b3d9140e943f33c80cc545050a61f87b62ebd9980916f0a",
|
||||
"Fa30199d64c0e5c0962bd1a341a0da7c44a923e893d2746eb2d0d996cb1586c7b",
|
||||
"Fb429c7dd6ccb37a4fdab99947c9af2532ac08342bd17acfd2e62898be2488310",
|
||||
"F3c5715f6595048ac14d54980b10ba9cb0ed43ca6c42e3b81c5ec7ad647309a9d",
|
||||
"F66c687a6be070e65ca7bd4cec04d41a90cbda979b560fdd2384c3f5286d8b736",
|
||||
"Fdf1271c9394a91419295534351babe28aaf609dfc98521511848df6271412d9a",
|
||||
|
||||
@@ -5,8 +5,11 @@ const { Command } = require("commander");
|
||||
const { CreateChartID } = require("../util");
|
||||
const path = require("path");
|
||||
const { decode } = require("html-entities");
|
||||
const logger = require("../logger");
|
||||
|
||||
const program = new Command();
|
||||
|
||||
// https://github.com/shimmand/waccaSupportTools/blob/main/analyzePlayData/chartsTable.csv
|
||||
program
|
||||
.option("-f, --file <wacca.csv>")
|
||||
|
||||
@@ -41,6 +44,13 @@ for (const record of dirtyRecords.slice(1)) {
|
||||
dataMap.set(record[0].replace(/”|“/g, '"').replace(/’/g, "'"), record);
|
||||
}
|
||||
|
||||
const STARTS = {
|
||||
s: Date.parse("2020-1-22"),
|
||||
lily: Date.parse("2020-9-17"),
|
||||
lilyr: Date.parse("2021-3-11"),
|
||||
reverse: Date.parse("2021-8-10"),
|
||||
};
|
||||
|
||||
|
||||
(async () => {
|
||||
const datum = await fetch("https://wacca.marv.jp/music/search.php", {
|
||||
@@ -57,8 +67,6 @@ for (const record of dirtyRecords.slice(1)) {
|
||||
let songID = 1;
|
||||
|
||||
for (const data of datum) {
|
||||
console.log(data);
|
||||
|
||||
let prettiedTitle = decode(data.title.display.replace(/ /g, " ")).trim();
|
||||
|
||||
// This song got its title changed.
|
||||
@@ -67,6 +75,32 @@ for (const record of dirtyRecords.slice(1)) {
|
||||
prettiedTitle = "13 Donkeys";
|
||||
}
|
||||
|
||||
let time = Date.parse(data.release_date);
|
||||
let ver;
|
||||
|
||||
if (time < STARTS.s) {
|
||||
ver = "wacca";
|
||||
} else if (time < STARTS.lily) {
|
||||
ver = "s";
|
||||
} else if (time < STARTS.lilyr) {
|
||||
ver = "lily";
|
||||
} else if (time < STARTS.reverse) {
|
||||
ver = "lilyr";
|
||||
} else {
|
||||
ver = "reverse";
|
||||
}
|
||||
|
||||
logger.verbose(`Parsed as ${ver}.`);
|
||||
|
||||
// re-screw "'s to their shift-jis equivalent, because it seems like decoding
|
||||
// " is locale specific. Thanks.
|
||||
const record = dataMap.get(prettiedTitle);
|
||||
|
||||
if (!record) {
|
||||
logger.warn(`Can't find record with title ${prettiedTitle}. Dumping potentially similar titles.\n${[...dataMap.keys()].filter(e => e.startsWith(prettiedTitle[0])).join("\n")}`);
|
||||
continue;
|
||||
}
|
||||
|
||||
songs.push({
|
||||
id: songID,
|
||||
title: prettiedTitle,
|
||||
@@ -77,18 +111,10 @@ for (const record of dirtyRecords.slice(1)) {
|
||||
titleJP: data.title.ruby,
|
||||
artistJP: data.artist.ruby,
|
||||
genre: data.category,
|
||||
displayVersion: null
|
||||
displayVersion: ver
|
||||
}
|
||||
});
|
||||
|
||||
// re-screw "'s to their shift-jis equivalent, because it seems like decoding
|
||||
// " is locale specific. Thanks.
|
||||
const record = dataMap.get(prettiedTitle);
|
||||
|
||||
if (!record) {
|
||||
throw new Error(`Can't find record with title ${prettiedTitle}. Dumping.\n${[...dataMap.keys()].filter(e => e.startsWith(prettiedTitle[0])).join("\n")}`);
|
||||
}
|
||||
|
||||
for (let i = 0; i < 4; i++) {
|
||||
let diff = record[1 + i * 3];
|
||||
let [diffName, level] = diff.split(" ");
|
||||
|
||||
Reference in New Issue
Block a user