# Example code:

from Products.PythonScripts.standard import html_quote

# Images Folder name
IMAGES = 'images'

if context.portal_type != 'COREBlog2':
    print "not COREBlog2"
    return printed

for entry in context.objectValues(['COREBlogEntry']):
    body = entry.getBody()
    if body.find('<img src') != -1:
	print '<a href="%s">%s</a>' % (entry.id, entry.id)
	for line in body.splitlines():
	    if line.find('<img src') != -1:
		print html_quote(line) + "<br/>"

return printed
