diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/piecrust/publishing/base.py	Thu Feb 04 08:05:03 2016 -0800
@@ -0,0 +1,23 @@
+
+
+class PublishingContext(object):
+    def __init__(self):
+        self.custom_logging_file = None
+
+
+class Publisher(object):
+    def __init__(self, app, target):
+        self.app = app
+        self.target = target
+        self.is_using_custom_logging = False
+        self.log_file_path = None
+
+    def getConfig(self):
+        return self.app.config.get('publish/%s' % self.target)
+
+    def getConfigValue(self, name):
+        return self.app.config.get('publish/%s/%s' % (self.target, name))
+
+    def run(self, ctx):
+        raise NotImplementedError()
+