@@ -63,12 +63,12 @@ def get_device_class(name: str):
6363 return DEVICE_CLASSES [name .lower ()]
6464 except KeyError :
6565 raise RuntimeError (
66- f' Invalid device class `{ name } `. Available options: '
67- f' { list (DEVICE_CLASSES .keys ())} '
66+ f" Invalid device class `{ name } `. Available options: "
67+ f" { list (DEVICE_CLASSES .keys ())} "
6868 )
6969
7070
71- @app .command (help = ' Display the available devices' )
71+ @app .command (help = " Display the available devices" )
7272def show (
7373 device_class : Optional [str ] = DEVICE_CLASS_ARGUMENT ,
7474 verbose : bool = VERBOSE_OPTION
@@ -109,7 +109,7 @@ def config_device_class(device: Device) -> dict:
109109 return choices
110110
111111
112- @app .command (help = ' Create a configuration `yaml` file.' )
112+ @app .command (help = " Create a configuration `yaml` file." )
113113def config (output : Path = DEFAULT_CONFIG_PATH_OPTION ) -> dict :
114114 config = {}
115115 for name , device_class in DEVICE_CLASSES .items ():
@@ -133,20 +133,20 @@ def get_config(path: Path = DEFAULT_CONFIG_PATH) -> dict:
133133 return Config .from_yaml (path )
134134
135135
136- @app .command (help = ' Record data from the configured devices' )
136+ @app .command (help = " Record data from the configured devices" )
137137def record (
138138 seconds : int = typer .Argument (None , help = "Number of seconds to record" ),
139139 config_path : Optional [Path ] = DEFAULT_CONFIG_PATH_OPTION ,
140140 output_folder : Optional [Path ] = DEFAULT_OUTPUT_FOLDER_OPTION ,
141141 ):
142142 config = get_config (config_path )
143143 recorder = Recorder (config , output_folder )
144- if typer .confirm (' Recording ready, start?' , default = True ):
144+ if typer .confirm (" Recording ready, start?" , default = True ):
145145 output_folder = recorder (seconds = seconds )
146- typer .echo (f' Recording finished, data saved to { output_folder } ' )
146+ typer .echo (f" Recording finished, data saved to { output_folder } " )
147147
148148
149- @app .command (help = ' Test device recording' )
149+ @app .command (help = " Test device recording" )
150150def test (
151151 device_class : Optional [str ] = DEVICE_CLASS_ARGUMENT ,
152152 device_id : Optional [int ] = DEVICE_ID_ARGUMENT ,
@@ -184,6 +184,9 @@ def test(
184184 recorder = Recorder (config , output_folder )
185185 output_folder = recorder (seconds = 5 )
186186
187+ @app .command (help = 'Listen to an external command to start recording' )
188+ def listen (to : str ):
189+ raise NotImplementedError (f"Listen to { to } is not implemented." )
187190
188191def main ():
189192 # Launch the command line application
0 commit comments