blot.utils¶
-
blot.utils.
generate_cloud
(items, minsize=0.8, maxsize=1.0)¶ From a list of Aggregates return a list of tuples containing each Aggregate and its relative “size” in a tag cloud normalized to 1.0.
This is useful for rendering into a <span> tag’s style attribute to affect font-size.
-
blot.utils.
get_values
(asset, key, pattern='(*.)')¶ Returns values extracted from a metadata property of an asset named by key.
-
blot.utils.
pathurl
(path)¶ Returns a nicer URL for the path on disk for webservers that treat URLs missing a filename to be requesting index.html
If the path ends in /index.html, make it end with /.
Make every path absolute.
-
blot.utils.
render
(path, template, context)¶ Uses Jinja2 to render a template relative to the path with the given context.