Skip to content

Commit

Permalink
references, referenced_byのソートを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
aazw committed Jan 13, 2025
1 parent a4fc614 commit fe917ad
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/apps/create_duckdb_persistent_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,12 @@ def main(dbfile: str, rfc_index: str, rfc_referencing_urls: str, verbose: bool):
references = rfcReferences.get(doc_id, None)
referenced_by = rfcRerencedBy.get(doc_id, None)

if references:
references = sorted(references, key=lambda x: int(re.sub(r"^RFC0*", "", x)))

if referenced_by:
referenced_by = sorted(referenced_by, key=lambda x: int(re.sub(r"^RFC0*", "", x)))

rfc_entries_nomalized.append(
{
"doc_id": doc_id,
Expand Down

0 comments on commit fe917ad

Please sign in to comment.