Jump to content
(Public Beta) HyperSpin 2 is now available for everyone ×

Tur-Matcher 1.13


Turranius

Recommended Posts

Posted

File Name: Tur-Matcher 1.13

File Submitter: Turranius

File Submitted: 07 May 2015

File Category: ROM/Database/Renaming tools

Credits: Turranius


I got tired of manually renaming videos and media to match my roms. I tried a few softwares for it, but none worked quite the way I wanted.
You may use it to match anything to your roms/images/XML. Here are a few examples.

 

1: You have an XML file or ROM files. You also have media (movies perhaps) but the names does not match the XML.
2: You have an XML file but your ROM files does not match the XML.
3: You have media files named the way you want, but your ROM files does not match,
4: You have some files that must match other files. Not necessarily HyperSpin/Emulator related.

 

Basically, you set what you want to use for source names (An XML file or a folder containing files).
You also set a source directory that you want to be coped/moved to match the source names.
Then you set a destination directory for where you want the copied/moved files to end up.

 

Anyway, how does it work?
The application cleans up the Source NAMES (From folder or XML) & the Source FILES and puts then into an internal array.
For example:
4x4 Off-Road Racing (USA) (Disk 1).D64
Becomes
4x4 OffRoad Racing

 

So now we have a cleaned up Romname and sourcefile(s). It then runs a Damerau-Levenshtein distance comparison between two strings. Yes, thats right. It computes the edit distance between two strings, that is the number of omissions, insertions, changes or swap of letters necessary to transform one string into the other.
This function is by jchd at the http://www.autoitscript.com forums and the description above is a cut and paste. hehe. You thought I sounded smart, right?

 

In other words, it compares the romname with all the source media and returns the source media that has the least amout of "spelling errors" in it.

 

Is this fast? No, its slow as hell if you have a lot of source media. Say you have 1000 roms and 500 media files.
For every rom file (1000) it has to go through every media file (500) and do the distance comparison on each one of them to find the best match. So this takes a while. The more media files you have, the slower each rom takes.
It will stop looking if it finds a direct match though, so that will speed it up.

 

It will not overwrite or even do the comparison IF you already have the media file for that rom in your destination directory. It does not care about extensions in the destination dir, so if you already have DestinationDir\Colony.MP4 it will not overwrite it later with a file with a different extension (Colony.FLV for example) as it only checks "Does Destination\Colony.* already exist?" and skip it if so.
This is good. Lets give an example. Say you have a mix of FLV and MP4 dupes. Split them up into separate folders.
Run this program, pointing it to one of the folders. Let it run. It will now copy those files.
Run it again, pointing it to the other folder. It will now only copy the files that do not already exist, no matter the extension.

 

It is available on my FTP (signature) and attached to this post with source.

 

How to:
Run the application.
MainScreen13.jpg

 

XML Source: Switch between using a XML or a folder to use for Source Names by clicking the "Switch to files" button. Switch back to XML using the same button.

 

Source files: Select the folder containing the files to be renamed (copied or moved actually).
Pre Strip #: This will strip out the defined number of characters from the start of the source names. This is good if your sourcefiles has a header that you do not want to be included
in the search. For example, your source file(s) are called something like "0001 - Electroplankton (Japan).nds" and the first 7 chars there messes it up (0001 - ). Set this to 7 and it will strip that out. Leave it at 0 to not strip.
Post Strip #: Same as above, but it will strip from the end of the name. Doubt this is needed.

 

Destination: Select the folder to copy/move the renamed files to.

 

The "0" is the number of misspellings to constitute a direct match. These will be copied/moved automatically without question. Recommended to keep it at 0. Its worth going through the manual labor later if you want it right. You can set it to -1 to disable automatic copying all together if you want to verify everything manually.

 

The "2" is the number of "misspellings" to constitute a possible match. If you want "A game" but it finds a Source file called "A_game", it will count as 1 misspelling. It will be added to a list that you'll go through at the end and select the matches.
Note: Releases with higher "spelling errors" will also be shown after this list is displayed, so you will get a chance to match even higher spelling errors.

 

