python script to generate pubs page