Organize MiSTer's _Arcade directory based on MRA Metadata with symlinks
-
- Posts: 2
- Joined: Sun May 24, 2020 6:46 pm
Organize MiSTer's _Arcade directory based on MRA Metadata with symlinks
A Simple scripts to automate organizing MiSTers _Arcade directory based on you MRA files.
Instructions:
Download the update_arcade-organizer.sh to the Scripts directory and run.
This script looks at what MRA files you have and the information in them to organize MiSTer's _Arcade directory.
If the XLM tags for Year, Manufacturer, and Category are included in the MRA file, this script will create an "_Organized" Directory in "_Arcade" and will create the following sub-directories with soft sysmlinks to organize it:
_Organized
├── _1 A-E
├── _1 F-K
├── _1 L-Q
├── _1 R-T
├── _1 U-Z
├── _2 Year
├── _3 Manufacturer
└── _4 Category
These scripts DO NOT DUPLICATE any cores or mra files, only soft symlinks are used.
THESE SYMLINKS ONLY WORK ON MISTER! IF YOU MOUNT YOUR SD CARD OUTSIDE OF MISTER THESE SYMLINKS WILL NOT WORK.
THIS SCRIP USES A DEFAULT LOCATION FOR _Arcade at /media/fat/_Arcade
AND
A DEFAULT LOCATION FOR _Organized at /media/fat/_Arcade/_Organized
If your _Arcade Directory is in a diffrent location you MUST use a /media/fat/Scripts/update_arcade-organizer.ini file
If your not using the default locations for _Arcade and _Organized you must add their locations in /media/fat/Scripts/update_arcade-organizer.ini
Q: How can I set my own custom locations for MRA and _Organized Directories?
A: A /media/fat/Scripts/update_arcade-organizer.ini file may be used to set custom location for your MRA files (Scans recursivly) and _Organized files. Add the following line to the ini file to set a directory for MRA files: MRADIR=/top/path/to/mra/files/_Arcade Add the following line to the ini file to set a directory for Organized files: ORGDIR=/path/to/organized/files/_Organized
Q:Will this script over write files I already have?
A: NO, This script will not clober files you already have.
Q: What If I get new MRA/Core files?
A: You need to re-run the script to have them included in the Organized files.
You should back up your _Arcade directory before running this script.
USE AT YOUR OWN RISK - THIS COMES WITHOUT WARRANTE AND MAY NEUTER EVERYTHING.
https://github.com/MAME-GETTER/_arcade-organizer
Instructions:
Download the update_arcade-organizer.sh to the Scripts directory and run.
This script looks at what MRA files you have and the information in them to organize MiSTer's _Arcade directory.
If the XLM tags for Year, Manufacturer, and Category are included in the MRA file, this script will create an "_Organized" Directory in "_Arcade" and will create the following sub-directories with soft sysmlinks to organize it:
_Organized
├── _1 A-E
├── _1 F-K
├── _1 L-Q
├── _1 R-T
├── _1 U-Z
├── _2 Year
├── _3 Manufacturer
└── _4 Category
These scripts DO NOT DUPLICATE any cores or mra files, only soft symlinks are used.
THESE SYMLINKS ONLY WORK ON MISTER! IF YOU MOUNT YOUR SD CARD OUTSIDE OF MISTER THESE SYMLINKS WILL NOT WORK.
THIS SCRIP USES A DEFAULT LOCATION FOR _Arcade at /media/fat/_Arcade
AND
A DEFAULT LOCATION FOR _Organized at /media/fat/_Arcade/_Organized
If your _Arcade Directory is in a diffrent location you MUST use a /media/fat/Scripts/update_arcade-organizer.ini file
If your not using the default locations for _Arcade and _Organized you must add their locations in /media/fat/Scripts/update_arcade-organizer.ini
Q: How can I set my own custom locations for MRA and _Organized Directories?
A: A /media/fat/Scripts/update_arcade-organizer.ini file may be used to set custom location for your MRA files (Scans recursivly) and _Organized files. Add the following line to the ini file to set a directory for MRA files: MRADIR=/top/path/to/mra/files/_Arcade Add the following line to the ini file to set a directory for Organized files: ORGDIR=/path/to/organized/files/_Organized
Q:Will this script over write files I already have?
A: NO, This script will not clober files you already have.
Q: What If I get new MRA/Core files?
A: You need to re-run the script to have them included in the Organized files.
You should back up your _Arcade directory before running this script.
USE AT YOUR OWN RISK - THIS COMES WITHOUT WARRANTE AND MAY NEUTER EVERYTHING.
https://github.com/MAME-GETTER/_arcade-organizer
Re: Organize MiSTer's _Arcade directory based on MRA Metadata with symlinks
I'm not familiar with symlinks, so sorry for the ignorant question.
Is this easy to undo?
Is this easy to undo?
- LamerDeluxe
- Top Contributor
- Posts: 1239
- Joined: Sun May 24, 2020 10:25 pm
- Has thanked: 887 times
- Been thanked: 284 times
Re: Organize MiSTer's _Arcade directory based on MRA Metadata with symlinks
Just delete the _Organized folder I would think.
This script is a really great idea.
Re: Organize MiSTer's _Arcade directory based on MRA Metadata with symlinks
Sounds cool.Thanks a lot.
What happens if an mra is missing any or all of the XLM tags for Year, Manufacturer, and Category?
Due to the RetroDriven MiSTerMAME script I assume that there are a lot of people out there that have the following (or a very similar) structure for their mra files:
_Arcade
├_alternatives
├_Unofficial
├ ├_CPS1
├ ├_Alternatives
├_Jotego
├ ├_Alternatives
├_Sega System 1
├ ├_Alternatives
All these sub directories contain mra files and/or sub directories. Will this kind of structure also work?
What happens if an mra is missing any or all of the XLM tags for Year, Manufacturer, and Category?
Due to the RetroDriven MiSTerMAME script I assume that there are a lot of people out there that have the following (or a very similar) structure for their mra files:
_Arcade
├_alternatives
├_Unofficial
├ ├_CPS1
├ ├_Alternatives
├_Jotego
├ ├_Alternatives
├_Sega System 1
├ ├_Alternatives
All these sub directories contain mra files and/or sub directories. Will this kind of structure also work?
We raise hopes here...until they're old enough to fend for themselves.
--Mike Callahan
--Mike Callahan
Re: Organize MiSTer's _Arcade directory based on MRA Metadata with symlinks
I'd imagine this will result in files not being moved to those tag categories if the script can't access the data, but moved to the alphabetic sorted folders.
I've been working on a similar Python script and noticed several MRA files missing the data you mentioned, and also MRA file names that did not match the MAME xml <description> tags, where most of the MRA file names seem to come from. You could add the data tags to the MRA files, or physically move the files yourself
-
- Posts: 2
- Joined: Sun May 24, 2020 9:01 pm
- Has thanked: 1 time
Re: Organize MiSTer's _Arcade directory based on MRA Metadata with symlinks
Thanks amoore2600 for the script!
When I run the script, I get a blank screen:
https://imgur.com/bZtGdfR
My MRA files are all in /media/fat/_Arcade, with everything working as it should.
Any ideas what might be causing this?
When I run the script, I get a blank screen:
https://imgur.com/bZtGdfR
My MRA files are all in /media/fat/_Arcade, with everything working as it should.
Any ideas what might be causing this?
Re: Organize MiSTer's _Arcade directory based on MRA Metadata with symlinks
Seems like you didn’t select the correct script? There are two scripts to install, one to organize and one to update the script, which you seemed to select.corysnyder28 wrote: ↑Sun May 31, 2020 6:59 pm Thanks amoore2600 for the script!
When I run the script, I get a blank screen
Re: Organize MiSTer's _Arcade directory based on MRA Metadata with symlinks
This script results in a folder that takes up an unusually large amount of space. From a fresh install, the _Organized folder eats up 416 MB of space, which is more than double the space all the cores use up. I wrote up an issue about it here: https://github.com/MAME-GETTER/_arcade- ... r/issues/6
Re: Organize MiSTer's _Arcade directory based on MRA Metadata with symlinks
It would be great if we had 2 additional folders under Organized; one for Vertical orientation games and one for Horizontal orientation games. If that can't be added to this script can I manually do this myself by creating a Vertical and Horizontal folder myself and manually copying mra files into those folders? Not sure how to create symbolic links, if that's the preferred method please let me know how I go about that. Thanks!
-
- Posts: 13
- Joined: Thu Jul 08, 2021 11:52 am
- Has thanked: 3 times
- Been thanked: 1 time
Re: Organize MiSTer's _Arcade directory based on MRA Metadata with symlinks
What is the state of play with this? The extra folders are very useful I think, and would love something like this for Neo Geo. anyone done the same for console cores? And does it reduce storage capacity?dukrous wrote: ↑Sun Jun 14, 2020 5:00 pm This script results in a folder that takes up an unusually large amount of space. From a fresh install, the _Organized folder eats up 416 MB of space, which is more than double the space all the cores use up. I wrote up an issue about it here: https://github.com/MAME-GETTER/_arcade- ... r/issues/6
-
- Posts: 157
- Joined: Sun Aug 30, 2020 12:04 am
- Has thanked: 98 times
- Been thanked: 46 times
Re: Organize MiSTer's _Arcade directory based on MRA Metadata with symlinks
Looks like dukrous' commit to change the block size from 128 KB to 32 KB was accepted on June 18, 2020 https://github.com/MiSTer-devel/SD-Inst ... Ter/pull/3
I just did a check, and my _Organized folder is 91 MB. Contains all the official Arcade cores along with jotego's (and his betas).
So yes, it does reduce storage capacity, but it's less than 100 MB for some organization of the arcade cores.
Haven't seen anything like this for console cores, but I think some people might have their own directory structure for their console games.
I just did a check, and my _Organized folder is 91 MB. Contains all the official Arcade cores along with jotego's (and his betas).
So yes, it does reduce storage capacity, but it's less than 100 MB for some organization of the arcade cores.
Haven't seen anything like this for console cores, but I think some people might have their own directory structure for their console games.