"Move Sourcefiles to Destination": If you check this, any matches from "Source Files" will be moved into "Destination" instead of copied. Never recommended unless you want to rename very large ISO roms collections or something.
If one Sourcefile matches more then one Source Names, it will not allow it and ask you if you want to change to Copy Mode or Quit.

 

"Do not show result windows":. If you check this, it will not show you what file names it found, what file sources or which files that are perfect matches before continuing. The first response needed after clicking "Start" will be to help with the partial matches.

 

"Handle different disks?": Normally, everything in a () will be ignored, but if you check this, it will read inside the () and [] for disk,disc,tape and cart and try to keep them correct as well.
In other words, if you are matching a romset or similar with (Disk 1, Side B) etc (Commodore 64 for example), leave this checked. If the romset does not include it (NES and similar), uncheck it to gain a little bit of speed.

 

"Number of source files found before splitting them based on first char": The default is 10000. Normally, all source files are matched against all sources. This can get VERY slow on large sets with few direct hits (0 spelling errors). If the number of source files exceed 10000, it will split them up into different searches so a source that starts with the letter A will only search for source files also starting with A.
You may lower this number if you want to trigger this search method with a smaller source files set if you want. It will go a lot faster, however you might get missed results if they do not start with the same character ("Star Wars The" & "The Start Wars" for example will be a miss).
After it has indexed the sources and source files, it will display a message if it needs to split them up into different arrays (searches).

 

The "Reset to Default" button simply clears all the fields back to default.

 

Click Start to go on. Don't worry. Nothing will happen automatically yet!

 

This little fella will pop up to give you information on what its doing. You don't actually HAVE to watch it. Its more to show you that its working.

 

Processing.jpg

 

It first goes through the XML or folder you selected to find all the names we want to use and clean them up for matching.

 

It will then present what it found (Unless "Do not show result windows" is checked) and show you the "Rom Name Cleaned" names for each Rom that it will use to match with the source media. Just click the X to continue.
9b.JPG

 

It then goes through the source media and does the same thing (Unless "Do not show result windows" is checked). Click the X to continue.
10b.JPG

 

It will now start the matching and show you in the window what its doing.

 

Once it has gone through all the files, it will display (Unless "Do not show result windows" is checked) those that had low enough spelling errors to be automatically copied (0 in this case).
Those files are copied when you press the X.
Remember, you can hit Shift-ESC at any time (except if a question is on screen) to exit the application.

 

You can see the
Rom Name Clean: The cleaned name of the source name we want to use.
Source Match Clean: The best match it found for it, also cleaned.
Rom Full Name: The real name we want (read from XML or directory).
Source Match Full Name: The best match for it. Real filename, not cleaned.
Misspellings: The number of differences between them. We selected 0 for automatic processing, so this will only contain 0's.
New Name: The new name that will be created in the destination folder. It should match the "Rom Full Name" but with its own extension of course.
12a.JPG

 

When the copy is complete, it will show you the rest of the matches that it needs your help with. We selected 2 here, so only those with 1 or 2 misspellings will be processed.
Simply check the ones you think are a match and click the "Start" button. To skip to the next part, click "Skip". To abort, click "Close" or the X at the top right.
Note: This window is resizable. You may also drag the vertical lines between the headers to increase/decrease the column width (like Excel).
PartialHits.JPG

 

Once all are done, it will also show you the ones that did not get a match, its best match and the number of spelling errors for it. You can select to go through this list as well and check things you think is a match still.
As you can see, I did find one that is a match. It was a non match because of a bug in 1.7 and previous. Fixed in 1.8 (& sign was stripped from XML source names).
NoHits.JPG

 

And thats pretty much it =)

 

Note, everything shown in the lists are also logged to a subdir called "Logs". Its TAB separated lists, so you can just copy and paste it into Excel.



Click here to download this file

Mame related stuff: FTP: grandis.nu, port 21, user:misc, pass:misc

http://grandis.nu/software

Tur-Matcher - Match your roms/media/XML files.
Another Idle Volume Adjuster - Automatically control the volume.
How to: Use MAME Extras as material for HyperPause
How to: Use eXoDOS 2.0 as material for HyperPause

