From dab2f1f8b1298feb637c194ed40ca89fb009a9d9 Mon Sep 17 00:00:00 2001 From: "Martin A. Brown" Date: Wed, 17 Feb 2016 00:17:49 -0800 Subject: [PATCH] adding support for documents to know their status --- tldp/outputs.py | 1 + tldp/sources.py | 1 + 2 files changed, 2 insertions(+) diff --git a/tldp/outputs.py b/tldp/outputs.py index c23e086..7792ea7 100644 --- a/tldp/outputs.py +++ b/tldp/outputs.py @@ -55,6 +55,7 @@ class OutputDirectory(OutputNamingConvention): logger.info("%s creating output directory %s.", self.stem, dirname) os.mkdir(dirname) self.fileset = getfileset(self.dirname) + self.status = 'output' super(OutputDirectory, self).__init__(self.stem, self.dirname) def clean(self): diff --git a/tldp/sources.py b/tldp/sources.py index 61f0428..ee7d904 100644 --- a/tldp/sources.py +++ b/tldp/sources.py @@ -85,6 +85,7 @@ class SourceDocument(object): logger.debug("Found existing %s", self.filename) self.doctype = self._doctype() + self.status = 'source' self.dirname, self.basename = os.path.split(self.filename) self.stem, self.ext = os.path.splitext(self.basename) self.resources = False # -- assume no ./images/, ./resources/