def formatArticle(article): tiny_url = app_utils.generateTinyURL(article.URL) if profile['prefers_email']: return "<li><a href=\'%s\'>%s</a></li>" % (tiny_url, article.title) else: return article.title + " -- " + tiny_url