Skip to content

Is there a way to filter by category: 1320 and assign the normalized string as the folder name during export? #1677

Answered by RhetTbull
digikeith asked this question in Q&A
Discussion options

You must be logged in to vote

Try this version. Apparently _db_searchinfo can be None (that is the photo had no categories assigned).

""" Example showing how to use a custom function for osxphotos {function} template
    Use:  osxphotos export /path/to/export --filename "{function:/path/to/template_function.py::example}"

    You may place more than one template function in a single file as each is called by name using the {function:file.py::function_name} format

    (1) get the search_info for the photo passed into the function
    (2) find the category (which may or may not be present)
    (3) format the value you want then return that or None if not found.

    Call with --directory "{function:template_shared.py::…

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@digikeith
Comment options

Comment options

You must be logged in to vote
1 reply
@RhetTbull
Comment options

Comment options

You must be logged in to vote
3 replies
@digikeith
Comment options

@RhetTbull
Comment options

Answer selected by digikeith
@digikeith
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants