File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,12 @@ def _run_cffconvert(command):
43
43
error_message = stderr .decode ("utf-8" ).strip ()
44
44
raise RuntimeError (f"cffconvert command failed: { error_message } " )
45
45
46
+ def _make_standard_name (name ):
47
+ '''Take string input like LASTNAME, FIRSTNAME and return FIRSTNAME LASTNAME without comma'''
48
+ lastfirst = name .split (', ' )
49
+ firstlast = lastfirst [::- 1 ]
50
+ standard = ' ' .join (firstlast )
51
+ return standard
46
52
47
53
def generate_repo_dicts (all_items ):
48
54
@@ -60,7 +66,7 @@ def generate_repo_dicts(all_items):
60
66
cookbook_title = citation_dict ["title" ]
61
67
description = citation_dict ["description" ]
62
68
creators = citation_dict ["creators" ]
63
- names = [creator .get ("name" ) for creator in creators ]
69
+ names = [_make_standard_name ( creator .get ("name" ) ) for creator in creators ]
64
70
authors = ", " .join (names )
65
71
66
72
gallery_info_url = f"https://raw.githubusercontent.com/ProjectPythia/{ repo } /main/_gallery_info.yml"
You can’t perform that action at this time.
0 commit comments