@@ -0,0 +1,1498 @@
+#!/usr/bin/env python3%0Aimport git%0Aimport json%0Afrom subprocess import run, PIPE%0Afrom pathlib import Path%0A%0A%0Adef decommify(name):%0A    return ' '.join(name.split(', ')%5B::-1%5D)%0A%0Ablacklist = %7B%0A    'dependabot%5Bbot%5D',%0A    %7D%0A%0Agit_root = Path(git.Repo('.', search_parent_directories=True).working_dir)%0Azenodo_file = git_root / '.zenodo.json'%0A%0Azenodo = json.loads(zenodo_file.read_text()) if zenodo_file.exists() else %7B%7D%0A%0Aorig_creators = zenodo.get('creators', %5B%5D)%0Acreator_map = %7Bdecommify(creator%5B'name'%5D): creator%0A               for creator in orig_creators%7D%0A%0Ashortlog = run(%5B'git', 'shortlog', '-ns'%5D, stdout=PIPE)%0Acounts = %5Bline.split('%5Ct', 1)%5B::-1%5D%0A          for line in shortlog.stdout.decode().split('%5Cn') if line%5D%0A%0Acommit_counts = %7B%7D%0Afor committer, commits in counts:%0A    commit_counts%5Bcommitter%5D = commit_counts.get(committer, 0) + int(commits)%0A%0A# Stable sort:%0A# Number of commits in reverse order%0A# Ties broken by alphabetical order of first name%0Acommitters = %5Bcommitter%0A              for committer, _ in sorted(commit_counts.items(),%0A                                         key=lambda x: (-x%5B1%5D, x%5B0%5D))%0A              if committer not in blacklist%5D%0A%0A# Tal to the top%0Afirst_author = 'Ross Blair'%0Aif committers%5B0%5D != first_author:%0A    committers.remove(first_author)%0A    committers.insert(0, first_author)%0A%0Acreators = %5B%0A    creator_map.get(committer, %7B'name': committer%7D)%0A    for committer in committers%0A    %5D%0A%0Azenodo%5B'creators'%5D = creators%0Azenodo_file.write_text(json.dumps(zenodo, indent=2) + '%5Cn')%0A

Add prep_zenodo.py