Passed
Push — master ( 1ac98c...ed1e15 )
by P.R.
01:49
created

SDocCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 9 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
11
12 1
class SDocCommand(BaseCommand):
13
    """
14
    Generates the target document(s)
15
16
    sdoc
17
        {config.cfg : The name of the config file}
18
        {main.sdoc  : The SDoc file}
19
    """
20
21
    # ------------------------------------------------------------------------------------------------------------------
22 1
    def handle(self):
23
        """
24
        Reads the arguments and starts SDoc application.
25
        """
26 1
        sdoc = SDoc()
27 1
        sdoc.io = self.output
28 1
        sdoc.config_path = self.input.get_argument('config.cfg')
29
30 1
        return sdoc.run_sdoc(self.input.get_argument('main.sdoc'))
31
32
# ----------------------------------------------------------------------------------------------------------------------
33