Commit caa665d
authored
feat(oiiotool): --eraseattrib:fromfile=1 (#4763)
Extended eraseattrib to be able to read regex patterns from a file,
one per line, with `--eraseattrib:fromfile=1 filename`.
Erases all metadata attribute fields that match.
Added a new test to `oiiotool-attribs` which has been verified
painstakenly to be working!
Also tried running the command directly from dist/bin and verified with
`oiiotool --info -v`.
More detail on the motivation:
It's common in a studio to have tools insert all sorts of metadata into files as they're rendered, etc. But a lot of that are things that SHOULD NOT leave the facility -- like security issues from internal pathnames or network info, or secrets like plot details revealed by sequence or character names. So generally you want to scrub the metadata from the final images before they are shipped to the client or to marketing or whatever.
oiiotool's --eraseattrib is handy for this, but it takes a single regex. But we were thinking that:
- You may have several patterns to fully describe the metadata you want to be sure not to ship. This could be an unwieldy regex or a cluttered series of multiple --eraseattrib commands.
- That list of patterns may change over time, and it would be error prone to have to change it in every script that calls oiiotool.
- That list of patterns may need to be different per show.
We thought a solution to facilitate this might be a version of --eraseattrib that takes a filename that contains a list of regexes, one per line of the text file. So that master list of things to scrub could be maintained in a central place and not need to update every oiiotool-calling script in order to update it. Furthermore, you could have the command say something like
$ oiiotool ready_to_ship.exr --eraseattrib:fromfile=1 /blah/$SHOW/nometadata.txt -o clean.exr
to make a single command that allows per-show customization.
---------
Signed-off-by: Lydia Zheng <[email protected]>1 parent c4f01e7 commit caa665d
File tree
6 files changed
+88
-8
lines changed- src
- doc
- oiiotool
- testsuite/oiiotool-attribs
- ref
- src
6 files changed
+88
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2036 | 2036 | | |
2037 | 2037 | | |
2038 | 2038 | | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
2039 | 2046 | | |
2040 | 2047 | | |
2041 | 2048 | | |
| |||
2048 | 2055 | | |
2049 | 2056 | | |
2050 | 2057 | | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
2051 | 2065 | | |
2052 | 2066 | | |
2053 | 2067 | | |
| |||
4770 | 4784 | | |
4771 | 4785 | | |
4772 | 4786 | | |
4773 | | - | |
4774 | | - | |
4775 | | - | |
4776 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1494 | 1494 | | |
1495 | 1495 | | |
1496 | 1496 | | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
1497 | 1505 | | |
1498 | 1506 | | |
1499 | 1507 | | |
| |||
1503 | 1511 | | |
1504 | 1512 | | |
1505 | 1513 | | |
1506 | | - | |
1507 | | - | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
1508 | 1524 | | |
1509 | 1525 | | |
1510 | 1526 | | |
| |||
1516 | 1532 | | |
1517 | 1533 | | |
1518 | 1534 | | |
1519 | | - | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
1520 | 1544 | | |
1521 | 1545 | | |
1522 | 1546 | | |
| |||
1527 | 1551 | | |
1528 | 1552 | | |
1529 | 1553 | | |
| 1554 | + | |
| 1555 | + | |
1530 | 1556 | | |
1531 | 1557 | | |
1532 | 1558 | | |
| |||
6663 | 6689 | | |
6664 | 6690 | | |
6665 | 6691 | | |
6666 | | - | |
| 6692 | + | |
6667 | 6693 | | |
6668 | 6694 | | |
6669 | 6695 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
1 | 19 | | |
2 | 20 | | |
3 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
1 | 19 | | |
2 | 20 | | |
3 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments