Example #1
0
	def test_autoP(self):
		t = ''' 
				This is a sequence of
				stories 
				
				with a great charm
				vale
		'''
		print BControl.autoP(t)
Example #2
0
def getBlitemFromRequest(key, value, labels):
		slug = key[3:]
		typex = key[:2]
		blitem = {}
		blitem['t'] = typex
		blitem['s'] = slug
		if BControl.isMultitext(typex):
			value = BControl.autoP(value)
		elif BControl.isMp3(typex):
			song = Song()
			song.load(value)
			value = song.dumpSong()
		elif BControl.isImage(typex):
			value = ObjectId(value)	

		blitem['v'] = value
		blitem['l'] = labels.get(slug)
		return blitem