Filter Abstraction (#25)

* Add category, back filters by dictionary

* Complete internal filter set

* Fix AreaSize filter

* Populate filter object the hard way

* Manipulation flags should not be filters

* None of them need to be public

* Convert to partial helper method

* Better method use

* Field, not string; no dictionary

* Add FilterTo method for later

* More naming options (easier conversion)

* Update README
This commit is contained in:
Matt Nadareski
2020-07-18 21:35:17 -07:00
committed by GitHub
parent a25ffc8a36
commit 334e1c4585
21 changed files with 1551 additions and 254 deletions

View File

@@ -334,6 +334,26 @@ Options:
compare against the input DATs. This flag forces all CHDs to be
treated like regular files.
-fi=, --filter= Filter a game/rom field with the given value(s)
Filter any valid item or machine field from inputs. Filters are input
in the form 'key:value' or '!key:value', where the '!' signifies 'not'
matching. Numeric values may also prefix the 'value' with '>', '<', or
'=' accordingly. Key examples include: romof, category, and game.
Additionally, the user can specify an exact match or full C#-style
regex for pattern matching. Multiple instances of this flag are
allowed.
-cat=, --category-filter= Filter by category
Include only items with this category in the output. Additionally,
the user can specify an exact match or full C#-style regex for
pattern matching. Multiple instances of this flag are allowed.
-ncat=, --not-category= Filter by not category
Include only items without this category in the output.
Additionally, the user can specify an exact match or full C#-style
regex for pattern matching. Multiple instances of this flag are
allowed.
-gn=, --game-name= Filter by game name
Include only items with this game name in the output. Additionally,
the user can specify an exact match or full C#-style regex for
@@ -950,6 +970,7 @@ Options:
- %name% - Replaced with the Rom name
- %manufacturer% - Replaced with game Manufacturer
- %publisher% - Replaced with game Publisher
- %category% - Replaced with game Category
- %crc% - Replaced with the CRC
- %md5% - Replaced with the MD5
- %ripemd160% - Replaced with the RIPEMD160 (.NET Framework 4.8 only)
@@ -1276,6 +1297,26 @@ Options:
second time, this will skip writing it. This can often speed up
the output process. [Both diff-cascade and diff-reverse-cascade]
-fi=, --filter= Filter a game/rom field with the given value(s)
Filter any valid item or machine field from inputs. Filters are input
in the form 'key:value' or '!key:value', where the '!' signifies 'not'
matching. Numeric values may also prefix the 'value' with '>', '<', or
'=' accordingly. Key examples include: romof, category, and game.
Additionally, the user can specify an exact match or full C#-style
regex for pattern matching. Multiple instances of this flag are
allowed.
-cat=, --category-filter= Filter by category
Include only items with this category in the output. Additionally,
the user can specify an exact match or full C#-style regex for
pattern matching. Multiple instances of this flag are allowed.
-ncat=, --not-category= Filter by not category
Include only items without this category in the output.
Additionally, the user can specify an exact match or full C#-style
regex for pattern matching. Multiple instances of this flag are
allowed.
-gn=, --game-name= Filter by game name
Include only items with this game name in the output. Additionally,
the user can specify an exact match or full C#-style regex for
@@ -1533,6 +1574,26 @@ Options:
parent sets based on the cloneof and romof tags as well as device
references. This is incompatible with the other --dat-X flags.
-fi=, --filter= Filter a game/rom field with the given value(s)
Filter any valid item or machine field from inputs. Filters are input
in the form 'key:value' or '!key:value', where the '!' signifies 'not'
matching. Numeric values may also prefix the 'value' with '>', '<', or
'=' accordingly. Key examples include: romof, category, and game.
Additionally, the user can specify an exact match or full C#-style
regex for pattern matching. Multiple instances of this flag are
allowed.
-cat=, --category-filter= Filter by category
Include only items with this category in the output. Additionally,
the user can specify an exact match or full C#-style regex for
pattern matching. Multiple instances of this flag are allowed.
-ncat=, --not-category= Filter by not category
Include only items without this category in the output.
Additionally, the user can specify an exact match or full C#-style
regex for pattern matching. Multiple instances of this flag are
allowed.
-gn=, --game-name= Filter by game name
Include only items with this game name in the output. Additionally,
the user can specify an exact match or full C#-style regex for