Refactor compile novels script and make the game to use custom one for 7s chapter 3

This commit is contained in:
Sakura Knoll
2024-11-30 17:44:30 +09:00 Unverified
parent 2d22b1c42c
commit b8170d3df4
4 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -15,7 +15,7 @@
"type": "0", "type": "0",
"start_time": "2019-02-20 20:56:31", "start_time": "2019-02-20 20:56:31",
"end_time": "2035-01-01 00:00:00", "end_time": "2035-01-01 00:00:00",
"xml_url": "https://uploadstatic.mihoyo.com/galgame/novel/23e7ea709b675b2840e0747d0d2fa44d4c0e0d9c/chapters/fc580e9caf5ef641b27aeb2fb641290d33524778.xml", "xml_url": "/novels/7s/ko-KR/xml/compiled-8.xml",
"parts": [ "parts": [
{ {
"part_id": "51", "part_id": "51",
+3 -1
View File
@@ -1,3 +1,5 @@
import { compileNovel } from './lib/7slib' import { compileNovel } from './lib/7slib'
compileNovel('en-US') const chapters = [4, 6, 7, 11]
compileNovel('en-US', chapters)
+3 -2
View File
@@ -1,4 +1,5 @@
import { compileNovel } from './lib/7slib' import { compileNovel } from './lib/7slib'
compileNovel('en-US') const chapters = [4, 6, 7, 8, 11]
compileNovel('ko-KR')
compileNovel('ko-KR', chapters)
+1 -3
View File
@@ -1,9 +1,7 @@
import fs from 'fs' import fs from 'fs'
import path from 'path' import path from 'path'
const chapters = [4, 6, 7, 11] export function compileNovel(locale: string, chapters: number[]) {
export function compileNovel(locale: string) {
const xmlDirPath = path.join( const xmlDirPath = path.join(
__dirname, __dirname,
`../../../public/novels/7s/${locale}/xml` `../../../public/novels/7s/${locale}/xml`