Mercurial > piecrust2
view piecrust/formatting/base.py @ 142:0bdd938d6b9f
Better date/time handling for pages:
- Date can be specified in the page config.
- Fall back to timestamp 0 (which is fixed) instead of the timestamp of
the file (which could vary).
Sources can return additional config values to merge with the page's
YAML front matter.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 29 Nov 2014 18:33:29 -0800 |
parents | f485ba500df3 |
children | 7d868afc6791 |
line wrap: on
line source
PRIORITY_FIRST = -1 PRIORITY_NORMAL = 0 PRIORITY_LAST = 1 class Formatter(object): FORMAT_NAMES = None OUTPUT_FORMAT = None def __init__(self): self.priority = PRIORITY_NORMAL def initialize(self, app): self.app = app def render(self, format_name, txt): raise NotImplementedError()