From 94ef7d0eb421fdf667406cf29cc9406bf03be514 Mon Sep 17 00:00:00 2001 From: garfield69 Date: Sat, 6 Aug 2022 12:07:08 +1200 Subject: [PATCH] Updated Definition format (markdown) --- Definition-format.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Definition-format.md b/Definition-format.md index 39be9b2..3e46fd7 100644 --- a/Definition-format.md +++ b/Definition-format.md @@ -1403,19 +1403,23 @@ filters: ## validate -Given a list of words, delimited by any one of `,()/ .` this filter will return a comma delimited list of only the words that +Given a list of words, delimited by any one of `, /.)(;[]"|:` this filter will return a comma delimited list of only the words that are in the args. Useful for removing non-genre types from an open tag list. +Note: to preserve a double word (for example `Science Fiction` or `Sci-Fi & Fantasy`) replace the spaces with underscores. These will be auto-restored in results. + Example: ```yaml # remove any tags that are not standard genre types selector: div.tags filters: - # input: crime, x264, 1080p, (music), pack, comedy, dd5.1, Hip/Hop + - name: re_replace + args: ["(?i)(Science Fiction)", "Science_Fiction"] + # input: crime, x264, 1080p, (music), pack, comedy, Science_Fiction, dd5.1, Hip/Hop - name: validate - args: "Action, Adventure, Crime, Comedy, War" - # result: crime, comedy + args: "Action, Adventure, Crime, Comedy, Science_Fiction, War" + # result: crime, comedy, scence fiction ``` ## dateparse