1
clrmame Discussion / Re: New Scanner (WIP)
« on: Yesterday at 18:02 »
ok....small wip mainly about filters:
one little thing on my to do list was supporting xpath for filtering, so I've added that and it gives you fantastic possibilities to filter on specific things..
The filter input field (or commandline attribute) is used for this. Currently it supports regular expressions for filtering machines on name only (see rebuilder readme.md). Using xpath filterings gives you more power. To use it, you need to prefix the filterstring with "xp:", otherwise it's the regular expression filter and your xpath expression needs to select software, machine or game elements.
So here we go with some examples:
Filtering a -listsoftwarelist output by only taking the Commodore software lists into account:
xp://softwarelist[contains(@description, 'Commodore')]/software
Filtering a -listxml output by selecting machines which have a baddump disk:
xp://machine[disk[@status='baddump']]
Filtering a -listxml output by selecting machines which have preliminary emulation status and Taito as manufacturer:
xp://machine[driver[@emulation='preliminary'] and manufacturer='Taito']
If you are familar with xpath, you already can imagine what you can do here. If not, learn xpath ;-)
Another thing with filtering is that you most likely want the dependencies included automatically. So you want to filter on a clone machine, but you also need the parent/bios/devices files included.
The filtering does that for you now, so if you filter on pacman, it will also include all the dependencies for you.
Attached are some screenshot parts which show some filtering for the examples above, also one showing the dependencies (including showing empty machines, which you already know as a feature).
On a side note I did some work on speed improvements, solving some thread safety things which should also positively affect the rebuilder core. And I found a way for handling the weird things like the samples of battles and homerun in a full merged environment...if you have no idea what I'm talking about, well, ignore me or check cloneof versus sampleof versus fullmerged).
So....tada...till next time
one little thing on my to do list was supporting xpath for filtering, so I've added that and it gives you fantastic possibilities to filter on specific things..
The filter input field (or commandline attribute) is used for this. Currently it supports regular expressions for filtering machines on name only (see rebuilder readme.md). Using xpath filterings gives you more power. To use it, you need to prefix the filterstring with "xp:", otherwise it's the regular expression filter and your xpath expression needs to select software, machine or game elements.
So here we go with some examples:
Filtering a -listsoftwarelist output by only taking the Commodore software lists into account:
xp://softwarelist[contains(@description, 'Commodore')]/software
Filtering a -listxml output by selecting machines which have a baddump disk:
xp://machine[disk[@status='baddump']]
Filtering a -listxml output by selecting machines which have preliminary emulation status and Taito as manufacturer:
xp://machine[driver[@emulation='preliminary'] and manufacturer='Taito']
If you are familar with xpath, you already can imagine what you can do here. If not, learn xpath ;-)
Another thing with filtering is that you most likely want the dependencies included automatically. So you want to filter on a clone machine, but you also need the parent/bios/devices files included.
The filtering does that for you now, so if you filter on pacman, it will also include all the dependencies for you.
Attached are some screenshot parts which show some filtering for the examples above, also one showing the dependencies (including showing empty machines, which you already know as a feature).
On a side note I did some work on speed improvements, solving some thread safety things which should also positively affect the rebuilder core. And I found a way for handling the weird things like the samples of battles and homerun in a full merged environment...if you have no idea what I'm talking about, well, ignore me or check cloneof versus sampleof versus fullmerged).
So....tada...till next time