Updated xmp_rating example
This commit is contained in:
parent
1e053aa708
commit
46738d05b2
@ -7,6 +7,7 @@ from typing import Callable
|
||||
|
||||
from osxphotos import ExportResults, PhotoInfo
|
||||
from osxphotos.exiftool import ExifTool
|
||||
from osxphotos.utils import normalize_unicode
|
||||
|
||||
# Update this for your custom keyword to rating mapping
|
||||
RATINGS = {
|
||||
@ -17,6 +18,9 @@ RATINGS = {
|
||||
"★★★★★︎": 5,
|
||||
}
|
||||
|
||||
# normalize the unicode to match what osxphotos uses internally
|
||||
RATINGS = {normalize_unicode(k): v for k, v in RATINGS.items()}
|
||||
|
||||
|
||||
def rating(photo: PhotoInfo, results: ExportResults, verbose: Callable, **kwargs):
|
||||
"""Call this with `osxphotos export /path/to/export --post-function xmp_rating.py::rating`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user