Ejemplo n.º 1
0
def loadBlogs(filename):
	print 'read in xml...'
	records = inout.loadBlogs(filename)
	print 'instantiate blog objects from imported records...'
	blgs = [tumblr.opendump(rec) for rec in records]
	# replace string identifiers in image sources lists
	# with newly created Blog instances
	#imgs = picture.pictures()
	#for p in imgs:
		#p.clean_sources()
	return blgs
Ejemplo n.º 2
0
def load(filename='blogs.xml', images=False):
	records = inout.loadBlogs(filename)
	print 'instantiate blog objects from imported records...'
	print ['Ignore', 'Instantiate'][images], 'image references'
	blgs = [opendump(rec,images=images) for rec in records]
	print 'Blog instances:', len(Blog.blogs)