15.3.35. crate_anon.crateweb.extra.salutation¶
Copyright (C) 2015-2018 Rudolf Cardinal (rudolf@pobox.com).
This file is part of CRATE.
CRATE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
CRATE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with CRATE. If not, see <http://www.gnu.org/licenses/>.
-
crate_anon.crateweb.extra.salutation.
forename_surname
(forename: Union[str, NoneType], surname: Union[str, NoneType]) → str[source]¶ For use when reporting names.
-
crate_anon.crateweb.extra.salutation.
get_initial_surname_tuple_from_string
(s: str) → Tuple[str, str][source]¶ Parses a name-like string into plausible parts. Try:
get_initial_surname_tuple_from_string(“AJ VAN DEN BERG”) get_initial_surname_tuple_from_string(“VAN DEN BERG AJ”) get_initial_surname_tuple_from_string(“J Smith”) get_initial_surname_tuple_from_string(“J. Smith”) get_initial_surname_tuple_from_string(“Smith J.”) get_initial_surname_tuple_from_string(“Smith JKC”) get_initial_surname_tuple_from_string(“Dr Bob Smith”) get_initial_surname_tuple_from_string(“LINTON H C (PL)”)
-
crate_anon.crateweb.extra.salutation.
salutation
(title: Union[str, NoneType], forename: Union[str, NoneType], surname: Union[str, NoneType], sex: str = '', assume_dr: bool = False) → str[source]¶ For salutations: Dear …
-
crate_anon.crateweb.extra.salutation.
title_forename_surname
(title: Union[str, NoneType], forename: Union[str, NoneType], surname: Union[str, NoneType], always_title: bool = False, sex: str = '', assume_dr: bool = False) → str[source]¶ - When reporting names:
- Prof. John Smith John Smith Prof. Smith
etc.