comparison piecrust/publishing/base.py @ 613:e2e955a3bb25

publish: Add publish command. * Add `shell` publisher. * Refactor admin panel's publishing backend to use that, along with the new PID file support.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 04 Feb 2016 08:05:03 -0800
parents
children 8f9c0bdb3724
comparison
equal deleted inserted replaced
612:2edaefcb82cd 613:e2e955a3bb25
1
2
3 class PublishingContext(object):
4 def __init__(self):
5 self.custom_logging_file = None
6
7
8 class Publisher(object):
9 def __init__(self, app, target):
10 self.app = app
11 self.target = target
12 self.is_using_custom_logging = False
13 self.log_file_path = None
14
15 def getConfig(self):
16 return self.app.config.get('publish/%s' % self.target)
17
18 def getConfigValue(self, name):
19 return self.app.config.get('publish/%s/%s' % (self.target, name))
20
21 def run(self, ctx):
22 raise NotImplementedError()
23