App-LabRecorder icon indicating copy to clipboard operation
App-LabRecorder copied to clipboard

LabRecorderCLI.exe ignores searchstr parameter

Open sherdim opened this issue 1 year ago • 0 comments

In the help example for clirecorder https://github.com/labstreaminglayer/App-LabRecorder/blob/84b9a6c3af077ffdf448acc4dcf52a222a961f8d/src/clirecorder.cpp#L10 there is a statement, which in console looks:

  LabRecorderCLI.exe foo.xdf 'type="EEG"'  'host="LabPC1" or host="LabPC2"'

but resolve_bypred accepts hostname, ex.:

  pylsl.resolve_bypred("hostname='LabPC1'", timeout=5)

So, IMO example statement should be corrected!

My testing on host "himik":

  1. 'hostname="himik"' (as in example - single quotes outer, double around value) - FAIL, matches anything, print in stdout as double single: ''hostname=himik''
  2. 'hostname="himik"' - FAIL, matches anything, print in stdout ''hostname="himik"''
  3. "hostname='himik'" - WORK, stdout: ... matching 'hostname='himik''
  4. "hostname=himik" - FAIL, matched no stream!
  5. "hostname='himik'" - FAIL, matches anything, print in stdout '"hostname='himik'"'
  6. "host='himik'" - FAIL, stdout: "host='himik'" matched no stream! (host is not LSL property)

So, ONLY double quotes searchstr with a values in single quotes are able to work in Windows console.

complex query "hostname='himik' and type='EEG'" works.

Related issue: 99

The same behavior for LabRecorderCLI.exe 1.16.2 and 1.16.4 in Windows 10, in standard command console.

sherdim avatar Dec 16 '24 08:12 sherdim