Minor usability enhancement to template to auto-populate default for author_email based on supplied values for author_given_names and author_family_names, based on mapping names to lower case, joining with . and appending @ucl.ac.uk.
For example
author_given_names = "Eval Lu" and author_family_names = "Ator" will give suggested default author_email = "eva.lu.ator@ucl.ac.uk",
author_given_names = "Patrick" and author_family_names = "Roddy" will give suggested default author_email = "patrick.roddy@ucl.ac.uk".
I've stuck with joining full given names rather than extracting just initials with something like [name[0] for name in cookiecutter.author_given_names.lower().split()] even though using just initials seems more common in people's choices for 'friendly' UCL emails from a quick check of emails of contributors here, partly for simplicity but also as I guess manually removing additional characters from name is slightly easier than manually adding characters back in, but could switch this.
Minor usability enhancement to template to auto-populate default for
author_email
based on supplied values forauthor_given_names
andauthor_family_names
, based on mapping names to lower case, joining with.
and appending@ucl.ac.uk
.For example
author_given_names = "Eval Lu"
andauthor_family_names = "Ator"
will give suggested defaultauthor_email = "eva.lu.ator@ucl.ac.uk"
,author_given_names = "Patrick"
andauthor_family_names = "Roddy"
will give suggested defaultauthor_email = "patrick.roddy@ucl.ac.uk"
.I've stuck with joining full given names rather than extracting just initials with something like
[name[0] for name in cookiecutter.author_given_names.lower().split()]
even though using just initials seems more common in people's choices for 'friendly' UCL emails from a quick check of emails of contributors here, partly for simplicity but also as I guess manually removing additional characters from name is slightly easier than manually adding characters back in, but could switch this.