Skip to content

Commit

Permalink
Update app
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Dec 24, 2023
0 parents commit 53f09b4
Show file tree
Hide file tree
Showing 13 changed files with 190 additions and 0 deletions.
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
genshin-gacha-export.danmu9.com
Binary file added assets/element-icons.9c88a535.woff
Binary file not shown.
Binary file added assets/element-icons.de5eb258.ttf
Binary file not shown.
1 change: 1 addition & 0 deletions assets/index-legacy.4f60c8ed.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/index.8db8bcb2.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions assets/index.fdad386e.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/polyfills-legacy.7f715cc1.js

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions assets/vendor-legacy.983d698a.js

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions assets/vendor.1bca63b3.js

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions getLink.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
$logLocation = "%userprofile%\AppData\LocalLow\miHoYo\Genshin Impact\output_log.txt";
$logLocationChina = "%userprofile%\AppData\LocalLow\miHoYo\$([char]0x539f)$([char]0x795e)\output_log.txt";

$reg = $args[0]
if ($reg -eq "china") {
Write-Host "Using China cache location"
$logLocation = $logLocationChina
}

$tmps = $env:TEMP + '\pm.ps1';
if ([System.IO.File]::Exists($tmps)) {
ri $tmps
}

$path = [System.Environment]::ExpandEnvironmentVariables($logLocation);
if (-Not [System.IO.File]::Exists($path)) {
Write-Host "Cannot find the log file! Make sure to open the wish history first!" -ForegroundColor Red

if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Host "Do you want to try to run the script as Administrator? Press [ENTER] to continue, or any key to cancel."
$keyInput = [Console]::ReadKey($true).Key
if ($keyInput -ne "13") {
return
}

$myinvocation.mycommand.definition > $tmps

Start-Process powershell -Verb runAs -ArgumentList "-noexit", $tmps, $reg
break
}

return
}

$logs = Get-Content -Path $path
$m = $logs -match "(?m).:/.+(GenshinImpact_Data|YuanShen_Data)"
$m[0] -match "(.:/.+(GenshinImpact_Data|YuanShen_Data))" >$null

if ($matches.Length -eq 0) {
Write-Host "Cannot find the wish history url! Make sure to open the wish history first!" -ForegroundColor Red
return
}

$gamedir = $matches[1]
$cachefile = "$gamedir/webCaches/Cache/Cache_Data/data_2"
$tmpfile = "$env:TEMP/ch_data_2"

Copy-Item $cachefile -Destination $tmpfile

$content = Get-Content -Encoding UTF8 -Raw $tmpfile
$splitted = $content -split "1/0/"
$found = $splitted -match "https.+?game_biz=hk4e.+?&"

$found = $found[$found.Length - 1] -match "(https.+?game_biz=hk4e.+?)&"

Remove-Item $tmpfile

if (-Not $found) {
Write-Host "Cannot find the wish history url! Make sure to open the wish history first!" -ForegroundColor Red
return
}

$wishHistoryUrl = $matches[1]

Write-Host $wishHistoryUrl
Set-Clipboard -Value $wishHistoryUrl
Write-Host "Link copied to clipboard, paste it back to paimon.moe" -ForegroundColor Green
if ($reg -eq "china") {
Write-Host "URL$([char]0x5df2)$([char]0x7ecf)$([char]0x590d)$([char]0x5236)$([char]0x5230)$([char]0x7c98)$([char]0x8d34)$([char]0x677f)"
}
19 changes: 19 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,viewport-fit=cover">
<title>抽卡记录Excel转JSON</title>
<script type="module" crossorigin src="/assets/index.8db8bcb2.js"></script>
<link rel="modulepreload" href="/assets/vendor.1bca63b3.js">
<link rel="stylesheet" href="/assets/index.fdad386e.css">
</head>
<body>
<div id="app"></div>


<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
<script nomodule src="/assets/polyfills-legacy.7f715cc1.js"></script>
<script nomodule id="vite-legacy-entry" data-src="/assets/index-legacy.4f60c8ed.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body>
</html>
Binary file added update/16e42.zip
Binary file not shown.
1 change: 1 addition & 0 deletions update/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"active":true,"version":"0.9.10","from":"0.1.5","name":"16e42.zip","hash":"599787316e42d3f433853dc064419af348f76da05b20e881703974f24e45fb3c"}

0 comments on commit 53f09b4

Please sign in to comment.