Test Failed
Push — master ( 728016...1ac98c )
by P.R.
01:34
created

SDocCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
dl 0
loc 21
ccs 0
cts 7
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 11 1
1
"""
2
SDoc
3
4
Copyright 2016 Set Based IT Consultancy
5
6
Licence MIT
7
"""
8 1
from sdoc.SDoc import SDoc
9 1
from sdoc.command.BaseCommand import BaseCommand
10 1
from sdoc.style.SdocStyle import SdocStyle
11
12
13
class SDocCommand(BaseCommand):
14
    """
15
    Generates the target document(s)
16
17
    sdoc
18
        {config.cfg : The name of the config file}
19
        {main.sdoc  : The SDoc file}
20
    """
21
22
    # ------------------------------------------------------------------------------------------------------------------
23
    def handle(self):
24
        """
25
        Reads the arguments and starts SDoc application.
26
        """
27
        self.output = SdocStyle(self.input, self.output)
28
29
        sdoc = SDoc()
30
        sdoc.io = self.output
31
        sdoc.config_path = self.input.get_argument('config.cfg')
32
33
        return sdoc.run_sdoc(self.input.get_argument('main.sdoc'))
34
35
# ----------------------------------------------------------------------------------------------------------------------
36