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

    Making premade gamelist.xml with xtra media collections

    Scheduled Pinned Locked Moved Ideas and Development
    gamelist.xmlpremade scrapeeasy config
    448 Posts 16 Posters 150.7k 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.
    • Used2BeRXU
      Used2BeRX @meleu
      last edited by

      @meleu I had a Linux question for you Meleu.

      I think what I want to do would be much easier in Linux than in Notepad++

      In re-doing all of the synopsis entries, I have been using the / character to separate the genre types, if more than one, in an individual game. Just the other day though, I thought using that character might cause errors in the gamelist.xml (I'm not sure about that). But even if it doesn't, I think I'd rather use the | character instead for separating the genres since it looks better. (Not sure if that would cause any errors either).

      So...... Two questions, actually. Would / or | cause any problems in the gamelist.xml file?

      And, is there a command or simple script I can run that would only change the / to | in instances where / is located in the Genre: line?

      For example, changing any instances of the following:

      Genre: Arcade / Action / Platform

      To:

      Genre: Arcade | Action | Platform

      Thanks!

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

        @used2berx hey bro. The tool to do this magic is sed. I know it isn't the most intuitive tool, but I'm sure that it's the perfect tool to do the kind of work you do.

        Oh! Here are the magic words you need:

        sed -i '/^Genre:/ s#/#|#g' file.txt
        

        If you want to apply this to all your .txt files you can use *.txt rather than file.txt.

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

          @Used2BeRX I think I'll have some free time to play with bash code in the next couple of days. Can you update your "wishlist"?

          Here is the last one I've found in a post above, and I think I already implemented many of those things:

          1. Create the backup folder if it doesn't exist, and backup any gamelist.xml file before creating a new one if one of the append options isn't used on an exisiting gamelist.

          Done in this commit.

          1. Make option to change which artwork tag is set as <image> so you can switch between Box Front, Cart, Titles, Action and 3D Boxarts types after the gamelists are already made.

          This item still is in the ToDo list. :)

          1. Platform: Nintendo Entertainment System and Platform: Famicom Disk System entries in the synopsis.txt files located in /Media/nes/Synopsis/ folder will treat these entries as if they were NES and not FDS games and look for roms and all media in the /nes/ folders instead.

          Done in this commit.

          1. Add <marquee> tag to both regular and FULL operations, looking for the media in /Media/[System]/Marquee/ folders. (Search for both .JPG and .PNG).

          Done in this commit.

          IIRC another thing you asked was to remove any line with only an URL in the description. It's in the ToDo list also. EDIT: Done in this commit.

          If you have more to request, add comments here:
          https://github.com/meleu/Used2BeTXT/issues/1

          I can't assure I will do them, but from time to time I like spend my free time with coding rather than playing videogames. :D

          • Useful topics
          • joystick-selection tool
          • rpie-art tool
          • achievements I made
          Used2BeRXU 4 Replies Last reply Reply Quote 0
          • Used2BeRXU
            Used2BeRX @meleu
            last edited by

            @meleu Thanks for the command above :)

            I'm going to probably be trying that out by sometime next week. I'll be sure to do it on a backup set of files just so I don't mess anything up. I bet there is a lot of other cool stuff that I can do with that command that can really help me in the future as well. Notepad++ can actually do a fairly decent job of bulk "find and replace", but it's still too limited for what I want to do and I remembered you said something about this command before.

            I should have some time in the next 2 days to sit down and figure out what I want to do and update my wishlist. I know you hit a lot of the important things there, but there's so many posts on this thread now and so much time has gone by while I was doing other things that I don't even remember what all I wanted to see happen.

            The only thing I would add to what you put above was an extension of Numbers 2 and 4 above:

            1. Make option to change which artwork tag is set as <image> so you can switch between Box Front, Cart, Titles, Action and 3D Boxarts types after the gamelists are already made.
            1. Add <marquee> tag to both regular and FULL operations, looking for the media in /Media/[System]/Marquee/ folders. (Search for both .JPG and .PNG).

            If you've already done both of these, it would be sweet to be able to do the same thing we did to the <image> tag in number 2, to the <marquee> tag in number 4.

            Currently, we are able to display two images per game since the introduction of the <marquee> tag. This doesn't necessarily have to be a Marquee image though.

            If we are able to quickly change which type of images we want to see on the fly with your script, this would open up a lot of different options. Maybe somebody would like to display an image of the Box and the Cart? Maybe somebody else would like to display the Box and a title shot? Or the Box and an action shot?

            Personally, I'm probably going to go with two setups, one for the Pi Zero and one for the Pi3. Because I'll have videos that will work with the Pi3, it would be nice to also have a Box and Cart image for all of the games with it. But the videos won't work on the Pi Zero, so it would be nice to have either the Box and the Title or the Box and the Action shot.

            Thanks so much man. I'll get an updated wishlist to you if there was anything else missing and I'll add them all to the link you sent me. :)

            1 Reply Last reply Reply Quote 0
            • Used2BeRXU
              Used2BeRX @meleu
              last edited by Used2BeRX

              @meleu Hey bud :)

              I believe I've found everything I requested before that you haven't put in there and everything that I can currently think of at the moment. I might have more to add to the wishlist after I finally get to running this thing again and kicking the tires a bit, but for now I've added the stuff to the wishlist page you provided. I've bookmarked it too so I can put the stuff up there and we could keep track of it. I should probably at some point add all of the things you've already done there so we can have a list of everything the script is capable of.

              I put everything in my order of personal importance. I'll post them again here for ya now too. Please let me know if you have any questions about anything I'm requesting, and if you want me to re-word or simplify any of it on your checklist page.

              HUGE THANKS AGAIN!!!

              This is going to be awesome. :)

              Synopsis script wishlist:

              1. Platform: Nintendo Entertainment System and Platform: Famicom Disk System entries in the synopsis.txt files located in /Media/nes/Synopsis/ folder will treat these entries as if they were NES and not FDS games and look for roms and all media in the /nes/ folders instead. (This should not occur if the synopsis, media and roms are located in the /Media/fds/ directory though).

              2. Make option to change which artwork tag is set as <marquee> so you can switch between Box Front, Cart, Titles, Action and 3D Boxarts types after the gamelists are already made. (Same as what I believe you already did for the <image> tag). This way we can easily change what type of image displays for two image types after the gamelist.xml is created.

              I'm going to add "dummy" *.jpg files in the Marquee folder since I don't actually have any marquee images, unless you have a better solution for this. I think right now the script just wouldn't create <marquee> tags at all, so this request wouldn't actually do anything unless the original run of the script created those lines in the gamelist.xml

              1. Add the following fields to the Full option:
              • Translation Release Year:
              • Translated By:
              • Hack Release Year:
              • Hacked By:
              • Original Title:
              • Alternate Title:

              These aren't always used in every synopsis, so it should only create these in the entries that have them in the synopsis.txt file

              1. Use the Players: field in the synopsis.txt files to create two tags in the gamelist.xml. The first would be our standard <players> tag that uses your code to only show the maximum amount of players in the game, but also a <players-full> tag that would show the text string that I put on that line. Personally I prefer the way that we've displayed that on the XBox and I'm hoping that if this is built on my end I might one day be able to get somebody here to add that possible tag to the setup here. I know it wouldn't be usable for anything right now. Maybe we could just throw that in the "full" option and leave it out when we don't use that.

              2. gamelist.xml to synopsis.txt reverse-order feature.

              1 Reply Last reply Reply Quote 0
              • Used2BeRXU
                Used2BeRX
                last edited by Used2BeRX

                Oh.... BTW....

                I've been in the middle of re-writing the synopsis files so they work better with RetroPie. (Not only because of memory constraints, but nobody wants to read a slowly scrolling novel for a game description either). You've probably read that I'm doing anything necessary to reduce the file size for each game to only 1kb or less. Sometimes, this requires me to re-word some of the descriptions, but I'm taking extra care to make them still be great descriptions for each game.

                The original file size for all NES synopsis files was somewhere around 3.40MB for only 1,700 or so games. Right now, the file size is 1.79MB for 2,020 games and shrinking. :)

                Can't wait to see what this all looks like after re-running your script when the edits are done!

                Used2BeRXU 1 Reply Last reply Reply Quote 0
                • Used2BeRXU
                  Used2BeRX @Used2BeRX
                  last edited by

                  @used2berx Well I finally got through the rewrites, and the file size is now 1.57MB. So even though there is 300-400+ more games than used to be in the collection, the file size of the gamelist.xml is going to be about 2.1MB less than it used to be.

                  1 Reply Last reply Reply Quote 0
                  • Used2BeRXU
                    Used2BeRX @meleu
                    last edited by Used2BeRX

                    @meleu Hey man.

                    I've begun my testing on the Pi Zero for the NES games, and so far so good with that. 100% of them play even on a Pi Zero with at least one of the 3 emulators. (Default being quicknes of course.... and only about 100 of the US Licensed games. I'm assuming I'm going to run into a lot of problems when we start getting into hacks, translations, pirates, etc.).

                    Before I go to bed, I'm going to re-run the script with all the new synopsis files with the FULL command and see what happens with the script as is. I'll let you know if anything that we think should be working has any problems.

                    I haven't re-sized a lot of the artwork for new games or anything yet, so it's going to be a very incomplete gamelist.xml for now. I'm just re-running it at this point for testing purposes as well as "fixing" the names of all of the rom entries to display the full name instead of just the rom-file names.

                    I'll let you know how it goes hopefully in a few days. :)

                    1 Reply Last reply Reply Quote 1
                    • Used2BeRXU
                      Used2BeRX @meleu
                      last edited by

                      @meleu Hey man. If you wouldn't mind, could you update this page to have all of the current commands and features in the script?

                      https://github.com/meleu/Used2BeTXT/blob/master/README.md

                      I have some questions about how things work and I'm seeing some odd behaviors that I wasn't expecting, but I'm not sure if I'm just not using the program right and I don't want to bother you with them yet. I'm specifically speaking about the backup process and if a script should be overwritten, appended, or written from scratch.

                      I know you might have that in the --help command, but I don't want to break the program now to check at the moment. Was hoping if it's in the help, you could just copy and paste that to the readme file.

                      Thanks :)

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

                        @used2berx the README has been updated.

                        • Useful topics
                        • joystick-selection tool
                        • rpie-art tool
                        • achievements I made
                        Used2BeRXU 4 Replies Last reply Reply Quote 1
                        • Used2BeRXU
                          Used2BeRX @meleu
                          last edited by

                          @meleu Thanks. I should have some time this weekend to kick the tires a bit. Don't know how much time I'll have before then though, but if I figure anything out I'll let you know.

                          1 Reply Last reply Reply Quote 0
                          • Used2BeRXU
                            Used2BeRX @meleu
                            last edited by

                            @meleu Hey bud,

                            I was wondering if it is possible to not make tags if the media/field isn't available for the game? I wanted to ask you before I put it on the wishlist.

                            I was really surprised after running a FULL command that we had a 3.00MB file. Granted there were 300-400 more games this time around, I spent a lot of time paring the individual game synopsis files to 1kb or under and ended up with a total file size of around 1.6MB, so I was shocked to see we're still at 3.00MB for the NES gamelist.xml. (But then I did remember that we've got a LOT of long file names/paths on each entry that weren't in the synopsis).

                            I know it probably doesn't sound like we'd shave much off of that size by eliminating empty tags, but remember that at least for the NES, there are over 2,020 games included, as well as around 30 folders.

                            Maybe this won't be an issue when I finally get a Pi3, but it seems like having massive gamelist.xml files impacts performance on the Pi Zero. Fortunately, there aren't any problems so far with just this NES gamelist, but if I were to have FULL gamelists for all of the systems one day, I'm thinking they wouldn't run on the Pi Zero at all.

                            Also, removing the website address at the bottom of each entry should clear up some space too. :)

                            1 Reply Last reply Reply Quote 0
                            • Used2BeRXU
                              Used2BeRX @meleu
                              last edited by

                              @meleu Sorting by Genre in RetroPie is pretty awesome man. It's going to help me fine-tune the final genres for the sets. I actually had no idea how many different ones I was using until I tried this feature out. There's so many combinations of them. (198!)

                              At least with this feature I can see if there are any that I put in a different order on two separate games, or if I called it something slightly different.

                              For example, VS Fighter / VS Fighting, Board Game / Board Games, Card Game / Card Games.

                              lol... just noticed I have "Actoin / Platformer". Might have a few misspellings in there. :)

                              Well... scrolling through them, I think I should be able to eliminate 30 of the genres pretty easily. 15-20 of them were probably going to be gone by next re-run of the script anyhow after my Pi testing since I've been heavily editing the Genre and Players fields as I've been going through the testing process.

                              BTW... I've tested over half of the NES games on the Pi Zero so far, and the results are really good. Getting into the more obscure territory right now, but we're still rocking over 99% compatibility. :)

                              1 Reply Last reply Reply Quote 1
                              • Used2BeRXU
                                Used2BeRX
                                last edited by Used2BeRX

                                @meleu Hey Meleu,

                                Is there a command I could run that would create an output text file for me that has every different line used in the Genre: line of all of the synopsis.txt files? (Only once though, I don't need to see all 300 times that "Action / Platformer" shows up.)

                                It's helpful to have that information to scroll through on the RetroPie screen, but I'd like to actually look at a text file of it so I can "sort" some things and better re-name the Genre fields that way.

                                I thought you'd know a quicker way to do this than me typing all of them out looking at my TV screen. :)

                                mituM 1 Reply Last reply Reply Quote 0
                                • mituM
                                  mitu Global Moderator @Used2BeRX
                                  last edited by mitu

                                  @used2berx Assuming your files are all .txt in a single folder, execute the following command from within that folder:

                                  for i in *.txt; do sed -ne '/Genre:/ s/Genre:\(\s\)//p' "$i"  >> /tmp/genres.txt; done
                                  

                                  to get all Genres in a single /tmp/genres.txt. To sort and eliminate duplicates, execute:

                                  cat /tmp/genres.txt | sort | unix > sorted.txt
                                  

                                  and the sorted.txt file should have a sorted and no-duplicate list of all the genres.

                                  EDIT: corrected the for loop, it always looked inside 1 file.

                                  Used2BeRXU 1 Reply Last reply Reply Quote 1
                                  • Used2BeRXU
                                    Used2BeRX @mitu
                                    last edited by

                                    @mitu Thanks man. I'm going to give that a try and see how it works out. :)

                                    1 Reply Last reply Reply Quote 0
                                    • Used2BeRXU
                                      Used2BeRX @meleu
                                      last edited by

                                      @meleu Hey Meleu. Do you know anything about how the Pi handles FDS games? I've been unable to launch any of them from within the NES folder structure that I currently have them in. This was one of the issues high on the priority wish list.

                                      I figured that I wouldn't be able to integrate the synopsis for them into the gamelist.xml easily unless you got to making that happen, but I was surprised when FDS doesn't load any of the games at all in quicknes, fceumm or nestopia.

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

                                        @used2berx sorry bro, I never tried fds. I think @edmaul69 know something about it...

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

                                          @meleu Cool. I'll ask him if I need help when I really dive into it.

                                          Any chance you'll have some time to "fix" how FDS games are handled in the script? I believe I've got that at the top of the priority list right now. Assuming I can figure out how to launch the games, they should all play fine once I get that going. We just won't have any media or info on any of them until the script is changed.

                                          edmaul69E 1 Reply Last reply Reply Quote 0
                                          • edmaul69E
                                            edmaul69 @Used2BeRX
                                            last edited by edmaul69

                                            @used2berx your first issue is you need the fds bios in the bios folder. Games wont run without it. The bios is disksys.rom . Then if you dont want to have to go into the retroarch gui to flip the disk then you want to edit your controller configs to do it with hotkeys. I add these settings to my controllers for fds and psx. Just add buttons that arent being used for other hotkeys.

                                            input_disk_eject_toggle_btn = 
                                            input_disk_next_btn = 
                                            input_disk_prev_btn =
                                            
                                            Used2BeRXU 3 Replies Last reply Reply Quote 1
                                            • 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.