blot.assets.series

class blot.assets.series.Series(key='parent', pattern='(.*)', part_key='filename', part_pattern='(.*)')

Bases: blot.assets.base.Aggregator

Aggregator which attempts to automatically discover multi-part content series.

Like other Aggregators the Series processor generates a new set of assets based on values extracted from a specified key of some target assets. However, the Series processor will only generate new assets for aggregate values found across two or more target assets.

For each Series generated a number of metadata properties are added to target assets. These properties contain the first, last, previous and next target assets in the Series. This allows a theme to construct navigation between each asset in the Series.

In addition to the normal aggregation metadata property, the Series processor requires direction for deriving the order of assets in the Series. So the part_key and part_pattern are used to select this value from the metadata of target assets. If the extracted part value is ‘index.html’ it will automatically be converted to 1, putting it as the first part in the series.

finish(context, series)
get_part_number(asset)

derive the part number of an asset

process_aggregate(series, asset)

generate a title for the series itself