Compare commits

...

2 Commits

Author SHA1 Message Date
d99af2cc26 chore: bump version to v1.0.2 2024-07-20 19:25:15 +08:00
681e664e32 feat: check url from cache
1. NEVER MODIFY THE `yarn.lock` YOU GET. YOU NEVER KNOW WHAT IT CRASHES
2. FUCK REGEX
2024-07-20 19:24:01 +08:00
3 changed files with 1819 additions and 1665 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "zzz-signal-search-export", "name": "zzz-signal-search-export",
"version": "1.0.1", "version": "1.0.2",
"main": "./dist/electron/main/main.js", "main": "./dist/electron/main/main.js",
"author": "earthjasonlin <https://git.loliquq.cn/earthjasonlin>", "author": "earthjasonlin <https://git.loliquq.cn/earthjasonlin>",
"homepage": "https://github.com/earthjasonlin/zzz-signal-search-export", "homepage": "https://github.com/earthjasonlin/zzz-signal-search-export",

View File

@ -139,7 +139,19 @@ const readLog = async () => {
const promises = logPaths.map(async logpath => { const promises = logPaths.map(async logpath => {
const logText = await fs.readFile(logpath, 'utf8') const logText = await fs.readFile(logpath, 'utf8')
const url = logText.match(/https:\/\/.*?\/info/g) const url = logText.match(/https:\/\/.*?\/info/g)
return getLatestUrl(url) if (url) {
return getLatestUrl(url)
}
const gamePathMch = logText.match(/([A-Z]:\/.*?\/)(?=ZenlessZoneZero_Data)/i)
if (gamePathMch) {
const[cacheText, cacheFile] = await getCacheText("F:/zzz_game/ZenlessZoneZero_Data") /* getCacheText(gamePathMch[0]+"/ZenlessZoneZero_Data") */
const urlMch = cacheText.match(/https.+?authkey=.+?end_id=/g)
if (urlMch) {
cacheFolder = cacheFile.replace(/Cache_Data[/\\]data_2$/, '')
return getLatestUrl(urlMch)
}
}
}) })
const result = await Promise.all(promises) const result = await Promise.all(promises)
for (let url of result) { for (let url of result) {

3468
yarn.lock

File diff suppressed because it is too large Load Diff