move code in to library; add liveblog2pubsub.py