Total Complexity | 1 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | """ |
||
14 | class SDocCommand(BaseCommand): |
||
15 | """ |
||
16 | Generates the target document(s) |
||
17 | """ |
||
18 | name = 'sdoc' |
||
19 | |||
20 | arguments = [ |
||
21 | { |
||
22 | 'name': 'config.cfg', |
||
23 | 'description': 'The name of the config file', |
||
24 | 'required': True |
||
25 | }, |
||
26 | { |
||
27 | 'name': 'main.sdoc', |
||
28 | 'description': "The SDoc file", |
||
29 | 'required': True |
||
30 | } |
||
31 | ] |
||
32 | |||
33 | # ------------------------------------------------------------------------------------------------------------------ |
||
34 | def handle(self): |
||
35 | """ |
||
36 | Reads the arguments and starts SDoc application. |
||
37 | """ |
||
38 | self._io = SdocStyle(self.input, self.output) |
||
39 | |||
40 | sdoc = SDoc() |
||
41 | sdoc.io = self._io |
||
42 | sdoc.config_path = self.argument('config.cfg') |
||
43 | |||
44 | return sdoc.run_sdoc(self.argument('main.sdoc')) |
||
45 | |||
47 |