View Single Post
Old 01-08-2025, 07:19 AM   #18
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,641
Karma: 7908443
Join Date: Sep 2020
Device: none
I thought the template used for titles would run fine for authors, but I couldn't make it work. Here's what I want to automate via Action Chains:

One click executes a search and replace to change 'john smith' to 'John Smith'.

Tried this in bulk metadata dialog:

Spoiler:
python:
def evaluate(book, context):
import re
nt = []
for w in re.split(r'([ _.()])', book.get('author')):
nt.append(w.capitalize())
return ''.join(nt)

@chaley, I wonder if such a feature would be implementable/welcome in the bulk MDE, similar to the title case functionality.

edit: just found how to do this, without a template, in Bulk MDE: it's 'Apply function after replace'

Last edited by Comfy.n; 01-08-2025 at 07:33 AM.
Comfy.n is offline   Reply With Quote