masterfulmethods Posted August 25, 2020 Share Posted August 25, 2020 This is probably a long shot. Not sure if this would even be possible but I thought i'd throw it out there, see if someone with scripting knowledge could help me out. I have well over 1000 rom hacks across different systems, and i've made separate platforms for each system with rom hacks. Each platform has an XML file in LaunchBox\Data\Platforms and I'd like to figure out if there is a way to create a new text file named from part of the <ApplicationPath> tag, then copy the <Notes> tag to the associated file. Example: Create Legend of Zelda [ROMHACK] (Triforce Power) (v3.6).txt from <ApplicationPath>Games\Nintendo Entertainment System (Hacks)\Legend of Zelda [ROMHACK] (Triforce Power) (v3.6).zip</ApplicationPath> , then take everything between the <Notes></Notes> tags and copy that into the associated text file Hopefully that makes sense. Obviously, if it would need to take everything between the tags, rather than just a section, I could deal with that (if the system can deal with the backslashes or create a directory structure matching the full path between the tag) Also interested in doing the reverse, finding the rom name based on the text file name, then just copying the contents of the text file into the <Notes> tag for the associated game in the XML file Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted August 25, 2020 Share Posted August 25, 2020 Parsing (extracting) the xml's into text files ain't so bad. But reversing that takes a little bit more (.... than I'd want to do). I assume all your rom names are the full title as in your example vs like Arcade (MAME) where the roms name is shortened ("bbredux.zip" --> "Bubble Bobble ('bootleg redux' hack for Bobble Bobble PCB)"). Are you only wanting games that only have "ROMHACK" in the application path. Or all games in a given platform (xml file)? And then one text file per game parsed? So like well over 1000 text files? Quote Link to comment Share on other sites More sharing options...
dragon57 Posted August 25, 2020 Share Posted August 25, 2020 @masterfulmethods, I wouldn't mind helping out. I parse xml files quite often here. Shoot me a PM when you have some time. Quote Link to comment Share on other sites More sharing options...
masterfulmethods Posted August 25, 2020 Author Share Posted August 25, 2020 Quote Parsing (extracting) the xml's into text files ain't so bad. But reversing that takes a little bit more (.... than I'd want to do) I was just thinking the reverse would be nice if something ever happened to LaunchBox or if I wanted to start over, because otherwise it's right-click > edit > notes >enter description for every single romhack. Quote I assume all your rom names are the full title as in your example vs like Arcade (MAME) where the roms name is shortened Yeah the roms all have a full title like the example; I standardized on a naming convention for the romhacks, so they all have [ROMHACK] in the title/application path. Quote Are you only wanting games that only have "ROMHACK" in the application path. Or all games in a given platform (xml file)? Yeah only games that have [ROMHACK], which will also be all games in a given platform because I have each console's romhacks in a separate platform Quote And then one text file per game parsed? So like well over 1000 text files? I was thinking separate files, yeah, but I guess I'm not opposed to other ideas. Are you thinking like all games in a platform to it's own file, so there's just 1 new file per platform? Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted August 25, 2020 Share Posted August 25, 2020 3 minutes ago, masterfulmethods said: if something ever happened to LaunchBox LaunchBox makes automatic backups of your entire "Data" folder. ../LaunchBox/Backup 5 minutes ago, masterfulmethods said: I was thinking separate files Either way is simple enough. Depends on what you want to do with them. All in all, @dragon57 should have enough info to whip up something that suites your needs. Send him a PM. (Thanks D! ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.