#!/usr/bin/env python3 # Gallimaufry of Whits homepage from html.parser import HTMLParser from itertools import islice from re import compile from time import gmtime, strftime unescape = HTMLParser().unescape item = compile('''(?msx) ([0-9]{4}/[^<]+) .*? (.*?) .*? ]+>(.*?) ''') year = strftime('%Y', gmtime()) print('') print('') print('Gallimaufry of Whits: a weblog by Sean B. Palmer') print('') print('' % year) print('') print('

Subscribe') print('· Archives' % year) print('') print('

Gallimaufry of Whits

') print('') with open("feed.atom") as f: text = f.read() for (path, title, content) in item.findall(text): print('

%s

' % (path, title)) print(unescape(content)) print('')