Re: software per recuperare la lista giochi di Teknoparrot
Inviato: 02/12/2022, 12:06
Il Forum di riferimento italiano per gli appassionati di Cabinati Arcade
https://www.arcadeitalia.net/
la versione (sul lato sx) è la 1.0.0.3 ?
quando riavvii l'app (naturalmente la textbox è vuota) ma se premi i punti per selezionare una dir lui ha automaticamente settato la precedente quindi devi solo confermare
Ciao Puccipucci ha scritto: ↑01/12/2022, 16:51grazie @Emu!Emu ha scritto: ↑22/11/2022, 1:02 Ciao Pucci
Negli ultimi anni ho latitato il forum per motivi personali, ma sperando di non fare un torto a Gothrek ho buttato giù uno script PowerShell che fa i check che hai chiesto, e volendo scarica pure le icone mancanti.
Per eseguirlo devi salvarlo come file di testo ed estensione .PS1, poi modifichi il path del tuo TecnoParrot e dovrrsti essere a posto. In alto ci sono alcune variabili che puoi modificare
[removed]
Spero ti possa essere utile.
Per questo genere di attività preferisco degli script, perchè si possono modificare al volo in caso di qualche aggiornamento, e ti puoi fare script nuovi per esigenze analoghe tra diversi emulatori.
Emu
ci sarebbero alcune cose da perfezionare:
1) andrebbe aggiunta un ultima colonna con il nome "breve" del gioco (in pratica è il nome del file che viene letto), la colonna dovrebbe avere come titolo "FileName"
2) sembra esserci un problema con la colonna "HasIcon" perchè viene impostata a "No" su alcuni giochi che in realtà l'icona ce l'hanno, precisamente questi
GameName IconName
Akai Katana Shin for NESiCAxLive Icons\AkaiKatakanaShinNesica.png
Baseball Heroes 2 Icons\BaseballHeroes.png
Battle Climaxx! Icons\BattleClimax.png
Big Buck Hunter Pro Home Icons\BBHHome.png
Guilty Gear Xrd REV2 Icons\GGXrdREV2.png
Guilty Gear Xrd REV2 (APM3) Icons\GGXrdREV2.png
Harikiri Baseball Icons\Harikiri.png
Horse Riders 2 Icons\HorseRiders.png
Hot Wheels Icons\HotWheels.png
Infinity Blade FX Icons\InfinityBlade.png
Koihime Enbu Icons\KoihimeEnbu.png
Spiderman Icons\Spiderman.png
Super Street Fighter IV: Arcade Edition Icons\StreetFighterIVArcadeEdition.png
Super Street Fighter IV: Arcade Edition (Export) Icons\StreetFighterIVArcadeEditionEXP.png
Under Night In-Birth Exe:Late[st] Icons\UnderNightInBirthLatest.png
Codice: Seleziona tutto
#############################################################################
### VARIABILI PERSONALIZZABILI ###
#############################################################################
# Specificare di seguito la directory dove si trova TP, terminando la stringa con "\"
$TeknoParrotFolder = "E:\Emulator\Arcade\TeknoParrot\"
# Per abilitare/disabilitare l'esportazione su CSV
$ExportCSV = $true
# Nome file CSV di Export, creato nella directory di TecnoParrot
$CSVExportFile = "GamesList.csv"
# Delimitatore usato nell'esportazione in CSV
$CSVDelim = ";"
# Per abilitare il download delle icone mancanti
$DownloadMissingIcons = $true
#############################################################################
### COSTANTI - NON TOCCARE ###
#############################################################################
# Estensione dei files delle icone
$IconExtension = "png"
# Questo è l'URL base per scaricarsi le icone, se si abilita il download
$IconsBaseURL = "https://raw.githubusercontent.com/teknogods/TeknoParrotUIThumbnails/master/Icons/"
#############################################################################
### MAIN ###
#############################################################################
# Leggo i files XML dei GamesProfiles
Write-Host "Lettura files XML dei GamesProfiles in" $($TeknoParrotFolder + "GameProfiles\") -ForegroundColor Cyan
$GamesProfiles = Get-ChildItem $($TeknoParrotFolder + "GameProfiles\*.xml")
# Creo l'array vuoto di giochi
$Games = @()
# Processo tutti i files della directory GamesProfiles
Write-Host "Processo i files XML dei GamesProfiles..." -ForegroundColor Cyan
foreach ($GameProfile in $GamesProfiles){
# Leggo il file XML
[xml]$GP = Get-Content $GameProfile.PSPath
# Controllo se esiste il file JSON corrispondente al file XML del GP
$DescriptionFilePath = $TeknoParrotFolder + "Descriptions\" + $GameProfile.BaseName + ".json"
if (Test-Path $DescriptionFilePath){
# Leggo il file JSON corrispondente al file XML del GP
$Json = Get-Content $DescriptionFilePath
$Description = $JSON | ConvertFrom-Json
} else {
Write-Host ""
Write-Host "ATTENZIONE: File $DescriptionFilePath non presente!" -ForegroundColor Yellow
$Description = @{
platform = ""
release_year = ""
nvidia = ""
nvidia_issues = ""
amd = ""
amd_issues = ""
intel = ""
intel_issues = ""
general_issues = ""
}
}
# Verifico se c'è il file con l'icona
if ($GP.GameProfile.IconName.Length -gt 1){
#$IconFilePath = $TeknoParrotFolder + "Icons\" + $GameProfile.BaseName + "." + $IconExtension
$IconFilePath = $TeknoParrotFolder + $GP.GameProfile.IconName
if (Test-Path $IconFilePath){
$HasIcon = "Yes"
} else {
$HasIcon = "No"
if ($DownloadMissingIcons){
$IconName = $GP.GameProfile.IconName.Replace("Icons\","")
Write-Host
Write-Host "Download icona mancante $IconName" -ForegroundColor Magenta
$IconURL = $IconsBaseURL + $IconName
try {
$resp = Invoke-WebRequest -Uri $IconURL -UseBasicParsing -OutFile $IconFilePath
}
catch {
if( $_.Exception.Response.StatusCode.Value__ -eq 200 ) {
#Write-Host "Download OK!"-ForegroundColor Green
} elseif( $_.Exception.Response.StatusCode.Value__ -eq 404 ) {
Write-Host "ERRORE: File non presente all'URL $IconURL"-ForegroundColor Yellow
} else {
Write-Host "WARNING: Errore download file da verificare manualmente" -ForegroundColor Red
}
}
if (Test-Path $IconFilePath){
$HasIcon = "Yes"
}
}
}
}
# Estraggo i campi interessanti e me li salvo in un nuovo oggetto
$Game = [PSCustomObject][ordered]@{
FileName = $GameProfile.BaseName
GameName = $GP.GameProfile.GameName
GameGenre = $GP.GameProfile.GameGenre
IconName = $GP.GameProfile.IconName
EmulationProfile = $GP.GameProfile.EmulationProfile
GameProfileRevision = $GP.GameProfile.GameProfileRevision
Is64Bit = $GP.GameProfile.Is64Bit
EmulatorType = $GP.GameProfile.EmulatorType
DevOnly = $GP.GameProfile.DevOnly
Patreon = $GP.GameProfile.Patreon
ExecutableName = $GP.GameProfile.ExecutableName
ExecutableName2 = $GP.GameProfile.ExecutableName2
HasTwoExecutables = $GP.GameProfile.HasTwoExecutables
platform = $Description.platform
release_year = $Description.release_year
nvidia = $Description.nvidia
nvidia_issues = $Description.nvidia_issues
amd = $Description.amd
amd_issues = $Description.amd_issues
intel = $Description.intel
intel_issues = $Description.intel_issues
general_issues = $Description.general_issues
HasIcon = $HasIcon
}
# Aggiungo il record appena creato all'array
$Games += $Game
Write-Host "." -NoNewline
}
Write-Host
Write-Host
# Mostro i giochi a schermo
$Games | Out-GridView
# Esporto su CSV
if ($ExportCSV){
Write-Host "Esportazione elenco giochi in" $($TeknoParrotFolder + $CSVExportFile) -ForegroundColor Cyan
$Games | Export-Csv $($TeknoParrotFolder + $CSVExportFile) -Delimiter $CSVDelim -NoTypeInformation
}
Ciao GothrekGothrek ha scritto: ↑01/12/2022, 22:42diopadre..mi evitavo un paio d'ore di codicepucci ha scritto: ↑01/12/2022, 16:51grazie @Emu!Emu ha scritto: ↑22/11/2022, 1:02 Ciao Pucci
Negli ultimi anni ho latitato il forum per motivi personali, ma sperando di non fare un torto a Gothrek ho buttato giù uno script PowerShell che fa i check che hai chiesto, e volendo scarica pure le icone mancanti.
Per eseguirlo devi salvarlo come file di testo ed estensione .PS1, poi modifichi il path del tuo TecnoParrot e dovrrsti essere a posto. In alto ci sono alcune variabili che puoi modificare
Check-TeknoParrot-Resources.ps1:Spero ti possa essere utile.Codice: Seleziona tutto
############################################################################# ### VARIABILI PERSONALIZZABILI ### ############################################################################# # Specificare di seguito la directory dove si trova TP, terminando la stringa con "\" $TeknoParrotFolder = "E:\Emulator\Arcade\TeknoParrot\" # Per abilitare/disabilitare l'esportazione su CSV $ExportCSV = $true # Nome file CSV di Export, creato nella directory di TecnoParrot $CSVExportFile = "GamesList.csv" # Delimitatore usato nell'esportazione in CSV $CSVDelim = ";" # Per abilitare il download delle icone mancanti $DownloadMissingIcons = $false ############################################################################# ### COSTANTI - NON TOCCARE ### ############################################################################# # Estensione dei files delle icone $IconExtension = "png" # Questo è l'URL base per scaricarsi le icone, se si abilita il download $IconsBaseURL = "https://raw.githubusercontent.com/teknogods/TeknoParrotUIThumbnails/master/Icons/" ############################################################################# ### MAIN ### ############################################################################# # Leggo i files XML dei GamesProfiles Write-Host "Lettura files XML dei GamesProfiles in" $($TeknoParrotFolder + "GameProfiles\") -ForegroundColor Cyan $GamesProfiles = Get-ChildItem $($TeknoParrotFolder + "GameProfiles\*.xml") # Creo l'array vuoto di giochi $Games = @() # Processo tutti i files della directory GamesProfiles Write-Host "Processo i files XML dei GamesProfiles..." -ForegroundColor Cyan foreach ($GameProfile in $GamesProfiles){ # Leggo il file XML [xml]$GP = Get-Content $GameProfile.PSPath # Controllo se esiste il file JSON corrispondente al file XML del GP $DescriptionFilePath = $TeknoParrotFolder + "Descriptions\" + $GameProfile.BaseName + ".json" if (Test-Path $DescriptionFilePath){ # Leggo il file JSON corrispondente al file XML del GP $Json = Get-Content $DescriptionFilePath $Description = $JSON | ConvertFrom-Json } else { Write-Host "" Write-Host "ATTENZIONE: File $DescriptionFilePath non presente!" -ForegroundColor Yellow $Description = @{ platform = "" release_year = "" nvidia = "" nvidia_issues = "" amd = "" amd_issues = "" intel = "" intel_issues = "" general_issues = "" } } # Verifico se c'è il file con l'icona if ($GP.GameProfile.IconName.Length -gt 1){ #$IconFilePath = $TeknoParrotFolder + "Icons\" + $GameProfile.BaseName + "." + $IconExtension $IconFilePath = $TeknoParrotFolder + $GP.GameProfile.IconName if (Test-Path $IconFilePath){ $HasIcon = "Yes" } else { $HasIcon = "No" if ($DownloadMissingIcons){ $IconName = $GP.GameProfile.IconName.Replace("Icons\","") Write-Host Write-Host "Download icona mancante $IconName" -ForegroundColor Magenta $IconURL = $IconsBaseURL + $IconName try { $resp = Invoke-WebRequest -Uri $IconURL -UseBasicParsing -OutFile $IconFilePath } catch { if( $_.Exception.Response.StatusCode.Value__ -eq 200 ) { #Write-Host "Download OK!"-ForegroundColor Green } elseif( $_.Exception.Response.StatusCode.Value__ -eq 404 ) { Write-Host "ERRORE: File non presente all'URL $IconURL"-ForegroundColor Yellow } else { Write-Host "WARNING: Errore download file da verificare manualmente" -ForegroundColor Red } } if (Test-Path $IconFilePath){ $HasIcon = "Yes" } } } } # Estraggo i campi interessanti e me li salvo in un nuovo oggetto $Game = [PSCustomObject][ordered]@{ GameName = $GP.GameProfile.GameName GameGenre = $GP.GameProfile.GameGenre IconName = $GP.GameProfile.IconName EmulationProfile = $GP.GameProfile.EmulationProfile GameProfileRevision = $GP.GameProfile.GameProfileRevision Is64Bit = $GP.GameProfile.Is64Bit EmulatorType = $GP.GameProfile.EmulatorType DevOnly = $GP.GameProfile.DevOnly Patreon = $GP.GameProfile.Patreon ExecutableName = $GP.GameProfile.ExecutableName ExecutableName2 = $GP.GameProfile.ExecutableName2 HasTwoExecutables = $GP.GameProfile.HasTwoExecutables platform = $Description.platform release_year = $Description.release_year nvidia = $Description.nvidia nvidia_issues = $Description.nvidia_issues amd = $Description.amd amd_issues = $Description.amd_issues intel = $Description.intel intel_issues = $Description.intel_issues general_issues = $Description.general_issues HasIcon = $HasIcon } # Aggiungo il record appena creato all'array $Games += $Game Write-Host "." -NoNewline } Write-Host Write-Host # Mostro i giochi a schermo $Games | Out-GridView # Esporto su CSV if ($ExportCSV){ Write-Host "Esportazione elenco giochi in" $($TeknoParrotFolder + $CSVExportFile) -ForegroundColor Cyan $Games | Export-Csv $($TeknoParrotFolder + $CSVExportFile) -Delimiter $CSVDelim -NoTypeInformation }
Per questo genere di attività preferisco degli script, perchè si possono modificare al volo in caso di qualche aggiornamento, e ti puoi fare script nuovi per esigenze analoghe tra diversi emulatori.
Emu
ci sarebbero alcune cose da perfezionare:
1) andrebbe aggiunta un ultima colonna con il nome "breve" del gioco (in pratica è il nome del file che viene letto), la colonna dovrebbe avere come titolo "FileName"
2) sembra esserci un problema con la colonna "HasIcon" perchè viene impostata a "No" su alcuni giochi che in realtà l'icona ce l'hanno, precisamente questi
GameName IconName
Akai Katana Shin for NESiCAxLive Icons\AkaiKatakanaShinNesica.png
Baseball Heroes 2 Icons\BaseballHeroes.png
Battle Climaxx! Icons\BattleClimax.png
Big Buck Hunter Pro Home Icons\BBHHome.png
Guilty Gear Xrd REV2 Icons\GGXrdREV2.png
Guilty Gear Xrd REV2 (APM3) Icons\GGXrdREV2.png
Harikiri Baseball Icons\Harikiri.png
Horse Riders 2 Icons\HorseRiders.png
Hot Wheels Icons\HotWheels.png
Infinity Blade FX Icons\InfinityBlade.png
Koihime Enbu Icons\KoihimeEnbu.png
Spiderman Icons\Spiderman.png
Super Street Fighter IV: Arcade Edition Icons\StreetFighterIVArcadeEdition.png
Super Street Fighter IV: Arcade Edition (Export) Icons\StreetFighterIVArcadeEditionEXP.png
Under Night In-Birth Exe:Late[st] Icons\UnderNightInBirthLatest.png
np
scusa l'ignoranza, ma siti di scraping tipo screenscraper piuttosto che adb non hanno info su questi giochi?