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

SDoc1Command   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
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 18
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 8 1
1
"""
2
SDoc
3
"""
4 1
from sdoc.SDoc import SDoc
5 1
from sdoc.command.BaseCommand import BaseCommand
6
7
8 1
class SDoc1Command(BaseCommand):
9
    """
10
    Parses a SDoc1 document and generates a SDoc2 document
11
12
    sdoc1
13
        {main.sdoc    : The SDoc1 document to parse}
14
        {output.sdoc2 : The generated SDoc document}
15
    """
16
17
    # ------------------------------------------------------------------------------------------------------------------
18 1
    def handle(self):
19
        """
20
        Reads the arguments and starts SDoc1 application.
21
        """
22 1
        sdoc = SDoc()
23 1
        sdoc.io = self.output
24
25 1
        return sdoc.run_sdoc1(self.input.get_argument('main.sdoc'), self.input.get_argument('output.sdoc2'))
26
27
# ----------------------------------------------------------------------------------------------------------------------
28