From 5adbb9af4ce2af4d9d27f7eb07a0c44f2a6944cc Mon Sep 17 00:00:00 2001 From: "Martin A. Brown" Date: Thu, 11 Feb 2016 09:14:58 -0800 Subject: [PATCH] removing the output elements from sources.py --- tldp/sources.py | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) diff --git a/tldp/sources.py b/tldp/sources.py index 3029b04..a4c8a1d 100644 --- a/tldp/sources.py +++ b/tldp/sources.py @@ -9,11 +9,6 @@ import logging from .utils import logger from .guess import guess, knownextensions -# class SourceTree(object): -# -# def __init__(self, root, config): -# pass - class SourceDir(object): @@ -73,46 +68,4 @@ class SourceDocument(object): def doctype(self): return guess(self.filename) - -class OutputDocument(object): - - formats = {'pdf': '.pdf', - 'txt': '.txt', - 'html': '.html', - 'htmls': '-single.html', } - - def __init__(self, filename): - pass - - @property - def txt(self): - return os.path.join(self.dirname, self.stem, '.txt') - - -class OutputDir(object): - - def __init__(self, dirname): - self.dirname = os.path.abspath(dirname) - self.parent = os.path.dirname(dirname) - self.stem = os.path.basename(dirname) - self.members = list() - - def mkdir(self): - if not os.path.exists(self.parent): - raise OSError("Missing parent directory: " + self.parent) - os.mkdir(self.dirname) - return os.path.exists(self.dirname) - - @property - def members(self): - return os.path.exists(self.dirname) - - @property - def exists(self): - return os.path.exists(self.dirname) - - @property - def isComplete(self): - return all(self.pdf, self.html, self.htmls, self.txt) - # -- end of file