-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wishlist: Check certain files in a folder against different policies according to filename matching #193
Comments
+1 |
1 similar comment
+1 |
I think this may be possible to accommodate with the <policy type="or" name="Does this get Morgan's approval?">
<policy type="and" name="Valid Preservation?">
<rule name="Is preservation thing?" value="filename" operator="ends-with">_pm.mkv</rule>
<...other rules...>
</policy>
<policy type="and" name="Valid Mezzanine?">
<rule name="Is mezzanine thing?" value="filename" operator="ends-with">_mz.mov</rule>
<...other rules...>
</policy>
<policy type="and" name="Valid Access?">
<rule name="Is access thing?" value="filename" operator="ends-with">_am.mp4</rule>
<...other rules...>
</policy>
<policy type="and" name="Valid GB file?">
<rule name="Is it an mxf thing?" value="filename" operator="ends-with">_ohyeah.mxf</rule>
<...other rules...>
</policy>
</policy> |
I think this could be a good solution! |
I'll give this a shot, thanks! |
Don't try, it will not work (Dave said "would require the tests to add a contains or ends-with function"). |
OK, let's try to see technically what we need.
Adding operators related to string manipulation:Same as Dave idea about Result in case none of the name checks fitsWhat is the expect outcome in case none of the name checks fits? Merging policies from one "super-policy"An issue I see for some time is when we need to rely on other policies, no need of such complex request, e.g. we can have a "Is NTSC" policy in the public policies list, and people could reuse it without wanting to have to change all copies of the policy merged in private policies in case there is an update to this policy, we should be able to "import" a policy, e.g.: <policy type="or" name="Does this get Morgan's approval?">
<policy type="and" name="Valid Preservation?">
<rule name="Is preservation thing?" value="filename" operator="ends-with">_pm.mkv</rule>
<policy import="MKV Preservation Copy" />
</policy>
<policy type="and" name="Valid Mezzanine?">
<rule name="Is mezzanine thing?" value="filename" operator="ends-with">_mz.mov</rule>
<policy import="MOV Mezzanine Copy" />
</policy>
</policy> (note: I don't like to rely on the policy name, we may have to add also an UMID per policy) technically, I think it is only doable when we load the XML, before the policy is applied (XSL), because the XSL processor has no clue about external policies, and it is not complex (I catch the "import" attribute, and replace the element by the other policy). |
In my opinion, XSLT should allow such string manipulation. |
Related to #176, but for the GUI version. Allow the using to run multiple policies on a single folder, but checking specific files on the folder against specific policies using character or extension matching. For example, within one folder:
files containing "_pm.mkv" are checked against the "MKV Preservation Copy" policy
files containing "_mz.mov" are checked against the "MOV Mezzanine Copy" policy
files containing "*_am.mp4" are checked against the "MP4 Access Copy" policy
The text was updated successfully, but these errors were encountered: