# Syntax
$ [command] [key] [value] [option]
# Example
$ om name Marcus
$ om name
Marcus
$ om /address/street Blackwall Way
$ om /address/street
Blackwall Way
$ om /address
street=Blackwall Way# Syntax
$ [command] [key] [value] [option]# Syntax
$ om [command] [args] [kwargs]Interesting idea.
My initial goal was for the cli to be a limited, quick way of adding and viewing metadata, possibly searching for it too, and inheritance could be a mere flag. As the command-line overall is less capable than Python or any full-blown programming language, I never considered covering every aspect of OM with it.
Having said that, I’m still intrigued by your example and I’m thinking if there is a way to do both. I can certainly see a use for an “advanced” use of OM via the command line, especially if it’s used from other programming languages (e.g. as an external call) or directly via shell scripts or bat files.
I can see two ways of having both.
# Either there is one `om`, for simple use, and one `oma` for advanced use.
$ om name
Marcus
$ oma -r -p /home/marcus
Marcus
# Or there is a toggle within `om`
$ om
Open Metadata-cli - Simple mode
$ om --toggle
Open Metadata-cli - Advanced mode
$ om -r -p /home/marcus
Although ideally I’d have a single one. My motivation being that it would provide a way for newcomers to get involved more easily and, once ready, head into programming-land when their requirements on control increases.
However at the other end, programming languages could wrap, or provide bindings for an advanced cli interface, which might make it less of a hassle when porting it to other languages. Heck, the cli could potentially be the main method of interacting with OM, Python being a mere binding to it, rather than the other way around.
That way, it could become compiled (and possibly quicker) and remain linear in performance across languages.
Interesting!
$ om -verbose read name
$ om write name Marcus
$ om delete name -recursive
$ om list -detailed
$ [command][key][value]
$ om key value
$ om key
value
I would have to agree with the other comment that anyone using a command line tool is going to be fine with a few flags or subcommands. So to me it seems excessive to introduce more than one executable into the environment just to have different command syntaxes. I think it is just as simple to place a 'read' or 'write' subcommand in front ad a qualifier. It even is more explicit about what the command does and could prevent accidental write if they meant to read.
--
You received this message because you are subscribed to a topic in the Google Groups "Open Metadata" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/open-metadata/7CzX5hbEfZM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to open-metadat...@googlegroups.com.
To post to this group, send email to open-m...@googlegroups.com.
Visit this group at http://groups.google.com/group/open-metadata.
For more options, visit https://groups.google.com/d/optout.
I would have to agree with the other comment that anyone using a command line tool is going to be fine with a few flags or subcommands. So to me it seems excessive to introduce more than one executable into the environment just to have different command syntaxes. I think it is just as simple to place a 'read' or 'write' subcommand in front ad a qualifier. It even is more explicit about what the command does and could prevent accidental write if they meant to read.
On May 11, 2014 3:08 AM, "Marcus Ottosson" <konstr...@gmail.com> wrote:
Those are both excellent suggestions, thanks guys. Agree on the toggling, can't quite see that working in a nice manner without causing confusion. Especially when run non-interactively.--I'm admittedly somewhat in love with the simplicity of:$ [command][key][value]
$ om key value
$ om key
valueAny suggestions on how to satisfy the advanced need without sacrificing simple use?What are your thoughts on having a separate command for simple versus adva.. I mean, normal use? :)
You received this message because you are subscribed to a topic in the Google Groups "Open Metadata" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/open-metadata/7CzX5hbEfZM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to open-metadata+unsubscribe@googlegroups.com.