view piecrust/formatting/base.py @ 367:734f2abf361c

config: Add method to deep-copy a config and validate its contents. Deep-copying will be problematic if non-basic types are in there, so there's a new method to check that this is OK.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 03 May 2015 18:42:29 -0700
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()