PDA

View Full Version : dir2xml


fata1err0r
08-17-2008, 03:08 AM
Just wrote this quick 20 line program to pump a dir command to a hyperspin.xml for my snes games while were waiting for hyperhq guys.
just copy to the directory you want to list and run.
dir2xml.zip (http://www.danesgames.com/apps/dir2xml.zip)

Source:
http://code.google.com/p/hyperspin-dir2xml/

BadBoyBill
08-17-2008, 03:58 AM
Cool, thanks, I'm sure this can get people by for now until then.

joebells
08-17-2008, 04:42 AM
man fata1err0r you are kicking some serious ***(not sure so I'm just commenting it out myself) thank you.

fata1err0r
08-17-2008, 06:30 AM
Cheers mate! :top:

Circo
08-17-2008, 11:00 AM
Agreed! Thanks Given!

Zinger19
08-17-2008, 12:43 PM
This definitely makes adding games easier. Thanks.

joebells
08-23-2008, 01:52 PM
Again thanks fata1err0r

If anybody wants to strip all the tags from their description field(unneeded in my opinion if you have just 1 version of each game) then go get notepad++ http://notepad-plus.sourceforge.net/uk/site.htm

then open up your database xml files in notepad++, you can drag them all in at the same time and then do the stripping all in one shot if you want. Press ctrl+h to bring up the search and replace dialog. At the bottom click on regular expression then in the search field type
(<description>.*)\(.*\)
and in the replace field type
\1
then press replace all in all in all open documents. You'll have to do it multiple times since some games have multiple sets of parenthesis.

When you are done you'll have space at the end of each description field. Again use the search and replace dialog and this time type in
\s</description>
in the search field and
</description>
in the replace field you'll again have to do it multiple times to get rid of the multiple spaces.

There is probably a bit more that could be done to my regular expressions to get the desired results in one step but this will work for now. This will work for the regular database files too.

Hopefully this will be useful to someone until HyperHQ is done since I see it will be able to do this.

Helltrasher
08-26-2008, 04:30 AM
Thanks !:)

FatNasty
09-06-2008, 10:18 AM
Thank you

brock.sampson
09-09-2008, 12:21 PM
I dropped this into my mame\roms folder and when I try to run I get an error.

This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.

I'm guessing I'm doing something wrong. Are there some additional parameters I have to pass when I run this?

Thanks,

shrunkenmaster
09-23-2008, 12:36 PM
Just wrote this quick 20 line program to pump a dir command to a hyperspin.xml for my snes games while were waiting for hyperhq guys.
just copy to the directory you want to list and run.
dir2xml.zip (http://www.danesgames.com/apps/dir2xml.zip)
I get a config error when trying this too. What is wrong here?!
Cheers,
Mex

Goalies Rule
09-28-2008, 11:21 AM
Just dawned on me that it has to be run in a 32 bit environment in case you"re getting an error

rwill2001
04-07-2009, 07:12 PM
I dropped this into my mame\roms folder and when I try to run I get an error.

This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.

I'm guessing I'm doing something wrong. Are there some additional parameters I have to pass when I run this?

Thanks,

I had the same issue and as I recall I had to update .net to 3.5.

fata1err0r
04-12-2009, 04:36 AM
Hey guys, put the source on google, its atrocious so if you feel like fixing it up let me know if you want to have commit access. Im thinking this would be better in python or something but i guess c++ is fast lol....

http://code.google.com/p/hyperspin-dir2xml/

Lashek
04-13-2009, 07:39 AM
Hey! Thanks, I've actually went about re-creating it myself as well in C#. :)

Dazz
04-13-2009, 07:47 AM
Just dawned on me that it has to be run in a 32 bit environment in case you"re getting an errorI run this in XP64 and also Windows 7 64 without issue. I think it just requires .net.

fata1err0r
04-13-2009, 05:14 PM
It should only need visual c++ 2005 redist from the microsoft website

cnsf
07-26-2009, 02:14 PM
Truly awesome. Thank you! Worked like a charm for Stella!

shateredsoul
07-13-2010, 05:01 PM
Great resource!

Grimoz
09-13-2011, 10:57 PM
Anyone got this version of dir2xml I cannot find it anywhere.

tony25
09-14-2011, 02:47 PM
Anyone got this version of dir2xml I cannot find it anywhere.

I couldn't find it either and instead found HyperRom2XML (http://www.hyperspin-fe.com/forum/showthread.php?t=6734). Seems to work fine.