Posted

thanks turra seems very helpful ill let you know how it turns out and give you some ideas if there needs to be improvement

sig.png 100%

Posted

It needs improvement in the GUI department. Instead of asking for each file it finds, it should ask at the end and show a list of all matches. I'm not there yet though =)

Mame related stuff: FTP: grandis.nu, port 21, user:misc, pass:misc

http://grandis.nu/software

Tur-Matcher - Match your roms/media/XML files.
Another Idle Volume Adjuster - Automatically control the volume.
How to: Use MAME Extras as material for HyperPause
How to: Use eXoDOS 2.0 as material for HyperPause

Posted

Grab it again if you've already downloaded it. When using the XML as Rom source, it did not strip out excess spaces, so it got 1 spelling mistake due to a space at the end.

Mame related stuff: FTP: grandis.nu, port 21, user:misc, pass:misc

http://grandis.nu/software

Tur-Matcher - Match your roms/media/XML files.
Another Idle Volume Adjuster - Automatically control the volume.
How to: Use MAME Extras as material for HyperPause
How to: Use eXoDOS 2.0 as material for HyperPause

Posted

Hi turranius its amazing your app... but

i have all video in .flv and some video duplicate in .mp4

How can i clean all files .flv duplicates? Sorry for my english

Posted
Hi turranius its amazing your app... but

i have all video in .flv and some video duplicate in .mp4

How can i clean all files .flv duplicates? Sorry for my english

I would split up the flv files into one folder and the mp4 files into another.

Run the program on the mp4 files as soucefiles first.

Then run it again on the flv files, pointing to the same destination folder.

It will not copy any of the .flv files if there is already a mp4 file there. It does not care about the extension and just thinks it already exists and skip the flv dupe.

Mame related stuff: FTP: grandis.nu, port 21, user:misc, pass:misc

http://grandis.nu/software

Tur-Matcher - Match your roms/media/XML files.
Another Idle Volume Adjuster - Automatically control the volume.
How to: Use MAME Extras as material for HyperPause
How to: Use eXoDOS 2.0 as material for HyperPause

Posted

Ok i try... thanks...

please can you see hyperlaunch.net i try find solution for you volume app ... i try start with intro.mp4 and hyperspin and you volume app but this generate error scrip line....

thanks really thanks for your time

Posted

Updated to 1.1

It now removes any non ASCII chars from the comparison. This lowers the number of spelling differences.

It also replaces, for example, "II" to "2", "III" to "3" etc. This further improves the hit rate.

Some parts rewritten for speed.

And the biggest thing. It wont ask you for anything while its running. It will finish the search of all files first and THEN show you the information / ask for confirmations.

Translate & when reading the XML into &, making it safer to specify the XML file as filenames.

Mame related stuff: FTP: grandis.nu, port 21, user:misc, pass:misc

http://grandis.nu/software

Tur-Matcher - Match your roms/media/XML files.
Another Idle Volume Adjuster - Automatically control the volume.
How to: Use MAME Extras as material for HyperPause
How to: Use eXoDOS 2.0 as material for HyperPause

Posted

Updated to 1.2

When it finds a perfect match (0 spelling errors), then that match is removed from the possible matches array. That means that the next Roms does not get matched against that source media again. This speeds up the search A LOT of you have media with a lot of direct hits.

It will only do this if the next rom to check is not the same as the one it currently checks, so blabla(disk1) and blabla(disk2) will still work and get the same media.

It now shows the number of possible sources in the traytip. It should go down the further it runs.

Mame related stuff: FTP: grandis.nu, port 21, user:misc, pass:misc

http://grandis.nu/software

Tur-Matcher - Match your roms/media/XML files.
Another Idle Volume Adjuster - Automatically control the volume.
How to: Use MAME Extras as material for HyperPause
How to: Use eXoDOS 2.0 as material for HyperPause

  • 3 weeks later...
  • 5 weeks later...
Posted

Tried to fix the images i the first post but just get

