Skip to content

Commit

Permalink
Sort within frequency groups (by last name / venue id)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbollmann committed Jan 10, 2025
1 parent 9d79fd5 commit 8a88c9d
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions bin/create_hugo_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,12 +347,21 @@ def export_people(anthology, outdir, dryrun):
"full": cname.as_full(),
"slug": person_id,
"papers": [paper.full_id for paper in papers],
"coauthors": anthology.people.find_coauthors_counter(
person, include_volumes=False
).most_common(),
"venues": Counter(
venue for paper in papers for venue in paper.venue_ids
).most_common(),
"coauthors": sorted(
anthology.people.find_coauthors_counter(
person, include_volumes=False
).most_common(),
key=lambda item: (
-item[1],
anthology.people[item[0]].canonical_name.last,
),
),
"venues": sorted(
Counter(
venue for paper in papers for venue in paper.venue_ids
).most_common(),
key=lambda item: (-item[1], item[0]),
),
}
if len(person.names) > 1:
data["variant_entries"] = []
Expand Down

0 comments on commit 8a88c9d

Please sign in to comment.