mirror of https://github.com/tLDP/python-tldp
initial configuration snippets
This commit is contained in:
parent
372ae734de
commit
a959db5485
|
@ -1,11 +1,21 @@
|
|||
#! /usr/bin/python
|
||||
# -*- coding: utf8 -*-
|
||||
|
||||
from ..utils import logger
|
||||
|
||||
from ..utils import logger, which
|
||||
from .common import SignatureChecker
|
||||
|
||||
|
||||
def uniconf(p):
|
||||
parser.add_argument('--docbook4xml-xsltproc', type=which,
|
||||
help='fully qualified path to xsltproc')
|
||||
parser.add_argument('--docbook4xml-html2text', type=which,
|
||||
help='fully qualified path to html2text')
|
||||
parser.add_argument('--docbook4xml-fop', type=which,
|
||||
help='fully qualified path to fop')
|
||||
parser.add_argument('--docbook4xml-dblatex', type=which,
|
||||
help='fully qualified path to dblatex')
|
||||
|
||||
|
||||
class Docbook4XML(SignatureChecker):
|
||||
formatname = 'DocBook XML 4.x'
|
||||
extensions = ['.xml']
|
||||
|
@ -31,5 +41,3 @@ class Docbook4XML(SignatureChecker):
|
|||
|
||||
#
|
||||
# -- end of file
|
||||
#
|
||||
# -- end of file
|
||||
|
|
|
@ -1,10 +1,21 @@
|
|||
#! /usr/bin/python
|
||||
# -*- coding: utf8 -*-
|
||||
|
||||
from ..utils import logger
|
||||
from ..utils import logger, which
|
||||
from .common import SignatureChecker
|
||||
|
||||
|
||||
def uniconf(p):
|
||||
parser.add_argument('--docbook5xml-xsltproc', type=which,
|
||||
help='fully qualified path to xsltproc')
|
||||
parser.add_argument('--docbook5xml-html2text', type=which,
|
||||
help='fully qualified path to html2text')
|
||||
parser.add_argument('--docbook5xml-fop', type=which,
|
||||
help='fully qualified path to fop')
|
||||
parser.add_argument('--docbook5xml-dblatex', type=which,
|
||||
help='fully qualified path to dblatex')
|
||||
|
||||
|
||||
class Docbook5XML(SignatureChecker):
|
||||
formatname = 'DocBook XML 5.x'
|
||||
extensions = ['.xml']
|
||||
|
|
|
@ -1,10 +1,23 @@
|
|||
#! /usr/bin/python
|
||||
# -*- coding: utf8 -*-
|
||||
|
||||
from ..utils import logger
|
||||
from ..utils import logger, which
|
||||
from .common import SignatureChecker
|
||||
|
||||
|
||||
def uniconf(p):
|
||||
parser.add_argument('--docbooksgml-jw', type=which,
|
||||
help='fully qualified path to jw')
|
||||
parser.add_argument('--docbooksgml-html2text', type=which,
|
||||
help='fully qualified path to html2text')
|
||||
parser.add_argument('--docbooksgml-openjade', type=which,
|
||||
help='fully qualified path to openjade')
|
||||
parser.add_argument('--docbooksgml-dblatex', type=which,
|
||||
help='fully qualified path to dblatex')
|
||||
parser.add_argument('--docbooksgml-collateindex', type=which,
|
||||
help='fully qualified path to collateindex')
|
||||
|
||||
|
||||
class DocbookSGML(SignatureChecker):
|
||||
formatname = 'DocBook SGML 3.x/4.x'
|
||||
extensions = ['.sgml']
|
||||
|
|
|
@ -4,11 +4,21 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
import os
|
||||
import argparse
|
||||
|
||||
from ..utils import logger, execute
|
||||
from .common import BaseDoctype, SignatureChecker
|
||||
|
||||
|
||||
def uniconf(p):
|
||||
parser.add_argument('--linuxdoc-sgml2html', type=str,
|
||||
help='fully qualified path to sgml2html')
|
||||
parser.add_argument('--linuxdoc-html2text', type=str,
|
||||
help='fully qualified path to html2text')
|
||||
parser.add_argument('--linuxdoc-htmldoc', type=str,
|
||||
help='fully qualified path to htmldoc')
|
||||
|
||||
|
||||
class Linuxdoc(BaseDoctype, SignatureChecker):
|
||||
formatname = 'Linuxdoc'
|
||||
extensions = ['.sgml']
|
||||
|
@ -18,6 +28,7 @@ class Linuxdoc(BaseDoctype, SignatureChecker):
|
|||
def platform_check(self):
|
||||
for tool in self.tools:
|
||||
assert hasattr(self.platform, tool)
|
||||
assert isexecutable(getattr(self.platform, tool))
|
||||
return True
|
||||
|
||||
def create_txt(self):
|
||||
|
|
Loading…
Reference in New Issue