meambobbo Posted August 1, 2013 Posted August 1, 2013 Should have posted this here, but first posted in Main forum: http://www.hyperspin-fe.com/forum/showthread.php?27240-HXxmlMaker-program-I-wrote-to-make-xml-lists So I wrote a little program to help create HyperSpin xml game lists. The way it works is specify an existing "master list" xml file, typically one of the giant lists on hyperlist that are basically complete game lists, and you create a (or use someone else's) "match file" to quickly and easily create subsets of that list. The reason I wrote this program was to be able to quickly make my own lists. I kept adding features until I thought the program was pretty powerful and I should refine it a bit and make it publicly available. The program is a command line java program... http://sourceforge.net/projects/hsxmlmaker/ ...but I also made a runnable jar GUI program to make it easier to use for the casual user. http://sourceforge.net/projects/hsxmlmakergui/ So as a quick example, you'd make your match file something like this: +++genre1+++ match1 match2 match3 +++genre2+++ match4 match5 match6 +++sports+++ double dribble blades of glory ice hockey 10[ -_]?yard[ -_]fight The +++genre+++ lines specify a genre. All the lines under a genre are match lines. The program makes one full list xml file and additional xml files for each genre listed, plus a "Genres.xml" file that lists all the genre xml files created. Each match line has a regular expression that is attempted to be matched against the description tag values in the master xml file. In the above example, it will create one full list with all the games that match match1, match2, match3, match4, match5, match6, double dribble, blades of glory, ice hockey, and 10[ -_]?yard[ -_]fight. It will also create genre1.xml, genre2.xml, and sports.xml, each with the games that match the match lines below it, until a new genre is specified. Each genre and match line has numerous options you can use to enhance the way the program matches, or how it sorts the output, or other options. Please see the documentation in the links above for the full details. But to give you an idea of some of the options provided, consider applying the ---numbered, ---unique, and ---sort false options. These are great to apply to a "Top 10" or "Top 100" genre. The ---numbered option adds a incremental number to the description of each game, so you can see which game is #1, #2, ... #100, etc. The ---sort false option prevents the output from being sorted (which would occur by default without this option), so that the games are output in the order they are specified in the file. And ---unique scores all the games a match line matches, and only picks the "best" one. So if you put Ninja Gaiden, you're only going to get the original. So for example, you can do something like: +++Street Fighters+++ ---sort YEAR Street Fighter Those two lines will create a "Street Fighters.xml" file, that contains every game that contains "Street Fighter" (case insensitive) in the <description> tag, sorted by Year. "Street Fighters" will be listed in Genres.xml, so that when you bring up the available genres in HyperSpin, Street Fighters will be one of the options. Sure beats the ___ out of editing XML!!!! Another thing - each match line is processed as a regular expression - so you could do a line like: bou?lder dash to match "bolder dash" or "boulder dash". or: (life force|salamander) to match life force or salamander I set up the way it processes each line so that non-technical users could just write the basic game names, whereas advanced users could go crazy with the regular expressions and the extra options i've provided. I posted some example match files in the wiki: http://sourceforge.net/p/hsxmlmaker/wiki/Examples/ and for download: http://sourceforge.net/projects/hsxm...match%20files/ i'll say this thing is in beta - let me know any issues.
meambobbo Posted August 1, 2013 Author Posted August 1, 2013 if anyone had terrible performance using HSxmlMakerGUI, it was due to the excessive console output HSxmlMaker was spitting out. I added -verbose option to spit out the same amount of output, but it is defaulted to not output all the matchline details. Verbose output is unavailable from HSxmlMakerGUI due to the terrible performance. My one run on HSxmlMakerGUI went from 8 minutes to 8 seconds - same input and output files, same processing, just less console output displayed. HSxmlMaker went from 30 seconds to 8 seconds by turning off verbose output.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.