Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions generate_rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,17 @@ def pep_abstract(full_path: Path) -> str:

def main():
# get the directory with the PEP sources
in_dir = Path(__file__).parent

# get the output directory for target HTML files
out_dir = Path(__file__).parent / "build"

# get list of peps with creation time (from "Created:" string in pep source)
peps_with_dt = sorted((pep_creation(path), path) for path in out_dir.glob("pep-????.*"))
# get list of source peps
peps = list(in_dir.glob('pep-[0-9][0-9][0-9][0-9].txt'))
peps.extend(in_dir.glob('pep-[0-9][0-9][0-9][0-9].rst'))

# sort peps by creation time (from "Created:" string in pep source)
peps_with_dt = sorted((pep_creation(path), path) for path in peps)

# generate rss items for 10 most recent peps
items = []
Expand Down