| Total Complexity | 1 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | """ |
||
| 14 | 1 | class SDocCommand(BaseCommand): |
|
| 15 | """ |
||
| 16 | Generates the target document(s) |
||
| 17 | """ |
||
| 18 | 1 | name = 'sdoc' |
|
| 19 | |||
| 20 | 1 | 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 | 1 | def handle(self): |
|
| 35 | """ |
||
| 36 | Reads the arguments and starts SDoc application. |
||
| 37 | """ |
||
| 38 | 1 | self._io = SdocStyle(self.input, self.output) |
|
| 39 | |||
| 40 | 1 | sdoc = SDoc() |
|
| 41 | 1 | sdoc.io = self._io |
|
| 42 | 1 | sdoc.config_path = self.argument('config.cfg') |
|
| 43 | |||
| 44 | 1 | return sdoc.run_sdoc(self.argument('main.sdoc')) |
|
| 45 | |||
| 47 |