示例#1
0
def createPost():
	'''
	Create posts from facts fetched and sanitized to remove unwanted characters
	'''
	facts = sanitizeFacts()
	agent = createClient()
	blog = "tumblr blog name"
	for id, content in facts.iteritems():
		agent.create_text(blog, state="queue", body= content +"\n "+ id, tags=['facts', 'TIL', 'todayilearned'],)
示例#2
0
def facts(posts=None):
	return render_template('facts.html', posts=sanitizeFacts(), title = 'index')