-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TOML "standard selector syntax" Undocumented #210
Comments
What is it you're trying to select? Here's an example of how you can interact with the above data: https://dasel.tomwright.me/s/59c85b2c-0c35-4b5d-ad2b-56c78ff67f6e
If you don't want to use exact paths you can use the search selector. If I can get a more explicit example of what you're trying to achieve I can probably be a bit more helpful here. |
On a side note, I do agree that more docs on exactly how different formats are interpreted would be helpful. |
Ok. Here's an example of using the search selector:
without having to know the string "STUFF" or "JUNK", you could do this:
if you wanted to return the two mydata values. |
I'd like to be able to select just the node headers. For example:
How do I select just "[STUFF]" and "[JUNK]" (not including mydata) without using the strings "STUFF" and "JUNK"? |
For that you can use the keys and indexes selector. dasel -f file.toml -m '.-'
STUFF
MORESTUFF Or if you wanted to select just the data without knowing the keys: dasel -f file.toml -m '.[*]'
mydata = "somestuff"
mydata2 = "junk" Or this: dasel -f file.toml -m '.[*].[*]'
somestuff
junk |
These are great examples. Please add them to the main documentation. It would probably be useful to have sections for each format you support e.g. a JSON section, a TOML section, a YAML section, a section for going from one format to another, etc....... |
Note that
... essentially implying there's only json and yaml parsers. |
I've just fixed this |
Describe the bug
This is an obvious documentation bug. There is almost zero documentation on the included TOML support
To Reproduce
TOML file:
[STUFF]
mydata = "somestuff"
[MORESTUFF]
mydata2 = "junk"
"Dasel uses a standard selector syntax no matter the data format. "
I want to use your standardized "selectors" to select various
values without having to give an explicit path for everything.
I don't want to translate to an intermediate format like JSON or YAML.
I don't see anything in your documentation about how to do this with TOML
The text was updated successfully, but these errors were encountered: