Jump to content
LaunchBox Community Forums

Klopjero

Members
  • Posts

    777
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by Klopjero

  1. I've been updating a bit. Also written a GUI for it. When you click "where is teknoParrot button" a browse window will open after that you can either Sort by platform or just Sort gun games, when it's done it will out put this folder structure each sorted game is stored in its seperate folder which will simplify scraping. I do have an issue though with my XAML. it will only find images of my UI if I use absolute paths. and I can't get it to accept relative paths. I would really appreciate the help MainWindow.xaml <Window x:Class="System.Windows.Window" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:Teknoparrot_Platform_Importer_ui" Title="TP Sorting tool" Height="475" Width="815"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition/> </Grid.ColumnDefinitions> <Canvas> <Canvas.Background> <ImageBrush ImageSource="F:\Tools\powershell\TP_GUI\imag1.jpg" Opacity="0.4"/> </Canvas.Background> <Image Height="100" UseLayoutRounding="False" Source="F:\Tools\powershell\TP_GUI\imag2.png" Canvas.Left="1" Width="799"/> <Button Name="Browse" Content="Where is TeknoParrot?" Canvas.Left="10" Canvas.Top="329" Width="780" HorizontalAlignment="Center" VerticalAlignment="Top"/> <Button Name="Sort" Content="Sort by platform" Canvas.Left="10" Canvas.Top="354" Width="780" HorizontalAlignment="Center" VerticalAlignment="Top"/> <Button Name="Guns" Content="Sort just the gun games" Canvas.Left="10" Canvas.Top="379" Width="780" HorizontalAlignment="Center" VerticalAlignment="Top"/> <Button Name="Imports" Content="Go to sorting foler" Canvas.Left="570" Canvas.Top="404" HorizontalAlignment="Left" VerticalAlignment="Center" Width="144"/> <Button Name="Exit" Content="Exit" Canvas.Left="718" Canvas.Top="404" HorizontalAlignment="Left" VerticalAlignment="Center" Width="72"/> </Canvas> </Grid> </Window> and my new Powershell script # Author klopjero #Teknoparrot, game Sorting by platform script for use with launchbox # The function of this script is to allow the user to scan for games that are set up in teknoparrot, sort them into platformsso that they can be added to Launchbox. # import the results using folder names. #load assembly files for file browser # Load the XAML file Add-Type -AssemblyName PresentationFramework $invocation = (Get-Variable MyInvocation).Value $directorypath = Split-Path $invocation.MyCommand.Path #$settingspath1 = $directorypath + '\img\imag1.jpg' #$settingspath2 = $directorypath + '\img\imag2.png' -replace "\","/" $Teknoparrot = $null # Initialize the variable in the outer scope Function Get-teknopparrot { #get teknoparrot location Add-Type -AssemblyName System.Windows.Forms $FolderBrowser = New-Object System.Windows.Forms.FolderBrowserDialog $FolderBrowser.Description = 'Select the folder containing TeknoParrotUI.exe' $result = $FolderBrowser.ShowDialog((New-Object System.Windows.Forms.Form -Property @{TopMost = $true })) if ($result -eq [Windows.Forms.DialogResult]::OK) { $FolderBrowser.SelectedPath } $global:Teknoparrot = $FolderBrowser.SelectedPath } $global:Teknoparrot = $FolderBrowser.SelectedPath Function Sort-Teknoparrot { #Check if TeknoparrotUI.exe lives in $Teknoparrot $found = Test-path $Teknoparrot\TeknoparrotUI.exe IF($found = $true) { $imports = Test-Path "$Teknoparrot\imports" IF($imports -eq $false) { new-item -ItemType Directory "$Teknoparrot\imports" } #get your setup games, including platform and full game name $TPSetgames = Get-ChildItem $Teknoparrot\userprofiles\*.xml | select-object -ExpandProperty BaseName foreach ($TPSetgame in $TPSetgames) { $TPSetgame [xml]$XML = Get-Content $Teknoparrot\GameProfiles\$TPSetgame.xml $gamenameraw = $xml.gameprofile.gamename #clean nasty unwanted characters from game name to allow for folder creation $gamename = $gamenameraw -replace ":","" $json = Get-content $Teknoparrot\descriptions\$TPSetgame.json -raw |ConvertFrom-Json $platform = $json.platform $Tp2pt = test-path $Teknoparrot\imports\$platform\ IF ($Tp2pt -eq $false) { write-host creating new folder $Teknoparrot\imports\$platform\$gamename\$TPSetgame.xml New-Item -ItemType Directory $Teknoparrot\imports\$platform -force New-Item -itemType Directory $Teknoparrot\imports\$platform\$gamename -Force New-Item -ItemType File $Teknoparrot\imports\$platform\$gamename\$TPSetgame.xml -Force } write-host creating new folder $Teknoparrot\imports\$platform\$gamename\$TPSetgame.xml New-Item -itemType Directory $Teknoparrot\imports\$platform\$gamename -Force New-Item -ItemType File $Teknoparrot\imports\$platform\$gamename\$TPSetgame.xml -force } } } Function gun-teknoparrot { #$Teknoparrot = $FolderBrowser.SelectedPath #Check if TeknoparrotUI.exe lives in $Teknoparrot $found = Test-path $Teknoparrot\TeknoparrotUI.exe IF($found = $true) { $imports = Test-Path "$Teknoparrot\imports" IF($imports -eq $false) { new-item -ItemType Directory "$Teknoparrot\imports" } #get your setup games, including platform and full game name $TPSetgames = Get-ChildItem $Teknoparrot\UserProfiles\*.xml | select-object -ExpandProperty BaseName foreach ($TPSetgame in $TPSetgames) { $TPSetgame [xml]$XML = Get-Content $Teknoparrot\GameProfiles\$TPSetgame.xml $gamenameraw = $xml.gameprofile.gamename $GameGenre = $xml.gameprofile.GameGenre #clean nasty unwanted characters from game name to allow for folder creation $gamename = $gamenameraw -replace ":","" $json = Get-content $Teknoparrot\descriptions\$TPSetgame.json -raw |ConvertFrom-Json $platform = $json.platform $Tp2pt = test-path $Teknoparrot\imports\$platform\ IF ($GameGenre -eq "shooter") { write-host creating new folder $Teknoparrot\imports\GunGames\$gamename New-Item -itemType Directory $Teknoparrot\imports\GunGames\$gamename -Force New-Item -ItemType File $Teknoparrot\imports\GunGames\$gamename\$TPSetgame.xml -Force } } } } Function import-teknoparrot { #open imports folder. Invoke-Item $Teknoparrot\imports } $XAMLPath = Join-Path -Path $PSScriptRoot -ChildPath "mainwindow.xaml" # Assuming the XAML file is in the same directory as the script [xml]$xaml = Get-Content $XAMLPath # Add WPF and WindowsBase assemblies Add-Type -AssemblyName PresentationCore, PresentationFramework # Create a XAML reader $reader = (New-Object System.Xml.XmlNodeReader $xaml) # Load the XAML $mainWindow = [Windows.Markup.XamlReader]::Load($reader) # Define variables for the buttons in the XAML $BrowseButton = $mainWindow.FindName("Browse") $SortButton = $mainWindow.FindName("Sort") $GunsButton = $mainWindow.FindName("Guns") $ImportsButton = $mainWindow.FindName("Imports") $ExitButton = $mainWindow.FindName("Exit") # Function to handle button actions Function Handle-BrowseButtonClick { # Add your code to handle the Browse button click event here Get-teknopparrot } Function Handle-SortButtonClick { # Add your code to handle the Sort button click event here Sort-Teknoparrot } Function Handle-GunsButtonClick { # Add your code to handle the Guns button click event here gun-teknoparrot } Function Handle-ImportsButtonClick { # Add your code to handle the Imports button click event here import-teknoparrot } Function Handle-ExitButtonClick { # Add your code to handle the Exit button click event here $mainWindow.Close() } # Wire up button click events $BrowseButton.Add_Click({ Handle-BrowseButtonClick }) $SortButton.Add_Click({ Handle-SortButtonClick }) $GunsButton.Add_Click({ Handle-GunsButtonClick }) $ImportsButton.Add_Click({ Handle-ImportsButtonClick }) $ExitButton.Add_Click({ Handle-ExitButtonClick }) # Show the window $mainWindow.ShowDialog()
  2. Interesting. I'll have a look. I had made a, at the moment, primitive powershell script that sort of does the same. My powershell script sorts the setup games per platform. so its a drag and drop affair after the storting is done. I will try your plugin
  3. This looks interessant. I will have a look this evening
  4. Greetings, Sorting through the various platforms that are supported in Teknoparrot can be quite a chore. I've written a script, that will plow through the games you have setup and sort them by platform so you can just drag and drop them into launchbox. known issue: - game titles with : in string wil not create folder (WIP) (fixed) - (script updated) # Author klopjero #Teknoparrot, game Sorting by platform script for use with launchbox # The function of this script is to allow the user to scan for games that are set up in teknoparrot, sort them into platformsso that they can be added to Launchbox. # import the results using folder names. #load assembly fiels for file browser Add-Type -AssemblyName System.Windows.Forms #variables #get teknoparrot location Add-Type -AssemblyName System.Windows.Forms $FolderBrowser = New-Object System.Windows.Forms.FolderBrowserDialog $FolderBrowser.Description = 'Select the folder containing TeknoParrotUI.exe' $result = $FolderBrowser.ShowDialog((New-Object System.Windows.Forms.Form -Property @{TopMost = $true })) if ($result -eq [Windows.Forms.DialogResult]::OK){ $FolderBrowser.SelectedPath } else { exit } $Teknoparrot = $FolderBrowser.SelectedPath $Teknoparrot #Check if TeknoparrotUI.exe lives in $Teknoparrot $found = Test-path $Teknoparrot\TeknoparrotUI.exe IF($found = $true) { Write-Host TheBird is alive matey!, plunderin yer games now, ship ahoy! $imports = Test-Path "$Teknoparrot\imports" IF($imports -eq $false) { new-item -ItemType Directory "$Teknoparrot\imports" } #get your setup games, including platform and full game name $TPSetgames = Get-ChildItem $Teknoparrot\gameProfiles\*.xml | select-object -ExpandProperty BaseName foreach ($TPSetgame in $TPSetgames) { $TPSetgame [xml]$XML = Get-Content $Teknoparrot\GameProfiles\$TPSetgame.xml $gamenameraw = $xml.gameprofile.gamename #clean nasty unwanted characters from game name to allow for folder creation $gamename = $gamenameraw -replace ":","" $json = Get-content $Teknoparrot\descriptions\$TPSetgame.json -raw |ConvertFrom-Json $platform = $json.platform $Tp2pt = test-path $Teknoparrot\imports\$platform\ IF ($Tp2pt -eq $false) { write-host creating new folder $Teknoparrot\imports\$platform\$gamename\$TPSetgame.xml New-Item -ItemType Directory $Teknoparrot\imports\$platform -force New-Item -itemType Directory $Teknoparrot\imports\$platform\$gamename -Force New-Item -ItemType File $Teknoparrot\imports\$platform\$gamename\$TPSetgame.xml -Force } write-host creating new folder $Teknoparrot\imports\$platform\$gamename\$TPSetgame.xml New-Item -itemType Directory $Teknoparrot\imports\$platform\$gamename -Force New-Item -ItemType File $Teknoparrot\imports\$platform\$gamename\$TPSetgame.xml -force } #open imports folder. Invoke-Item $Teknoparrot\imports } teknoparrotfinder.ps1anyway, hope you find it usefull. any feedback would be nice.
  5. Ye man, I saw that. Thank you for your effort. Great job
  6. nice, only these are: a bit lo-res it's the Japanese region only not cut out?
  7. could you cut out these please ?
  8. It seems awfully arbitrary, geographically these countries lie in europe so it would follow that they fall into that region. Australia should fall in the other section, unless ofcourse its a misspelling of austria.
  9. Why are netherlands and greece in the other category and not in europe?
  10. download section has been updates
  11. Theme videos for the legend of Zelda View File These are Theme videos That I thought would make a nice addition to @Suhrvivor's set. These are the ones I've made so far. List of games: 1. Zelda no Densetsu - The Hyrule Fantasy 2. Link no Bouken - The Legend of Zelda 2 3. BS Zelda no Densetsu Kodai no Sekiban 1 4. Legend of Zelda - Tears of the kingdom be sure to check out Suhrvivors set here: What other themes to expect in the future: Zelda - Wand of Gamelon Link - the faces of evil Zelda's adventure Hyrule warriors Hyrule warriors Legends Hyrule warriors Definitive edition the legend of Zelda 64 - ocarina of time : master quest Submitter Klopjero Submitted 04/23/2023 Category Playlists & Playlist Media  
  12. Version 1.1.0

    167 downloads

    These are Theme videos That I thought would make a nice addition to @Suhrvivor's set. These are the ones I've made so far. List of games: 1. Zelda no Densetsu - The Hyrule Fantasy 2. Link no Bouken - The Legend of Zelda 2 3. BS Zelda no Densetsu Kodai no Sekiban 1 4. Legend of Zelda - Tears of the kingdom 5. Link's Crossbow Training 6. Hyrule warriors Legends be sure to check out Suhrvivors set here: What other themes to expect in the future: Zelda - Wand of Gamelon Link - the faces of evil Zelda's adventure Hyrule warriors Hyrule warriors Definitive edition the legend of Zelda 64 - ocarina of time : master quest Tingle's Balloon Fight DS Ripened Tingle's Balloon Trip of Love Freshly-Picked: Tingle's Rosy Rupeeland
  13. @Suhrvivor were you planning on perhaps revisiting this collection? Perhaps create themes for the cd-i titles? Regionise the legend of zelda and adventure of link with the japanese logo? For the famicom and damicom disk system. These themes look so great on my cabinet. Thank you again. If not i understand but maybe you could share your work method on a DM to maybe?
  14. These look great buddy, wel done
  15. It looks crisp, well done
  16. @viking How have ya been ? Post Lockdown workspace pressure consuming your time ? on this side of the ocean it does, managers think that by ordering everyone back to the office they can somehow work away the supposed slack of the past 2 and half years, combine that with budget constraints and reorganization of the IT department and well.. it's a blast. anyway I've just strapped this together, I thought it be nice.. what do you think ? 307436609_SNKNeoGeoX.mp4 2004290996_valvesteamdeck.mp4
  17. If you browse to the colorful theme folder you Find a media folder and im the media folder you will find a folder called hardware images... place these images in that folder
  18. hi folks, havent been to active lately, anyway thank you all for your appreciations and your requests. I'm not done with all of em.. please accept these in the mean while
  19. Well done
×
×
  • Create New...