comparison piecrust/sources/prose.py @ 242:f130365568ff

internal: Code reorganization to put less stuff in `sources.base`. Interfaces that sources can implement are in `sources.interfaces`. The default page source is in `sources.default`. The `SimplePageSource` is gone since most subclasses only wanted to do *some* stuff the same, but *lots* of stuff slightly different. I may have to revisit the code to extract exactly the code that's in common.
author Ludovic Chabant <ludovic@chabant.com>
date Wed, 18 Feb 2015 18:35:03 -0800
parents e61fbae61402
children 4b1019bb2533
comparison
equal deleted inserted replaced
241:85a6c7ba5e3b 242:f130365568ff
1 import os 1 import os
2 import os.path 2 import os.path
3 import logging 3 import logging
4 from piecrust.sources.base import ( 4 from piecrust.sources.base import MODE_CREATING
5 SimplePageSource, SimplePaginationSourceMixin, 5 from piecrust.sources.default import DefaultPageSource
6 MODE_CREATING)
7 6
8 7
9 logger = logging.getLogger(__name__) 8 logger = logging.getLogger(__name__)
10 9
11 10
12 class ProseSource(SimplePageSource, 11 class ProseSource(DefaultPageSource):
13 SimplePaginationSourceMixin):
14 SOURCE_NAME = 'prose' 12 SOURCE_NAME = 'prose'
15 13
16 def __init__(self, app, name, config): 14 def __init__(self, app, name, config):
17 super(ProseSource, self).__init__(app, name, config) 15 super(ProseSource, self).__init__(app, name, config)
18 self.config_recipe = config.get('config', {}) 16 self.config_recipe = config.get('config', {})