"Sorry, but you have posted more images than you are allowed to"

Mame related stuff: FTP: grandis.nu, port 21, user:misc, pass:misc

http://grandis.nu/software

Tur-Matcher - Match your roms/media/XML files.
Another Idle Volume Adjuster - Automatically control the volume.
How to: Use MAME Extras as material for HyperPause
How to: Use eXoDOS 2.0 as material for HyperPause

  • 2 weeks later...
Posted

index.php?app=downloads&module=display&section=screenshot&id=7835

File Name: Tur-Matcher

File Submitter: Turranius

File Submitted: 06 May 2015

File Category: ROM/Database/Renaming tools

Credits: Turranius

I got tired of manually renaming videos and media to match my roms. I tried a few softwares for it, but none worked quite the way I wanted.

You may also use it to match your roms. Here are a few examples.

1: You have an XML file or ROM files. You also have media (movies perhaps) but the names does not match the XML.

2: You have an XML file but your ROM files does not match the XML.

3: You have media files named the way you want, but your ROM files does not match (unusual for this to happen...)

Basically, you set what you want to use for source names (An XML file or a folder containing files). You also set a source dir that you want to be renamed to match the source names. Then you set a destination dir for where you want the renamed files to end up.

Heres how it works in short.

You select the Source Name Directory or XML file to use.

You select the Source Directory to try and match the Source Name directory (or XML) with (can be anything. Does not have to be videos).

You select the Destination Directly to put the renamed Source Directory files into.

You can also use this to rename your Roms to match any XML database or media files you already have.

Example:

You have the TOSEC Roms but the official XML which is from another Romset. You really want to use this XML because it matches with EmuMovies or something.

Solution:

For Rom dir, specify the XML file (or media files. Something that has the file names you WANT.)

For source dir, specify the romdir where your TOSEC roms are.

For destination dir, specify any empty dir.

You'll now get the TOSEC Roms renamed to match the XML or media and put in the destination directory.

Anyway, how does it work?

The application cleans up the Rom Names AND the Source Media Names and puts then into an internal array.

For example:

4x4 Off-Road Racing (USA) (Disk 1).D64

Becomes

4x4 OffRoad Racing

So now we have a cleaned up Romname and sourcefile(s). It then runs a Damerau-Levenshtein distance comparison between two strings. Yes, thats right. It computes the edit distance between two strings, that is the number of omissions, insertions, changes or swap of letters necessary to transform one string into the other.

This function is by jchd at the http://www.autoitscript.com forums and the description above is a cut and paste. hehe. You thought I sounded smart, right?

In other words, it compares the romname with all the source media and returns the source media that has the least amout of "spelling errors" in it.

Is this fast? No, its slow as hell if you have a lot of source media. Say you have 1000 roms and 500 media files.

For every rom file (1000) it has to go through every media file (500) and do the distance comparison on each one of them to find the best match. So this takes a while. The more media files you have, the slower each rom takes.

It will not overwrite or even do the comparison IF you already have the media file for that rom in your destination directory. It does not care about extensions in the destination dir, so if you already have DestinationDir\Colony.MP4 it will not overwrite it later with a file with a different extension (Colony.FLV for example) as it only checks "Does Destination\Colony.* already exist?" and skip it if so.

This is good. Lets give an example. Say you have a mix of FLV and MP4 dupes. Split them up into separate folders.

Run this program, pointing it to one of the folders. Let it run. It will now copy those files.

Run it again, pointing it to the other folder. It will now only copy the files that do not already exist, no matter the extension.

Click here to download this file

Mame related stuff: FTP: grandis.nu, port 21, user:misc, pass:misc

http://grandis.nu/software

Tur-Matcher - Match your roms/media/XML files.
Another Idle Volume Adjuster - Automatically control the volume.
How to: Use MAME Extras as material for HyperPause
How to: Use eXoDOS 2.0 as material for HyperPause

Posted

I would kiss ya...if you were into belligerent tattooed alcoholics lmao

Sent from my iPhone using Tapatalk

Instagram : baddeolv
Facebook : Brian Addeo
 

  • 8 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...