N0ury/dmm_util

Make the commands clearer and less ambiguous

tdjastrzebski opened this issue · 7 comments

recordings list does not seem to work anymore. The problem may be caused by command grammar ambiguity.
recordings list may be interpreted either as a list request or download request of the recording named 'list'.
Syntax to consider:
... -p Com1 list recordings
... -p Com1 get recording 'name'
... -p Com1 get measurement 'name'
... -p Com1 set company
The key thing: command is a verb followed by object.

Then another ambiguity to solve: get recording 1
"1" may indicate both index and recoding name.

N0ury commented

In the meantime recordings list works fine for me
Can you copy-paste the exact command and the error message?

Never mid, this was some other problem but the command grammar is ambiguous

N0ury commented

@tdjastrzebski A new version is available in the new_syntax branch
Can you please take a look at it, and tell me what you think about it.
Does it meet your expectations?

This new ver 0.3 commnad syntax looks to me way better and more 'natural'.

  1. I would consider using Ockham's razor and eliminating display command. get current could be used instead.
  2. My spellchecker (VS Code + Code Spell Checker add-in) spotted some spelling errors.
N0ury commented

@tdjastrzebski Thanks for testing.
You are improving greatly the utility.
I have added the get current command.
It's not yet committed.
Unfortunately, I work in command line mode with a text editor (vim). So I don't have any spell checker.
It would be nice if you could paste the errors you get.

PR created

  1. It is unclear to me what list all and show names do.
  2. You have get saved_minmax, get saved_peak and get saved_measurements
    but list minmax, list peak and list all. I would either add saved_ everywhere or remove it.
N0ury commented

It's all done in commit 57b6f1f
It's now in master
I'll put a release 0.3.3 later