RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    a gamelist.xml cleaner tool

    Scheduled Pinned Locked Moved Ideas and Development
    gamelist.xmlscript
    56 Posts 21 Posters 27.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • theWinterDojerT
      theWinterDojer @meleu
      last edited by

      @meleu I ended up manually going through my SNES folder and deleting the unused images. Took a few days, I'm gonna go ahead and patiently wait for you to do the other ones haha. It's not a space issue or anything, I'm just a perfectionist and don't want any unnecessary files on my machine.

      Thanks for all the other tools, and really no rush. Real life takes precedent to our Pi's :)

      1 Reply Last reply Reply Quote 1
      • KaltinrilK
        Kaltinril
        last edited by

        Going to clone and edit it and then send a pull request.

        You can accept whatever you want, or reject it all :)

        1 Reply Last reply Reply Quote 1
        • KaltinrilK
          Kaltinril
          last edited by

          I've got the -r working. I also added -a for "all" so that I can just type this:
          ./gamelist-cleaner.sh -a -r

          and it cleaned up all folders and replaces the gamelist.xml instead of creating the -clean version.

          https://github.com/kaltinril/share

          I want to do some more testing before I submit a pull request.

          meleuM 1 Reply Last reply Reply Quote 1
          • meleuM
            meleu @Kaltinril
            last edited by

            @kaltinril you can submit a PR and then we can discuss about the code on github. ;-)

            • Useful topics
            • joystick-selection tool
            • rpie-art tool
            • achievements I made
            KaltinrilK 1 Reply Last reply Reply Quote 2
            • KaltinrilK
              Kaltinril @meleu
              last edited by

              @meleu Submitted.

              theWinterDojerT 1 Reply Last reply Reply Quote 2
              • theWinterDojerT
                theWinterDojer @Kaltinril
                last edited by

                @kaltinril

                Is this ready to be used?

                meleuM 1 Reply Last reply Reply Quote 0
                • meleuM
                  meleu @theWinterDojer
                  last edited by

                  @thewinterdojer I didn't tested but I merged his script. You can find it here:
                  https://raw.githubusercontent.com/meleu/share/master/images-cleaner.sh

                  @Kaltinril added a -t option to just test and not actually delete anything. It's a cool feature.

                  • Useful topics
                  • joystick-selection tool
                  • rpie-art tool
                  • achievements I made
                  theWinterDojerT 1 Reply Last reply Reply Quote 1
                  • theWinterDojerT
                    theWinterDojer @meleu
                    last edited by

                    @meleu Awesome. I will give this a try when I get home. Thanks a bunch!

                    1 Reply Last reply Reply Quote 0
                    • theWinterDojerT
                      theWinterDojer
                      last edited by

                      @kaltinril @meleu

                      This worked perfectly, thank you. I deleted 826 images across 6 systems, all duplicates :)

                      1 Reply Last reply Reply Quote 1
                      • xadoxX
                        xadox
                        last edited by

                        The gamelist-cleaner.sh by @Kaltinril seems to be the newer one. Maybe this could be mergeded into the one by @meleu?

                        Is the images-cleaner.sh by @meleu already usable?

                        1 Reply Last reply Reply Quote 0
                        • V
                          Vodkanakas
                          last edited by

                          I an trying to use this to clean up the images of games that i have removed and all i get is errors. the comman im using is

                          ./images-cleaner.sh -t -g /home/pi/RetroPie/roms/nes -i /home/pi/RetroPie/roms/nes/images

                          when it ends all i get is error could not find gamelist for system but i know the gamelist.xml is in that folder and the images are in the images folder.

                          SanoS 1 Reply Last reply Reply Quote 0
                          • SanoS
                            Sano @Vodkanakas
                            last edited by Sano

                            @vodkanakas Are you sure your gamelist files are in /home/pi/RetroPie/roms/nes ?
                            Default is /home/pi/.emulationstation/gamelists/nes (that's the default for the script, too).
                            Edit : BTW if I remember, the script loops through the systems.
                            Have you just tried to launch it with the default folders ? : ./images-cleaner.sh -t

                            V AndersHPA 2 Replies Last reply Reply Quote 0
                            • V
                              Vodkanakas @Sano
                              last edited by Vodkanakas

                              @sano yes seelphs scraper has an option to use the Rom folder for the gamelists and images so that's why I know they are there. It accesses the images folder just not the gamelist.xml

                              Edit: If i try just ./images-cleaner.sh -t i get a no such file or directory

                              1 Reply Last reply Reply Quote 0
                              • AndersHPA
                                AndersHP @Sano
                                last edited by AndersHP

                                I tried running the ./images-cleaner.sh -tcontaining the code that @meleu linked to here, after removing a bunch of roms from different system folders via SSH, but the script didn't report anything to delete.

                                I would suppose it both deleted the redundant artwork as well as cleaning up the gamelist files, right?

                                Does this script not work if roms are placed on USB? Art+gamelists are placed under emulationstation/gamelists and /downloaded_images

                                My "Bubble Bobble" Themed Bartop Arcade
                                My Gameboy

                                meleuM 1 Reply Last reply Reply Quote 0
                                • meleuM
                                  meleu @AndersHP
                                  last edited by

                                  @andershp according to the --help you can specify an arbitrary directory with --images. Try it ;)

                                  • Useful topics
                                  • joystick-selection tool
                                  • rpie-art tool
                                  • achievements I made
                                  AndersHPA 1 Reply Last reply Reply Quote 0
                                  • AndersHPA
                                    AndersHP @meleu
                                    last edited by

                                    @meleu the images are in the default place - it's the ROMs that are on USB..

                                    My "Bubble Bobble" Themed Bartop Arcade
                                    My Gameboy

                                    1 Reply Last reply Reply Quote 0
                                    • greenieG
                                      greenie
                                      last edited by

                                      @meleu I've just been through and cleaned all my gamelist.xml files - congrats for creating such a time-saving tool!

                                      However, I've just noticed that (although it says the entry is removed from the .xml file during processing) any entry with & in the name is not removed from the .xml file.

                                      Is there any way around this?

                                      Cheers.

                                      1 Reply Last reply Reply Quote 0
                                      • greenieG
                                        greenie
                                        last edited by

                                        @meleu That last comment was meant to say "& amp ;" but the post has changed it to "&".

                                        1 Reply Last reply Reply Quote 0
                                        • greenieG
                                          greenie
                                          last edited by

                                          @meleu I've now tried this on several PCs, (including the Windows Subsystem for Linux!) and it's the same result on all of them.

                                          To reproduce...

                                          Download one of the gamelist.xml and downloaded_images files/folders from the this master repository: https://github.com/recalbox/recalbox-gamelists/tree/master/gamelists .

                                          Drop them in your system's ROMS folder. This is based on the no-intro romset, which my collection is based on.

                                          You should now have the gamelist.xml file, downloaded_images folder and ROMs under your ROMS folder (in this example I'm using the NES system).

                                          Run the gamelist-cleaner.sh script after editing the settings to point at your ROMS folder.

                                          The script appears to run perfectly. I can watch the output in Terminal with glee!

                                          But, after inspecting the new xml file, you'll see that entries such as Advanced Dungeons & Dragons - DragonStrike (USA).zip are still present even though, in my case, I don't have the ROM for that game.

                                          Is this a formatting issue? Has anyone else experienced this?

                                          Any advice would be hugely appreciated as this is the last step I need to nail before my system is finished. I'll be editing out the remaining entries in the mean time.

                                          Thanks.

                                          meleuM 1 Reply Last reply Reply Quote 0
                                          • meleuM
                                            meleu @greenie
                                            last edited by

                                            @greenie
                                            Regarding the & char, it's a known issue and I posted about it here. In the linked post you can see a workaround to fix this issue (I agree that it isn't the ideal solution, though).

                                            And thanks for this report. ;-)

                                            • Useful topics
                                            • joystick-selection tool
                                            • rpie-art tool
                                            • achievements I made
                                            greenieG 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                            Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.